git diff-index and both deleted conflict

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello all,

Could you advise me the fastest way to check in my script 
that there's "no local changes in the repository (in the working tree and 
index)" so that I could perform "git rebase" there?

git svn dcommit" should check for the same because it performs rebase.
"git svn dcommit" calls "git diff-index HEAD".

According to the documentation "git diff-index HEAD" performs the check I need. 
But I've discovered that in the case of "both deleted" conflict "git diff-index 
HEAD" outputs nothing but rebase still doesn't want to run. 

So, at least either "git diff-index HEAD" or its documentation and "git-svn" 
should be fixed, I think.

And I'm still asking for the fastest method that could predict that working 
tree and index are clean, no conflict, and I can run "git rebase".


A simple script to generate "both deleted":

#!/bin/sh

git init
touch foo
git add foo
git commit -m 'initial commit'
git checkout -b tmp
git mv foo X
git commit -m 'rename to X'
git checkout -
git mv foo Y
git commit -m 'rename to Y'
git merge tmp
git add Y
git rm X
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]