diff options
-rw-r--r-- | debian/changelog | 4 | ||||
-rwxr-xr-x | dgit | 16 |
2 files changed, 20 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 99e724d..08b3e32 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,10 @@ dgit (2.4~) unstable; urgency=low Closes:#841100. * split brain cache: Fix a wrong implicit reference to $_. Closes:#841383. + * split brain cache: Make sure to write reflog entries for cache updates + even if the eventual tree (and therefore commit) is the same. + Otherwise, after updating dgit, the cache might have the right answer + but not be refreshed even by a build. -- @@ -3917,6 +3917,22 @@ END ensuredir ".git/logs/refs/dgit-intern"; my $makelogfh = new IO::File ".git/logs/refs/$splitbraincache", '>>' or die $!; + + my $oldcache = git_get_ref "refs/$splitbraincache"; + if ($oldcache eq $dgitview) { + my $tree = cmdoutput qw(git rev-parse), "$dgitview:"; + # git update-ref doesn't always update, in this case. *sigh* + my $dummy = make_commit_text <<END; +tree $tree +parent $dgitview +author Dgit <dgit\@example.com> 1000000000 +0000 +committer Dgit <dgit\@example.com> 1000000000 +0000 + +Dummy commit - do not use +END + runcmd @git, qw(update-ref -m), "dgit $our_version - dummy", + "refs/$splitbraincache", $dummy; + } runcmd @git, qw(update-ref -m), $cachekey, "refs/$splitbraincache", $dgitview; |