git ubuntu tag failing on changes in work-tree

Bug #1739000 reported by Christian Ehrhardt 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
git-ubuntu
Fix Released
Low
Robie Basak

Bug Description

Hi,
this is highly related (or even a dup to) the following bugs, but I wanted to report to let you decide:
- bug 1687940 usd tag --upload complains about unclean working tree
- bug 1687057 git cannot represent empty directories by default

To reproduce:
$ git ubuntu clone strongswan
$ cd strongswan
$ git checkout ubuntu/xenial-devel
# here you get a warning that this is affected by #1687057.
$ git ubuntu tag --upload
12/19/2017 11:34:16 - ERROR:Working tree must be clean to continue.

So due to #1687057 we hit the otherwise fixed #1687940.
And since git status will just not mind talking about empty dirs at all the issue is hard to spot.
So I wonder if in this case we could be smarter about the error message.
For example in pseudo code

if "ERROR:Working tree must be clean"
  if "this is a case of #1687057"
     Report: "this is affected by #1687057, please build with dpkg-buildpackage and ensure with debdiff that all intended changes (and only those) are included
  else
     Report: "ERROR:Working tree must be clean"
     if "git status" shows no delta
         Please tar your current tree and report
     else
         Report: These are your unclean files
         Report: output of git status

Tags: tag

Related branches

Revision history for this message
Nish Aravamudan (nacc) wrote :

Robie, I'm assigning to you, as it's related to the empty directory support.

Changed in usd-importer:
assignee: nobody → Robie Basak (racb)
milestone: none → future
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Affected: collectd

$ find . -type d -empty
./src/asm

$ git status --ignored
On branch bionic-fix-ftbfs
nothing to commit, working directory clean

But:
$ git ubuntu tag -v --upload
01/15/2018 06:02:35 - DEBUG:Executing: git config gitubuntu.lpuser
01/15/2018 06:02:35 - ERROR:Working tree must be clean to continue

This case might be more interesting, as right after clone I don't see the warning about the bug or the empty dir - so it might be an artifact of the build in this case.

After I found that the dir originally didn't exist I removed it, which enabled tagging and build-source, but I was carefully comparing debdiffs before an upload.

So this is another case where - until fully fixed - at least listing the offending directories might be great, so that users can check for their origin.

Robie Basak (racb)
tags: added: tag
Revision history for this message
Robie Basak (racb) wrote :

I think this is fixed by cbb0f52. If not then please revert the bug status.

Changed in usd-importer:
status: Confirmed → Fix Committed
Revision history for this message
Robie Basak (racb) wrote : Fix released in git-ubuntu

Fix released in git-ubuntu version 1.0

Changed in usd-importer:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.