[Git Plugin] Diff with New Files
david.narvaez at computer.org
Tue Oct 4 17:38:54 UTC 2011
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...
More information about the KDevelop-devel