X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=dgit;h=1f065dd3bbc9436804f53a52bfa50fb117553dc0;hb=ae3881653a4639a9c3017ffdb187b49ebe9fcea3;hp=e7a6904151a842c9d5b7bf7b2afb3b48fdba4ce7;hpb=1cf29315dda6f4d7aa1ae6f9b5800b35173040c6;p=dgit.git diff --git a/dgit b/dgit index e7a69041..1f065dd3 100755 --- a/dgit +++ b/dgit @@ -561,11 +561,6 @@ sub runcmd_ordryrun_local { } } -sub shell_cmd { - my ($first_shell, @cmd) = @_; - return qw(sh -ec), $first_shell.'; exec "$@"', 'x', @cmd; -} - our $helpmsg = <) { next unless m{$gitattrs_ourmacro_re}; - return 1; + return 1 if m{\s-working-tree-encoding\s}; + printdebug "is_gitattrs_setup: found old macro\n"; + return 0; } $gai->error and die $!; printdebug "is_gitattrs_setup: found nothing\n"; - return 0; + return undef; } sub setup_gitattrs (;$) { @@ -3414,7 +3417,7 @@ sub setup_gitattrs (;$) { my $already = is_gitattrs_setup(); if ($already) { progress < $af.new" or die $!; - print GAO <) { + if (m{$gitattrs_ourmacro_re}) { + die unless defined $already; + $_ = $new; + } chomp; print GAO $_, "\n" or die $!; } @@ -3466,7 +3473,7 @@ sub check_gitattrs ($$) { # oh dear, found one print STDERR <[0] } @vsns;