diff options
author | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-04-01 23:15:04 +0000 |
---|---|---|
committer | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-04-01 23:25:04 +0000 |
commit | c34a83286234ea1e876ebdf92a33744272bb6f4e (patch) | |
tree | a04f43151284e6893e23780438773f9ea07c9fba /t/v2writable.t | |
parent | 0321a1a9e7ae9c9d878d547ee67659ef8aa95689 (diff) | |
download | public-inbox-c34a83286234ea1e876ebdf92a33744272bb6f4e.tar.gz |
We need to ensure there is only one file in the top-level tree at any commit so the "add; remove; add;" sequence on the same message is detected properly. Otherwise, git will not detect the second "add" unless a second message is added to history. Deletes are now stored in "d" (and not "D" or "_/D") at the top-level, now. There's no need to have a "_" to reduce churn as "m" and "d" should never co-exist. It's now lowercased to make it easier-to-distinguish from "D" in git-log output.
Diffstat (limited to 't/v2writable.t')
-rw-r--r-- | t/v2writable.t | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/t/v2writable.t b/t/v2writable.t index 7abb14f6..4a7cfb90 100644 --- a/t/v2writable.t +++ b/t/v2writable.t @@ -210,9 +210,10 @@ EOF my @found = (); $srch->each_smsg_by_mid($smsg->mid, sub { push @found, @_; 1 }); is(scalar(@found), 0, 'no longer found in Xapian skeleton'); + my @log1 = qw(log -1 --pretty=raw --raw -r --no-abbrev --no-renames); - my $after = $git0->qx(qw(log -1 --pretty=raw --raw -r --no-abbrev)); - if ($after =~ m!( [a-f0-9]+ )A\t_/D$!) { + my $after = $git0->qx(@log1); + if ($after =~ m!( [a-f0-9]+ )A\td$!m) { my $oid = $1; ok(index($before, $oid) > 0, 'no new blob introduced'); } else { @@ -221,7 +222,7 @@ EOF is($im->remove($mime, 'test removal'), undef, 'remove is idempotent'); $im->done; - is($git0->qx(qw(log -1 --pretty=raw --raw -r --no-abbrev)), + is($git0->qx(@log1), $after, 'no git history made with idempotent remove'); eval { $im->done }; ok(!$@, '->done is idempotent'); |