Skip to content

Commit

Permalink
Merge branch 'en/d-f-conflict-fix'
Browse files Browse the repository at this point in the history
* en/d-f-conflict-fix:
  fast-export: ensure that a renamed file is printed after all references
  • Loading branch information
Junio C Hamano committed Sep 8, 2010
2 parents 7505ae2 + 4ce6fb8 commit 9f44723
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion builtin/fast-export.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,15 @@ static int depth_first(const void *a_, const void *b_)
cmp = memcmp(name_a, name_b, len);
if (cmp)
return cmp;
return (len_b - len_a);
cmp = len_b - len_a;
if (cmp)
return cmp;
/*
* Move 'R'ename entries last so that all references of the file
* appear in the output before it is renamed (e.g., when a file
* was copied and renamed in the same commit).
*/
return (a->status == 'R') - (b->status == 'R');
}

static void show_filemodify(struct diff_queue_struct *q,
Expand Down

0 comments on commit 9f44723

Please sign in to comment.