path: root/diffcore-pickaxe.c
diff options
authorJunio C Hamano <>2005-05-22 02:42:18 (GMT)
committerLinus Torvalds <>2005-05-22 05:49:19 (GMT)
commit81e50eabf06dd68e8e62a9b697eaf60904c58b22 (patch)
treef7cf8566f2a72a669b6e4bbaca0cf6ca5a781dd3 /diffcore-pickaxe.c
parent38c6f78059c3060db6f94b24f4a90063a91090d2 (diff)
[PATCH] The diff-raw format updates.
Update the diff-raw format as Linus and I discussed, except that it does not use sequence of underscore '_' letters to express nonexistence. All '0' mode is used for that purpose instead. The new diff-raw format can express rename/copy, and the earlier restriction that -M and -C _must_ be used with the patch format output is no longer necessary. The patch makes -M and -C flags independent of -p flag, so you need to say git-whatchanged -M -p to get the diff/patch format. Updated are both documentations and tests. Signed-off-by: Junio C Hamano <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'diffcore-pickaxe.c')
1 files changed, 3 insertions, 3 deletions
diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c
index 9b9d0b7..0bad705 100644
--- a/diffcore-pickaxe.c
+++ b/diffcore-pickaxe.c
@@ -32,14 +32,14 @@ void diff_pickaxe(const char *needle)
for (i = 0; i < q->nr; i++) {
struct diff_filepair *p = q->queue[i];
- if (!p->one->file_valid) {
- if (!p->two->file_valid)
+ if (!DIFF_FILE_VALID(p->one)) {
+ if (!DIFF_FILE_VALID(p->two))
continue; /* ignore nonsense */
/* created */
if (contains(p->two, needle, len))
diff_queue(&outq, p->one, p->two);
- else if (!p->two->file_valid) {
+ else if (!DIFF_FILE_VALID(p->two)) {
if (contains(p->one, needle, len))
diff_queue(&outq, p->one, p->two);