Skip to content

Commit

Permalink
Use extended SHA1 syntax in merge-recursive conflicts.
Browse files Browse the repository at this point in the history
When we get a line-level conflict in merge-recursive and print out
the two sides in the conflict hunk header and footer we should use
the standard extended SHA1 syntax to specify the specific blob,
as this allows the user to copy and paste the line right into
'git show' to view the complete version.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Shawn O. Pearce authored and Junio C Hamano committed Dec 23, 2006
1 parent 6be9351 commit d9606e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions merge-recursive.c
Original file line number Diff line number Diff line change
Expand Up @@ -649,8 +649,8 @@ static struct merge_file_info merge_file(struct diff_filespec *o,
char *name1, *name2;
int merge_status;

name1 = xstrdup(mkpath("%s/%s", branch1, a->path));
name2 = xstrdup(mkpath("%s/%s", branch2, b->path));
name1 = xstrdup(mkpath("%s:%s", branch1, a->path));
name2 = xstrdup(mkpath("%s:%s", branch2, b->path));

fill_mm(o->sha1, &orig);
fill_mm(a->sha1, &src1);
Expand Down

0 comments on commit d9606e8

Please sign in to comment.