Skip to content

Commit

Permalink
[PATCH] Remove final newline from the value of xfrm_msg variable.
Browse files Browse the repository at this point in the history
This change makes the implementation of git-external-diff-script
cleaner.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Junio C Hamano authored and Linus Torvalds committed May 29, 2005
1 parent 903d475 commit 09d9d1a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ static void builtin_diff(const char *name_a,
printf("new mode %s\n", temp[1].mode);
}
if (xfrm_msg && xfrm_msg[0])
fputs(xfrm_msg, stdout);
puts(xfrm_msg);

if (strncmp(temp[0].mode, temp[1].mode, 3))
/* we do not run diff between different kind
Expand Down Expand Up @@ -622,7 +622,7 @@ static void diff_flush_patch(struct diff_filepair *p)
sprintf(msg_,
"similarity index %d%%\n"
"copy from %s\n"
"copy to %s\n",
"copy to %s",
(int)(0.5 + p->score * 100.0/MAX_SCORE),
p->one->path, p->two->path);
msg = msg_;
Expand All @@ -631,7 +631,7 @@ static void diff_flush_patch(struct diff_filepair *p)
sprintf(msg_,
"similarity index %d%%\n"
"rename old %s\n"
"rename new %s\n",
"rename new %s",
(int)(0.5 + p->score * 100.0/MAX_SCORE),
p->one->path, p->two->path);
msg = msg_;
Expand Down
2 changes: 1 addition & 1 deletion git-external-diff-script
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ then
echo "new mode $mode2"
if test "$xfrm_msg" != ""
then
echo -n $xfrm_msg
echo "$xfrm_msg"
fi
fi
diff ${GIT_DIFF_OPTS-'-pu'} -L "a/$name1" -L "b/$name2" "$tmp1" "$tmp2"
Expand Down

0 comments on commit 09d9d1a

Please sign in to comment.