- Package:
- git-debpush
- Source:
- git-debpush
- Submitter:
- Andrej Shadura
- Date:
- 2025-08-06 15:35:01 UTC
- Severity:
- normal
- Tags:
Hello,
I tried to use git-debpush with a native package, and forgot that it is,
in fact, native. I used --gbp, and that resulted in an error:
GIT_TRACE=1 git debpush --quilt=gbp
14:48:11.055282 git.c:750 trace: exec: git-debpush --quilt=gbp
14:48:11.055329 run-command.c:657 trace: run_command: git-debpush --quilt=gbp
14:48:11.062485 git.c:465 trace: built-in: git symbolic-ref --quiet HEAD
14:48:11.065416 git.c:465 trace: built-in: git symbolic-ref -q HEAD
14:48:11.067971 git.c:465 trace: built-in: git rev-parse --verify 'refs/heads/debian/unstable^{commit}'
...
14:48:11.264317 git.c:465 trace: built-in: git checkout -q -b upstream ''
fatal: empty string is not a valid pathspec. please use . instead if you meant to match all paths
I want to be able to not have to think about the need to use --gbp,
since most of my packages use gbp layout, maybe under five use
patches-applied layout, and just a few are native.
Hello, Hmm, you only need to specify the quilt mode at all the first time you push a package. I think if I passed --gbp while trying to upload a native package I would appreciate being told "are you sure you're uploading the package you think you are?"
Hi. Thanks for the report.
Andrej Shadura writes ("Bug#1108266: git-debpush should ignore quilt-mode for native packages"):
...
This is a bug. I think it ought to have failed with a more sensible
error message.
It would be lovely to be able to detect automatically even on first
upload. But this is not possible.
We could make --gbp a no-op when the source format is native, but that
seems like inviting users to get into the habit of using it all the
time (precisely as you suggest). Passing --gbp incorrectly could
even, in unusual cases, result in corrupted uploads. This is IMO a
tolerable risk if we're running it as the consequence of occasional
human error, but not if we collectively make it a routine situation.
Note that a --quilt option is only needed the first time each package
is uploaded with tag2upload.[1] Later uploads can determine the quilt
mode by looking at the branch structure. So the right habit to
develop is the habit of not passing this option. If you find you
needed --quilt= for a subsequent upload that's a but - please report
it.
Sean, how about this:
* Add a new --quilt=native to allow explicitly demanding a native
source format.
* With native source formats reject everything except --quilt=native
and maybe --quilt=nofix.
* Add a note to the top of QUILT MODE OPTIONS in the manpage saying
this is only needed for the first upload of any particular
package.
I'm starting to wonder if the --gbp alias for --quilt=gbp is a
mistake.
Ian.
[1] It's also not needed if the package was previously uploaded with
dgit push.
Hello, Potentially, or "specified gbp mode for a native package, ignoring". I think dgit does just that, so it would make sense for git-debpush to do that too. In any case, the error from a git call should be prevented. At first, I didn’t understand what was wrong, and I thought I needed to give git-debpush some argument (e.g. origin). That didn’t work — it complained it didn’t want an argument after all. Eventualy, I had to resort to GIT_TRACE to understand what went wrong :)
Hello, Yes, I'd really like to avoid people developing that habit. Interesting, but this seems complex. Why not just make it an (more helpful) error to use any quilt option with a native package? Maybe, yeah.
tags -1 + newcomer We think these bugs would make good places to start playing with src:dgit. Ian.