projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] Fix git-merge-one-file permissions auto-merging
[git.git]
/
git-merge-one-file-script
diff --git
a/git-merge-one-file-script
b/git-merge-one-file-script
index
62cbb2a
..
cf42ff6
100755
(executable)
--- a/
git-merge-one-file-script
+++ b/
git-merge-one-file-script
@@
-63,10
+63,14
@@
case "${1:-.}${2:-.}${3:-.}" in
merge -p "$src1" "$orig" "$src2" > "$4"
ret=$?
rm -f -- "$orig" "$src1" "$src2"
merge -p "$src1" "$orig" "$src2" > "$4"
ret=$?
rm -f -- "$orig" "$src1" "$src2"
+
if [ "$6" != "$7" ]; then
echo "ERROR: Permissions $5->$6->$7 don't match."
ret=1
fi
if [ "$6" != "$7" ]; then
echo "ERROR: Permissions $5->$6->$7 don't match."
ret=1
fi
+ case "$6" in *7??) mode=+x;; *) mode=-x;; esac
+ chmod "$mode" "$4"
+
if [ $ret -ne 0 ]; then
# Reset the index to the first branch, making
# git-diff-file useful
if [ $ret -ne 0 ]; then
# Reset the index to the first branch, making
# git-diff-file useful