From: Petr Baudis <pasky@ucw.cz>
To: torvalds@osdl.org
Cc: git@vger.kernel.org
Subject: [PATCH] Fix git-merge-one-file permissions auto-merging
Date: Wed, 8 Jun 2005 23:26:55 +0200 [thread overview]
Message-ID: <20050608212655.GQ982@pasky.ji.cz> (raw)
In the automerge case, permissions were not restored properly after the
merge tool was invoked and overwrote the target file.
Signed-off-by: Petr Baudis <pasky@ucw.cz>
---
commit d0a0933d6ed6190a767f6baad6c93aa79b3901b2
tree 0a278964e7cd15b2f35b00551747c4908d65b244
parent 9d6694e94c2ff7fc24ecb4124234cef6c6037ad5
author Petr Baudis <pasky@ucw.cz> Wed, 08 Jun 2005 23:26:23 +0200
committer Petr Baudis <xpasky@machine.sinus.cz> Wed, 08 Jun 2005 23:26:23 +0200
git-merge-one-file-script | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/git-merge-one-file-script b/git-merge-one-file-script
--- 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"
+
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
|
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
<Espy> be careful, some twit might quote you out of context..
reply other threads:[~2005-06-08 21:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050608212655.GQ982@pasky.ji.cz \
--to=pasky@ucw.cz \
--cc=git@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox