Source: git-buildpackage Version: 0.9.35 Severity: normal Tags: patch Hi,
Using diff.noprefix=true globally makes Git nicer to use, as it makes it possible to copy file paths when running git diff (etc.) on the command line. Otherwise, you typically see filenames which technically don't exist: these files aren't under a directory called "a" or "b": --- a/tochange.py +++ b/tochange.py However, when this option is set, "pq export" will serialise the patch branch into debian/patches with the filenames missing the prefix, which dpkg-source then can't actually parse and it errors out. In other words, they look like this: --- tochange.py +++ tochange.py A patch is attached that overrides diff.noprefix when calling out to "git diff", meaning that it will use "a/" and "b/" as expected. This seems somewhat analogous to overriding the user's core.abbrev setting. Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
diff --git gbp/git/repository.py gbp/git/repository.py index 98f7e43..d879032 100644 --- gbp/git/repository.py +++ gbp/git/repository.py @@ -1835,6 +1835,7 @@ class GitRepository(object): options.add('--', paths) if abbrev is not None: config_args.add('core.abbrev=%d' % abbrev) + config_args.add('diff.noprefix=false') output, stderr, ret = self._git_inout('diff', options.args, config_args=config_args.args)