[Git Plugin] Diff with New Files

David Narvaez david.narvaez at computer.org
Tue Oct 4 17:38:54 UTC 2011


Hi,

I wanted to draw your attention to the following use case: In git, if you
have changes that include new files these are not shown with git diff, but
with git diff HEAD. So, currently, if I want to generate a patch that
includes new files, I can't do that from the View Differences... menu in the
Git plugin. Would it be good to change the command to git diff HEAD instead?
Would it break anything else?

To replicate this use case you can do the following:

$ mkdir gittest
$ cd gittest
$ git init
$ echo "First file" > first-file
$ git add first-file
$ git commit -m "adding first file"
$ echo "First file modified" > first-file
$ echo "Second file" > second-file
$ git add second-file
$ git diff
$ git diff HEAD

Notice the difference between the last two outputs.

David E. Narvaez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20111004/cab9aab3/attachment.html>


More information about the KDevelop-devel mailing list