Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
completion: For consistency, change "git rev-parse" to __gitdir calls
[gitweb.git]
/
git-merge-one-file.sh
diff --git
a/git-merge-one-file.sh
b/git-merge-one-file.sh
index 9ee3f804520eadb322de3d0ea70a2bf9f092b089..e1eb9632660146396a0b5f3f2a410d8cb027ff9d 100755
(executable)
--- a/
git-merge-one-file.sh
+++ b/
git-merge-one-file.sh
@@
-48,10
+48,11
@@
case "${1:-.}${2:-.}${3:-.}" in
;;
"..$3")
echo "Adding $4"
- test -f "$4" || {
+ if test -f "$4"
+ then
echo "ERROR: untracked $4 is overwritten by the merge."
exit 1
- }
+ fi
git update-index --add --cacheinfo "$7" "$3" "$4" &&
exec git checkout-index -u -f -- "$4"
;;