purcell / darcs-to-git

Convert/mirror darcs repos into git repos
http://www.sanityinc.com/articles/converting-darcs-repositories-to-git
MIT License
96 stars 20 forks source link

Problem with ‘git status’ exiting with nonzero status #3

Closed dbrock closed 14 years ago

dbrock commented 14 years ago

This prevents darcs-to-git from running. Deleting the invocation of ‘git status’ makes it work again. You may want to ignore the exit status of ‘git status’ if you want to keep the invocation.

hoga:~ daniel$ git --version
git version 1.6.6
hoga:~ daniel$ uname -a
Darwin hoga.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386
hoga:~ daniel$ git status
# On branch master
nothing to commit (working directory clean)
hoga:~ daniel$ echo $?
1

Thanks for a great conversion script by the way! I really appreciated the well-written README file. :)

purcell commented 14 years ago

Hmm, that's an odd issue, and the first I've heard of it. Looks like the problem lies with your older git version:

% git status
# On branch master
nothing to commit (working directory clean)
% echo $?
0
% git --version
git version 1.7.3
purcell commented 14 years ago

I haven't found any exact info about this on the web, but I saw lots of complaints about the old exit code behaviour that you're seeing...

dbrock commented 14 years ago

Ah, that explains it. Makes sense. I'll just upgrade Git then. Thanks!

purcell commented 14 years ago

Thanks anyway for taking the time to investigate and patch the problem!