X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=dgit;h=606abb5881ccd2a75736775cf04688a315c91d0d;hb=a3de80aa64b5af73cd49c1479ee62e69c49b90d9;hp=0ef27f050976e9b550221135f649da527a8e7c7f;hpb=37923577e345babd9e21382449147053ed063f44;p=dgit.git diff --git a/dgit b/dgit index 0ef27f05..606abb58 100755 --- a/dgit +++ b/dgit @@ -985,7 +985,7 @@ sub commit_getclogp ($) { my $memo = $commit_getclogp_memo{$objid}; return $memo if $memo; - my $mclog = dgit_privdir()."clog-$objid"; + my $mclog = dgit_privdir()."clog"; runcmd shell_cmd "exec >$mclog", @git, qw(cat-file blob), "$objid:debian/changelog"; $commit_getclogp_memo{$objid} = parsechangelog("-l$mclog"); @@ -3266,8 +3266,9 @@ sub setup_mergechangelogs (;$) { my $driver = 'dpkg-mergechangelogs'; my $cb = "merge.$driver"; - my $attrs = '.git/info/attributes'; - ensuredir '.git/info'; + confess unless defined $maindir; + my $attrs = "$maindir_gitcommon/info/attributes"; + ensuredir "$maindir_gitcommon/info"; open NATTRS, ">", "$attrs.new" or die "$attrs.new $!"; if (!open ATTRS, "<", $attrs) { @@ -3312,15 +3313,16 @@ sub ensure_setup_existing_tree () { set_local_git_config $k, 'true'; } -sub open_gitattrs () { - my $gai = new IO::File ".git/info/attributes" +sub open_main_gitattrs () { + confess 'internal error no maindir' unless defined $maindir; + my $gai = new IO::File "$maindir_gitcommon/info/attributes" or $!==ENOENT - or die "open .git/info/attributes: $!"; + or die "open $maindir_gitcommon/info/attributes: $!"; return $gai; } sub is_gitattrs_setup () { - my $gai = open_gitattrs(); + my $gai = open_main_gitattrs(); return 0 unless $gai; while (<$gai>) { return 1 if m{^\[attr\]dgit-defuse-attrs\s}; @@ -3340,15 +3342,15 @@ sub setup_gitattrs (;$) { END return; } - my $af = ".git/info/attributes"; - ensuredir '.git/info'; + my $af = "$maindir_gitcommon/info/attributes"; + ensuredir "$maindir_gitcommon/info"; open GAO, "> $af.new" or die $!; print GAO <) { chomp; @@ -5019,8 +5021,8 @@ END changedir $maindir; # When we no longer need to support squeeze, use --create-reflog # instead of this: - ensuredir ".git/logs/refs/dgit-intern"; - my $makelogfh = new IO::File ".git/logs/refs/$splitbraincache", '>>' + ensuredir "$maindir_gitcommon/logs/refs/dgit-intern"; + my $makelogfh = new IO::File "$maindir_gitcommon/logs/refs/$splitbraincache", '>>' or die $!; my $oldcache = git_get_ref "refs/$splitbraincache"; @@ -5498,7 +5500,7 @@ sub quilt_check_splitbrain_cache ($$) { my $child = open GC, "-|"; defined $child or die $!; if (!$child) { chdir $maindir or die $!; - if (!stat ".git/logs/refs/$splitbraincache") { + if (!stat "$maindir_gitcommon/logs/refs/$splitbraincache") { $! == ENOENT or die $!; printdebug ">(no reflog)\n"; exit 0;