From: jateeq <jawad_atiq@hotmail.com>
To: git@vger.kernel.org
Subject: Re: How do I get the correct modification status after running git diff?
Date: Thu, 4 Mar 2010 08:11:13 -0800 (PST) [thread overview]
Message-ID: <27782895.post@talk.nabble.com> (raw)
In-Reply-To: <27782430.post@talk.nabble.com>
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.
next prev parent reply other threads:[~2010-03-04 16:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-04 15:40 How do I get the correct modification status after running git diff? jateeq
2010-03-04 16:11 ` jateeq [this message]
2010-03-04 16:34 ` Michael J Gruber
2010-03-04 16:39 ` Andreas Schwab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=27782895.post@talk.nabble.com \
--to=jawad_atiq@hotmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.