This repository has been archived on 2024-01-04. You can view files and clone it, but cannot push or open issues or pull requests.
forgejo/modules
Yarden Shoham 29de86b938
Fix restore repo bug, clarify the problem of ForeignIndex (#22776) (#22794)
Backport #22776

Fix #22581

TLDR: #18446 made a mess with ForeignIndex and triggered a design
flaw/bug of #16356, then a quick patch #21271 helped #18446, then the
the bug was re-triggered by #21721 .

Related:
* #16356
* BasicIssueContext
https://github.com/go-gitea/gitea/pull/16356/files#diff-7938eb670d42a5ead6b08121e16aa4537a4d716c1cf37923c70470020fb9d036R16-R27
* #18446 
* If some issues were dumped without ForeignIndex, then they would be
imported as ForeignIndex=0
https://github.com/go-gitea/gitea/pull/18446/files#diff-1624a3e715d8fc70edf2db1630642b7d6517f8c359cc69d58c3958b34ba4ce5eR38-R39
* #21271
* It patched the above bug (somewhat), made the issues without
ForeignIndex could have the same value as LocalIndex
* #21721 
    * It re-triggered the zero-ForeignIndex bug.


ps: I am not sure whether the changes in `GetForeignIndex` are ideal (at
least, now it has almost the same behavior as BasicIssueContext in
#16356), it's just a quick fix. Feel free to edit on this PR directly or
replace it.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2023-02-09 08:43:55 +01:00
..
activitypub Fix dashboard ignored system setting cache (#21621) (#21759) 2022-11-10 19:41:44 +08:00
analyze
auth
avatar Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2022-10-24 20:29:17 +01:00
base Add generic set type (#21408) 2022-10-12 13:18:26 +08:00
cache Fix get system setting bug when enabled redis cache (#22298) 2023-01-01 23:24:01 +08:00
charset Fix line spacing for plaintext previews (#22699) (#22701) 2023-02-01 22:06:58 +00:00
container Add generic set type (#21408) 2022-10-12 13:18:26 +08:00
context Prepend refs/heads/ to issue template refs (#20461) (#22427) 2023-01-13 16:33:35 -06:00
convert Fix pull request API field `closed_at` always being `null` (#22482) (#22483) 2023-01-17 11:41:43 +00:00
csv Go 1.19 format (#20758) 2022-08-30 21:15:45 -05:00
doctor Prevent dangling user redirects (#21856) (#21858) 2022-11-18 22:25:00 +08:00
emoji Update Emoji dataset to Unicode 14 (#22342) (#22343) 2023-01-04 12:45:18 -06:00
eventsource Move some files into models' sub packages (#20262) 2022-08-25 10:31:57 +08:00
generate
git Prepend refs/heads/ to issue template refs (#20461) (#22427) 2023-01-13 16:33:35 -06:00
gitgraph Refactor git command arguments and make all arguments to be safe to be used (#21535) 2022-10-23 22:44:45 +08:00
graceful Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2022-10-24 20:29:17 +01:00
hcaptcha
highlight Upgrade chroma to v2.3.0 (#21259) 2022-09-26 13:50:03 +08:00
hostmatcher Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2022-10-24 20:29:17 +01:00
httpcache [BRANDING] add X-Forgejo-* headers 2023-02-05 09:57:10 +01:00
httplib
indexer Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2022-10-24 20:29:17 +01:00
issue/template Use path not filepath in template filenames (#21993) (#22022) 2022-12-04 13:58:58 +08:00
json
lfs Removed some vestigial code related to Range bounds checks (#20312) 2022-07-28 11:04:36 +08:00
log Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2022-10-24 20:29:17 +01:00
markup Fix README TOC links (#22577) (#22677) 2023-01-31 17:23:19 +08:00
mcaptcha Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2022-10-24 20:29:17 +01:00
metrics Move some files into models' sub packages (#20262) 2022-08-25 10:31:57 +08:00
migration Fix restore repo bug, clarify the problem of ForeignIndex (#22776) (#22794) 2023-02-09 08:43:55 +01:00
mirror Implement sync push mirror on commit (#19411) 2022-07-08 20:45:12 +01:00
nosql fix broken insecureskipverify handling in rediss connection uris (#20967) 2022-08-29 16:38:49 +02:00
notification Link issue and pull requests status change in UI notifications directly to their event in the timelined view. (#22627) (#22642) 2023-01-28 15:51:00 +00:00
options Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2022-10-24 20:29:17 +01:00
packages Normalize NuGet package version on upload (#22186) (#22200) 2022-12-21 14:50:17 -06:00
paginator Remove unnecessary misspell ignore pattern (#21475) 2022-10-18 12:52:25 -04:00
password
pprof Go 1.19 format (#20758) 2022-08-30 21:15:45 -05:00
private Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2022-10-24 20:29:17 +01:00
process Add more linters to improve code readability (#19989) 2022-06-20 12:02:49 +02:00
proxy
proxyprotocol Support Proxy protocol (#12527) 2022-08-21 19:20:43 +01:00
public Add generic set type (#21408) 2022-10-12 13:18:26 +08:00
queue Correctly handle select on multiple channels in Queues (#22146) (#22428) 2023-01-13 20:42:42 +00:00
recaptcha Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2022-10-24 20:29:17 +01:00
references Remove unnecessary misspell ignore pattern (#21475) 2022-10-18 12:52:25 -04:00
regexplru Custom regexp external issues (#17624) 2022-06-10 13:39:53 +08:00
repository Fix error when calculate the repository size (#22392) (#22474) 2023-01-16 16:07:06 -06:00
secret
session
setting [BRANDING] define the forgejo webhook type 2023-02-05 10:02:22 +01:00
sitemap Fix sitemap (#22272) (#22320) 2023-01-03 22:03:56 +08:00
ssh Support Proxy protocol (#12527) 2022-08-21 19:20:43 +01:00
storage Local storage should not store files as executable (#22162) (#22163) 2022-12-19 01:12:25 +02:00
structs [BRANDING] define the forgejo webhook type 2023-02-05 10:02:22 +01:00
svg
sync Add generic set type (#21408) 2022-10-12 13:18:26 +08:00
system Fix dashboard ignored system setting cache (#21621) (#21759) 2022-11-10 19:41:44 +08:00
templates Display error log when a modified template has an error so that it could recovery when the error fixed (#22261) (#22321) 2023-01-03 19:39:58 +08:00
test Refactor AssertExistsAndLoadBean to use generics (#20797) 2022-08-16 10:22:25 +08:00
timeutil Check for zero time instant in TimeStamp.IsZero() (#22171) (#22172) 2022-12-20 10:04:46 +08:00
translation Make every not exist error unwrappable to a fs.ErrNotExist (#20891) 2022-10-18 07:50:37 +02:00
typesniffer Rework raw file http header logic (#20484) 2022-07-29 17:26:55 +02:00
updatechecker [PRIVACY] Add a DNS method to fetch new updates 2023-02-05 02:11:26 +01:00
upload
uri
user
util Improve checkIfPRContentChanged (#22611) (#22644) 2023-01-28 17:56:16 +00:00
validation Add more checks in migration code (#21011) 2022-09-04 13:47:56 +03:00
watcher Share HTML template renderers and create a watcher framework (#20218) 2022-08-28 10:43:25 +01:00
web refactor webhook *NewPost (#20729) 2022-08-11 17:48:23 +02:00