Bug in diff header generation
Hello,
I've encountered a small error in the diff header generation when diffing against files which are not tracked by git:
[13:49] mk@crap ~/Projects/git > git diff git.c ~/bin/viname|head
home/mk/bin/viname renamed from git.c +0 -3
@@ -1,416 +1,106 @@ -#include "builtin.h" -#include "exec_cmd.h" -#include "cache.h"
[13:49] mk@crap ~/Projects/git > git diff HEAD:git.c ~/bin/viname|head
home/mk/bin/viname +0 -5
@@ -1,416 +1,106 @@ -#include "builtin.h" -#include "exec_cmd.h" -#include "cache.h" -#include "quote.h" -
When a revision is specified, git-diff prints a/home/mk/bin/viname instead of a/git.c
Because of my final exams I've got no time to look into it right now.
Matthias
Hi,
home/mk/bin/viname
Quoted 2 lines · Matthias Kestenholz
[13:49] mk@crap ~/Projects/git > git diff HEAD:git.c ~/bin/viname|head
home/mk/bin/viname +0
-0
This is intended behaviour. You don't want a Git object name as a file specifier, because you cannot edit a Git object.
Hth,
Dscho