forgejo/modules
zeripath fb5f7791ef
Prevent off-by-one error on comments on newly appended lines ()
* Prevent off-by-one error on comments on newly appended lines

There was a bug in CutDiffAroundLine whereby if a file without a terminal new line
has a patch which appends lines to it and a comment is placed on one of those lines
the comment diff will be a line out of place.

This fixes CutDiffAroundLine to simply ignore the missing terminal newline - however,
we should really improve this rendering to add a marker to say that there was a
previously missing terminal newline.

Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-12-20 02:15:49 +00:00
..
activitypub Create pub/priv keypair for federation () 2021-09-28 15:19:22 -04:00
analyze Use git attributes to determine generated and vendored status for language stats and diffs () 2021-09-09 21:13:36 +01:00
appstate Decouple unit test code from business code () 2021-11-12 22:36:47 +08:00
auth Add bundle download for repository () 2021-08-24 11:47:09 -05:00
avatar Add user settings key/value DB table () 2021-11-22 04:47:23 -05:00
base Fixed assert statements. () 2021-06-07 07:27:09 +02:00
cache Test cache during init () 2021-12-06 00:24:57 +08:00
charset Read expected buffer size () 2021-10-24 22:12:43 +01:00
context Prevent double decoding of % in url params () 2021-12-16 17:40:18 +00:00
convert Some repository refactors () 2021-12-12 23:48:20 +08:00
csv Properly determine CSV delimiter () 2021-10-30 23:50:40 +08:00
doctor Move keys to models/asymkey () 2021-12-10 16:14:24 +08:00
emoji Run processors on whole of text () 2021-06-17 11:35:05 +01:00
eventsource Add an abstract json layout to make it's easier to change json library () 2021-07-24 18:03:58 +02:00
generate switch to maintained lib () 2021-07-24 13:00:41 +02:00
git Prevent off-by-one error on comments on newly appended lines () 2021-12-20 02:15:49 +00:00
gitgraph Add missing X-Total-Count and fix some related bugs () 2021-12-15 13:39:34 +08:00
graceful Make SSL cipher suite configurable () 2021-11-20 01:12:43 -05:00
hcaptcha hCaptcha Support () 2020-10-02 23:37:53 -04:00
highlight Add .gitattribute assisted language detection to blame, diff and render () 2021-11-17 20:37:00 +00:00
hostmatcher Use hostmatcher to replace matchlist, improve security () 2021-11-20 17:34:05 +08:00
httpcache Use a variable but a function for IsProd because of a slight performance increment () 2021-10-20 16:37:19 +02:00
httplib refactor: move from io/ioutil to io and os package () 2021-09-22 13:38:34 +08:00
indexer Prevent hang in git cat-file if repository is not a valid repository and other fixes () 2021-12-16 19:01:14 +00:00
json Move repository model into models/repo () 2021-12-10 09:27:50 +08:00
lfs Use hostmatcher to replace matchlist, improve security () 2021-11-20 17:34:05 +08:00
log Stop printing 03d after escaped characters in logs () 2021-12-19 21:00:22 +00:00
markup Fixed emoji alias not parsed in links () 2021-12-15 23:49:12 +00:00
metrics Add metrics to get issues by repository () 2021-10-05 20:39:37 +02:00
migration Use fmt.Sprintf correctly () 2021-12-02 20:36:50 +01:00
nosql Remove unnecessary variable assignments () 2021-11-18 09:33:06 +08:00
notification Fix rename notification bug () 2021-12-17 14:24:47 +08:00
options refactor: move from io/ioutil to io and os package () 2021-09-22 13:38:34 +08:00
password Fixed assert statements. () 2021-06-07 07:27:09 +02:00
pprof refactor: move from io/ioutil to io and os package () 2021-09-22 13:38:34 +08:00
private Move keys to models/asymkey () 2021-12-10 16:14:24 +08:00
process Make Requests Processes and create process hierarchy. Associate OpenRepository with context. () 2021-11-30 20:06:32 +00:00
proxy Return nil proxy function if proxy not enabled () 2021-08-19 16:41:20 -04:00
public refactor: move from io/ioutil to io and os package () 2021-09-22 13:38:34 +08:00
queue Prevent deadlock in TestPersistableChannelQueue () 2021-11-19 01:13:25 +00:00
recaptcha refactor: move from io/ioutil to io and os package () 2021-09-22 13:38:34 +08:00
references Fix various documentation, user-facing, and source comment typos () 2021-07-08 13:38:13 +02:00
repository Make AvatarRenderedSizeFactor configurable and set it to 3 () 2021-12-16 10:18:38 +08:00
secret Fix various documentation, user-facing, and source comment typos () 2021-07-08 13:38:13 +02:00
session Move session to models/login () 2021-10-17 19:51:56 +01:00
setting Make AvatarRenderedSizeFactor configurable and set it to 3 () 2021-12-16 10:18:38 +08:00
ssh Move keys to models/asymkey () 2021-12-10 16:14:24 +08:00
storage refactor: move from io/ioutil to io and os package () 2021-09-22 13:38:34 +08:00
structs Add option to define refs in issue templates () 2021-12-17 21:29:09 +00:00
svg refactor: move from io/ioutil to io and os package () 2021-09-22 13:38:34 +08:00
sync Fix missing unlock in uniquequeue () 2020-01-15 23:58:33 +02:00
templates Make AvatarRenderedSizeFactor configurable and set it to 3 () 2021-12-16 10:18:38 +08:00
test Move repository model into models/repo () 2021-12-10 09:27:50 +08:00
timeutil Allow mocking timeutil () 2021-10-18 21:12:26 +01:00
translation Use index of the supported tags to choose user lang () 2021-04-14 19:52:01 +01:00
typesniffer Read expected buffer size () 2021-10-24 22:12:43 +01:00
updatechecker Use JSON module instead of stdlib json () 2021-12-17 09:15:02 +08:00
upload Replace regex usage for MIME parsing () 2021-11-27 19:12:43 +08:00
uri Dump github/gitlab/gitea repository data to a local directory and restore to gitea () 2020-12-27 11:34:19 +08:00
user Add gitea-vet () 2020-04-05 07:20:50 +01:00
util Fix a panic in NotifyCreateIssueComment (caused by string truncation) () 2021-12-09 05:41:17 +00:00
validation Upgrade chi to v5 () 2021-10-13 22:50:23 -04:00
web Remove unnecessary variable assignments () 2021-11-18 09:33:06 +08:00