Bug 725593 - git push --quiet isn't actually quiet
Summary: git push --quiet isn't actually quiet
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: git
Version: 14
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Todd Zullinger
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-26 00:25 UTC by Jesse Keating
Modified: 2013-01-10 10:54 UTC (History)
6 users (show)

Fixed In Version: git-1.7.9.1-1.fc17
Clone Of:
Environment:
Last Closed: 2012-03-02 01:30:31 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jesse Keating 2011-07-26 00:25:06 UTC
git push --quiet seems to leak some non-error stuff out to stderr:


$ git push --quiet
Unpacking objects: 100% (3/3), done.

repeated the test and:

$ git push --quiet 2>/dev/null
[jkeating@linlumos tmpAA_Lzv](master)$ 

This is with git-1.7.4.4-1.fc14.x86_64

Comment 1 Adam Tkac 2011-07-28 10:47:41 UTC
I just tested git-1.7.6-1.fc15 and the --quiet option works fine there.

Do you really need this fixed in F14 or F15 and later is enough.

Comment 2 Todd Zullinger 2011-07-28 14:39:37 UTC
Really?  I tested git-1.7.6-1 on f15 and found that it prints the "Unpacking objects" just as Jesse reported.  I looked for a while at the code the other day and could not come up with a fix.  (At least for me, it's not trivial to follow the way things work in the push process.)

[tmz@f15-64 git-test]$ mkdir /tmp/git-push-bug && cd /tmp/git-push-bug
[tmz@f15-64 git-push-bug]$ git init --bare test.git
Initialized empty Git repository in /tmp/git-push-bug/test.git/
[tmz@f15-64 git-push-bug]$ git clone test.git
...
[tmz@f15-64 git-push-bug]$ cd test
[tmz@f15-64 test]$ touch foo; git add foo; git commit -m testing
...
[tmz@f15-64 test]$ git push --quiet origin master 
Unpacking objects: 100% (3/3), done.

Running with GIT_TRACE=1, you can see a little more, but to really follow it, requires deeper debugging (I'm from the school of "add some printf's to follow the code" when it comes to C.)

[tmz@f15-64 test]$ rm -rf ../test.git && git init --bare ../test.git
Initialized empty Git repository in /tmp/git-push-bug/test.git/
[tmz@f15-64 test]$ GIT_TRACE=1 git push --quiet origin master 
trace: built-in: git 'push' '--quiet' 'origin' 'master'
trace: run_command: 'git-receive-pack '\''/tmp/git-push-bug/test.git'\'''
trace: exec: 'sh' '-c' 'git-receive-pack '\''/tmp/git-push-bug/test.git'\''' 'git-receive-pack '\''/tmp/git-push-bug/test.git'\'''
trace: built-in: git 'receive-pack' '/tmp/git-push-bug/test.git'
trace: run_command: 'pack-objects' '--all-progress-implied' '--revs' '--stdout' '--thin' '--delta-base-offset' '-q'
trace: exec: 'git' 'pack-objects' '--all-progress-implied' '--revs' '--stdout' '--thin' '--delta-base-offset' '-q'
trace: built-in: git 'pack-objects' '--all-progress-implied' '--revs' '--stdout' '--thin' '--delta-base-offset' '-q'
trace: run_command: 'unpack-objects' '--pack_header=2,3'
trace: exec: 'git' 'unpack-objects' '--pack_header=2,3'
trace: built-in: git 'unpack-objects' '--pack_header=2,3'
Unpacking objects: 100% (3/3), done.
trace: run_command: 'gc' '--auto' '--quiet'
trace: exec: 'git' 'gc' '--auto' '--quiet'
trace: built-in: git 'gc' '--auto' '--quiet'

You can see that the -q option is not being passed to unpack-objects as it is to pack-objects and other subcommands.  I was not able to determine where this was missing in the git code.  Might be worth asking on the git list, as someone there may well know offhand.

Comment 3 Adam Tkac 2011-07-28 15:05:25 UTC
I tested git push when I pushed tigervnc changes earlier today so I might have pushed merged branch accidentally (i.e. git merge && git push --quiet) and this codepath is probably OK... Sorry for false information.

Comment 4 Todd Zullinger 2011-07-30 19:55:56 UTC
I did some scratch builds with the patch that Clemens Buchacher so kindly sent to the git list¹.

F15: http://koji.fedoraproject.org/koji/taskinfo?taskID=3240115
F16: http://koji.fedoraproject.org/koji/taskinfo?taskID=3240103

This fixes the issue for me, but it wouldn't hurt to have more testing to make sure it doesn't have any adverse side-effects.

¹ http://article.gmane.org/gmane.comp.version-control.git/178190

Comment 5 Fedora Update System 2011-08-09 16:15:21 UTC
git-1.7.6-5.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/git-1.7.6-5.fc16

Comment 6 Fedora Update System 2011-08-09 21:53:12 UTC
Package git-1.7.6-5.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing git-1.7.6-5.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/git-1.7.6-5.fc16
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2011-08-22 14:44:02 UTC
git-1.7.6-5.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Todd Zullinger 2011-09-09 00:24:40 UTC
Unfortunately, the fix had an unseen regression.  When push --quiet was used and the remote end was an older version, the remote end hung up.  This change was released upstream in 1.7.6.1 and reverted in 1.7.6.2.  I've pushed 1.7.6.2 into testing.  We'll have to revisit this when a more compatible fix makes it upstream.

This is discussed in more detail on the git list:

http://thread.gmane.org/gmane.comp.version-control.git/180652

Comment 9 Fedora Update System 2012-02-15 19:07:37 UTC
git-1.7.9.1-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/git-1.7.9.1-1.fc17

Comment 10 Fedora Update System 2012-02-16 01:56:34 UTC
Package git-1.7.9.1-1.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing git-1.7.9.1-1.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-1748/git-1.7.9.1-1.fc17
then log in and leave karma (feedback).

Comment 11 Fedora Update System 2012-03-02 01:30:31 UTC
git-1.7.9.1-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.