Re: How do I get the correct modification status after running git diff?

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

 



Ok, so I think I know what I was doing wrong... i wasn't comparing the
working tree with the last commit (HEAD), although I still don't know what
exactly I was comparing the working tree with. On reading the manual a
little more carefully, I realised the command should have been: 

git diff -M --name-status HEAD

This solves the problem of newly added files, but doesn't show 'R' for
renamed files even after I ask git to detect renamed files - just shows that
the renamed file was deleted (doesn't detect that the new renamed file was
added). So I would still appreciate some input here.

Renaming flie:
mv randomfile.xml random.xml

Diffing:
git diff -M --name-status HEAD

Output:
D      randomfile.xml

Thanks, 
jawad

-- 
View this message in context: http://old.nabble.com/How-do-I-get-the-correct-modification-status-after-running-git-diff--tp27782430p27782895.html
Sent from the git mailing list archive at Nabble.com.

--
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]