projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d95ee9
)
Fix SIGSEGV on unmerged files in git-diff-files -p
author
Linus Torvalds
<torvalds@ppc970.osdl.org>
Wed, 8 Jun 2005 18:31:53 +0000
(11:31 -0700)
committer
Linus Torvalds
<torvalds@ppc970.osdl.org>
Wed, 8 Jun 2005 18:31:53 +0000
(11:31 -0700)
NULL is not considered a VALID pathspec.
diffcore.h
patch
|
blob
|
history
diff --git
a/diffcore.h
b/diffcore.h
index f1b5ca748cae8d40f599552c3605080808da7803..ac159d7154ce02034eb88dab279894e5572da7b6 100644
(file)
--- a/
diffcore.h
+++ b/
diffcore.h
@@
-33,7
+33,7
@@
struct diff_filespec {
* if false, use the name and read from
* the filesystem.
*/
-#define DIFF_FILE_VALID(spec) (((spec)->mode) != 0)
+#define DIFF_FILE_VALID(spec) ((
spec) && (
(spec)->mode) != 0)
unsigned should_free : 1; /* data should be free()'ed */
unsigned should_munmap : 1; /* data should be munmap()'ed */
};