diff options
author | Eric Wong <e@80x24.org> | 2021-09-15 11:26:17 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-09-15 17:44:11 +0000 |
commit | 375b3ccfd3ca978281cb3869b62fc91eebc60d6e (patch) | |
tree | 057ef3935df6a56a3de4ecccf36f4f6537a0749b /t/lei-mirror.t | |
parent | 311c711c56e8ba829d0efaf43a8910c904089707 (diff) | |
download | public-inbox-375b3ccfd3ca978281cb3869b62fc91eebc60d6e.tar.gz |
IMHO, this greatly improves code sharing and organization between v2, extindex, and lei/store. Common git-related logic for these is lightly-refactored and easier to reason about. The impetus for this big change was to ensure inboxes created+managed by public-inbox-{clone,fetch} could have alternates and configs setup properly without depending on SQLite (via V2Writable). This change does that while making old code shorter and better factored.
Diffstat (limited to 't/lei-mirror.t')
-rw-r--r-- | t/lei-mirror.t | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/t/lei-mirror.t b/t/lei-mirror.t index 44acbe95..5238b67c 100644 --- a/t/lei-mirror.t +++ b/t/lei-mirror.t @@ -95,7 +95,20 @@ SKIP: { ok(run_script([qw(-clone -q -C), $d, "$http/t2"], undef, $opt), '-clone succeeds on v2'); - ok(-d "$d/t2/git/0.git", 'epoch cloned'); + ok(-f "$d/t2/git/0.git/config", 'epoch cloned'); + + # writeBitmaps is the default for bare repos in git 2.22+, + # so we may stop setting it ourselves. + 0 and is(xqx(['git', "--git-dir=$d/t2/git/0.git", 'config', + qw(--bool repack.writeBitmaps)]), "true\n", + 'write bitmaps set (via include.path=all.git/config'); + + is(xqx(['git', "--git-dir=$d/t2/git/0.git", 'config', + qw(include.path)]), "../../all.git/config\n", + 'include.path set'); + + ok(-s "$d/t2/all.git/objects/info/alternates", + 'all.git alternates created'); ok(-f "$d/t2/manifest.js.gz", 'manifest saved'); ok(!-e "$d/t2/mirror.done", 'no leftover mirror.done'); ok(run_script([qw(-fetch -C), "$d/t2"], undef, $opt), |