Bug 915501 - fedpkg new-source adding sources and .gitignore breaks the local clone somehow
Summary: fedpkg new-source adding sources and .gitignore breaks the local clone somehow
Keywords:
Status: CLOSED DUPLICATE of bug 822055
Alias: None
Product: Fedora
Classification: Fedora
Component: GitPython
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dennis Gilmore
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-25 22:11 UTC by Toshio Ernie Kuratomi
Modified: 2013-05-22 07:57 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-05-22 07:57:30 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Toshio Ernie Kuratomi 2013-02-25 22:11:23 UTC
Description of problem:

Really strange one here.  I'm opening this against fedpkg but feel free to retarget it to GitPython if you think it's in the GitPython bindings... I haven't analyzed the code behind this too deeply.

Once fedpkg new--sources is run, commits to the git repo make empty commits instead of commiting the changes that were staged by fedpkg.  This happens with both git commit and git commit -a.  This is not something that happens with every git repo or everytime I try to do fedpkg new-sources but it is reproducible with a repo that has the problem.  It might be easiest for me to give you the example to see what I mean:

Steps to Reproduce:

1. wget http://toshio.fedorapeople.org/python-simplejson-packaging-git.tar.gz
2. tar -xzvf python-simplejson-packaging-git.tar.gz
3. cd python-simplejson
4. spectool -g python-simplejson.spec
5. fedpkg new-sources

At this point, you would expect to be able to do git commit or git commit -a and have the changes committed to the repo.  When I do those, git appears to commit fine (no error is given) but I end up with an empty commit and the changes are still pending in the index:

$ git commit -m 'fail'
[master 026fe57] fail
[pts/20@unaka ~TMPDIR/python-simplejson]$ git status                                                            *[master]  (14:03:17)
# On branch master
# Your branch is ahead of 'origin/master' by 2 commits.
#
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#       modified:   .gitignore
#       modified:   sources

$ git commit -a -m 'wat!'
[master 5725a97] wat!
[pts/20@unaka ~TMPDIR/python-simplejson]$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 3 commits.
#
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#       modified:   .gitignore
#       modified:   sources

git log -p shows that those commits were empty... no changes were recorded for them.


To get out of this, we can do:

git reset HEAD
git add .gitignore sources
git commit

git commit -a and git commit .gitignore sources also work.

So it seems like either GitPython's adding of the changes to the index are wrong or fedpkg's use of GitPython API is wrong here.

Version-Release number of selected component (if applicable):
fedpkg-1.11-2.fc17.noarch

Comment 1 Fedora End Of Life 2013-04-03 14:33:03 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 2 Christopher Meng 2013-05-14 04:23:05 UTC
Hi...

I just met this problem...It's a bug I think...It really confused me as I've pushed 3 commits with same contents tried to solve it but it's useless.

Comment 3 Vít Ondruch 2013-05-22 07:57:30 UTC

*** This bug has been marked as a duplicate of bug 822055 ***


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