Version: git master (using KDE 4.7.1) OS: Linux 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? Reproducible: Didn't try Steps to Reproduce: 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 Actual Results: First diff does not include the new file. Expected Results: Second diff includes the new file.
Why do you want the new files on the diff?
(In reply to comment #1) > Why do you want the new files on the diff? My use case? As a KDE Developer, I need the new files I create when I implement new features to be submitted in the review patch. In general, I think you can always find use cases where you need the new files included in the patch and use cases where you don't, so it's just a matter of which case do we want to support, or change the UI to opt in/out the new files.
instead of "git diff HEAD" you probably want "git diff --cached" no?
Git commit 91cb3d32588b7f5a3d866805e4583caa464c81cd by Aleix Pol. Committed on 05/10/2011 at 02:35. Pushed by apol into branch 'master'. In case we're comparing BASE to WORKING, add the staged changes as well. BUG: 283352 M +12 -3 plugins/git/gitplugin.cpp M +1 -2 plugins/git/gitplugin.h http://commits.kde.org/kdevplatform/91cb3d32588b7f5a3d866805e4583caa464c81cd