From 06aff47b225506c4603a6f5ec5b4b16aa6a9d7ba Mon Sep 17 00:00:00 2001 From: Alex Riesen Date: Sun, 25 Mar 2007 01:56:13 +0100 Subject: Use diff* with --exit-code in git-am, git-rebase and git-merge-ours This simplifies the shell code, reduces its memory footprint, and speeds things up. The performance improvements should be noticable when git-rebase works on big commits. Signed-off-by: Alex Riesen Signed-off-by: Junio C Hamano --- git-merge-ours.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-merge-ours.sh') diff --git a/git-merge-ours.sh b/git-merge-ours.sh index 4f3d053889..2b6a5c0d10 100755 --- a/git-merge-ours.sh +++ b/git-merge-ours.sh @@ -9,6 +9,6 @@ # because the current index is what we will be committing as the # merge result. -test "$(git-diff-index --cached --name-status HEAD)" = "" || exit 2 +git-diff-index --quiet --cached HEAD || exit 2 exit 0 -- cgit v1.2.3