Reiner Herrmann writes ("Bug#858054: dgit: clone not working with custom git 
templatedir"):
> Package: dgit
> Version: 3.10
...
> I wanted to checkout the source of a Debian package with "dgit clone",
> but it was no longer successful (I know that it was working in the past):
> 
> $ dgit clone hello
> canonical suite name for unstable is sid
> starting new git history
> downloading 
> http://ftp.debian.org/debian//pool/main/h/hello/hello_2.10-1.dsc...
> last upload to archive: NO git hash
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  
> Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100  708k  100  708k    0     0  1672k      0 --:--:-- --:--:-- --:--:-- 1675k
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  
> Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100  6072  100  6072    0     0  67403      0 --:--:-- --:--:-- --:--:-- 67466
> No such file or directory at /usr/bin/dgit line 3366.
> $ ls -a
> .  ..  hello_2.10-1.debian.tar.xz  hello_2.10.orig.tar.gz
> 
> I then tried it without a custom ~/.gitconfig and noticed that it
> was working again. After checking each section I found that the
> init.templateDir setting is responsible for this issue.  I have a
> templatedir configured to copy some custom hooks into new
> repositories.
> 
> dgit(1) doesn't mention anything that a custom templateDir is not supported.

Do you know what hooks are the problem ?  What do your hooks do ?

I don't think that a custom templateDir is necessarily completely
unsupported.  But obviously in principle a hook might do any crazy
thing.

Looking at the error message, I think it is more likely that the
problem is a bug which I noticed recently, which might cause things to
break if you disable some but not all of the *.setup-* things, or
might be exposed by a different version of git.

If so the attached patch might help.

Ian.

commit d985273c2fa4d327f07b09c5be53f3989caa289c
Author: Ian Jackson <[email protected]>
Date:   Fri Mar 10 17:43:57 2017 +0000

    dgit: mkdir .git/info in setup_gitattrs
    
    This might be necessary if setup_mergechangelogs were disabled.
    (This is something of a latent bug, since `git init' creates
    .git/info.)
    
    Signed-off-by: Ian Jackson <[email protected]>

diff --git a/dgit b/dgit
index 79f79cff..721fb089 100755
--- a/dgit
+++ b/dgit
@@ -3341,6 +3341,7 @@ END
        return;
     }
     my $af = ".git/info/attributes";
+    ensuredir '.git/info';
     open GAO, "> $af.new" or die $!;
     print GAO <<END or die $!;
 *      dgit-defuse-attrs

Reply via email to