提交 792fe559 编写于 作者: J Junio C Hamano

Fix "git-diff-script A B"

When "git-diff-script A..B" notation was introduced, it ended up breaking
the traditional two revisions notation.

[jc: there are other issues with the current "git diff" I would like to
 address, but they would be left to later rounds.  For example, -M and -p flags
 should not be hardcoded default, and it shouldn't be too hard to rewrite
 the script without using shell arrays.]
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 56fc5108
......@@ -8,8 +8,14 @@ case "${#rev[*]}" in
1)
git-diff-cache -M -p "$@";;
2)
begin=$(echo "${rev[1]}" | tr -d '^')
end="${rev[0]}"
case "${rev[1]}" in
^?*)
begin=$(echo "${rev[1]}" | tr -d '^')
end="${rev[0]}" ;;
*)
begin="${rev[0]}"
end="${rev[1]}" ;;
esac
git-diff-tree -M -p $flags $begin $end $files;;
*)
echo "I don't understand"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册