Source: dgit
Version: 8.4
Severity: wishlist

I did this in one of my packages
(https://salsa.debian.org/debian/spectemu
98b1b3de26fc9e7b5e857eeb5bf83d0d526c4001, if it matters):

  $ dgit -wn --quilt=gbp quilt-fixup
  Format `3.0 (quilt)', need to check/update patch stack
  examining quilt state (multiple patches, gbp mode)
  gzip: warning: GZIP environment variable is deprecated; use an alias or script
  dgit: split brain (separate dgit view) may be needed (--quilt=gbp).
  dgit: base trees orig=b3aecce5e4a6e0caf8ae o+d/p=d27d28aa8170e9d16e66
  dgit: quilt differences: src:  ## orig ##     gitignores:  == orig ==
  dgit: quilt differences:      HEAD == o+d/p               HEAD == o+d/p
  
  dgit: error: --quilt=gbp specified, implying patches-unapplied git tree
  dgit:  but git tree differs from orig in upstream files.
  dgit: For full diff showing the problem(s), type:
  dgit:  git diff b3aecce5e4a6e0caf8ae881a84e3c62de0507c23 HEAD -- :/ 
':!debian' ':!/.gitignore' ':!*/.gitignore'

On inspection of the diff I saw that it was basically just a combined
version of my debian/patches/ and so I was a bit confused for a few
minutes.  Actually the problem was that I'd retrieved this dgit command
line with C-r in bash and hadn't completely paid attention to the
--quilt option there, and this branch uses git-dpm and so is a
patches-applied branch.

dgit(1) tells me:

  If you have a branch like this it is essential to specify the
  appropriate --quilt= option!  This is because it is not always
  possible to tell: [...]

So I dutifully got into the habit of using a --quilt option, and I
understand that it makes sense for dgit to follow my explicit (if
incorrect) instruction.  However, in this case it *is* possible to tell,
at least with good probability: debian/.git-dpm exists, so --quilt=gbp
was probably a mistake.  Indeed, --quilt=dpm works fine.

I suggest that, at least, it would be helpful for dgit to notice the
situation where (1) there are quilt differences; (2) --quilt=<something
other than dpm> was explicitly specified; (3) debian/.git-dpm exists.
It could then include something in the error message suggesting to the
user that they should probably omit --quilt= or use --quilt=dpm instead,
or something along those lines.

Thanks,

-- 
Colin Watson                                       [cjwat...@debian.org]

Reply via email to