summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 20fa04e)
raw | patch | inline | side by side (parent: 20fa04e)
author | Theodore Ts'o <tytso@mit.edu> | |
Tue, 27 Mar 2007 22:00:03 +0000 (18:00 -0400) | ||
committer | Theodore Ts'o <tytso@mit.edu> | |
Thu, 29 Mar 2007 16:22:48 +0000 (12:22 -0400) |
If the file we are trying to merge resolve is in git-ls-files -u, then
skip the file existence test. If the file isn't reported in
git-ls-files, then check to see if the file exists or not to give an
appropriate error message.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
skip the file existence test. If the file isn't reported in
git-ls-files, then check to see if the file exists or not to give an
appropriate error message.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
git-mergetool.sh | patch | blob | history |
diff --git a/git-mergetool.sh b/git-mergetool.sh
index 340182335095dcf3a5201dfffcd3756498950352..fa301add3f2705ed02752c935c78afbfa2f48da2 100755 (executable)
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
merge_file () {
path="$1"
- if test ! -f "$path" ; then
- echo "$path: file not found"
- exit 1
- fi
-
f=`git-ls-files -u -- "$path"`
if test -z "$f" ; then
- echo "$path: file does not need merging"
+ if test ! -f "$path" ; then
+ echo "$path: file not found"
+ else
+ echo "$path: file does not need merging"
+ fi
exit 1
fi