git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Charles Bailey <charles@hashpling.org>
To: Grzegorz Kossakowski <grek@tuffmail.com>
Cc: git@vger.kernel.org
Subject: Re: git-mergetool changes file rights?
Date: Sat, 7 Mar 2009 19:48:21 +0000	[thread overview]
Message-ID: <20090307194821.GA29312@hashpling.org> (raw)
In-Reply-To: <49B298FA.2050803@tuffmail.com>

On Sat, Mar 07, 2009 at 04:55:38PM +0100, Grzegorz Kossakowski wrote:
> grek@linux-p3yg:~/asf/git/infrastructure/apache-git-mirrors/bin> git mergetool
> merge tool candidates: kdiff3 kdiff3 tkdiff xxdiff meld gvimdiff opendiff emerge vimdiff
> Merging the files: email-update.sh
> 
> Normal merge conflict for 'email-update.sh':
>   {local}: modified
>   {remote}: modified
> Hit return to start merge resolution tool (kdiff3):
> error: open("bin/email-update.sh"): Permission denied
> error: unable to index file bin/email-update.sh
> fatal: updating files failed

Looking at this sequence of error messages it looks like mergetool ran
kdiff3 and this 'succeeded', but when mergetool came to 'git add' the
result of the merge it fell over in a heap because it couldn't read
the file because of the strange ---x------ permissions.

mergetool just uses mv to create a backup of the to-be-merged path and
then uses cp to recreate the original path before invoking kdiff3. I
haven't managed to get cp to do anything other that use the same mode
as the source file for a copied file.

What version of kdiff3 are you using? I ask because this fix looks
like it may be relevant:

http://kdiff3.svn.sourceforge.net/viewvc/kdiff3/trunk/kdiff3/src-QT4/fileaccess.cpp?r1=84&r2=96

The changelog for 0.9.95 includes this:

- Fixed permissions when writing executable file. (Un*x only)

-- 
Charles Bailey
http://ccgi.hashpling.plus.com/blog/

  reply	other threads:[~2009-03-07 19:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-07 15:55 git-mergetool changes file rights? Grzegorz Kossakowski
2009-03-07 19:48 ` Charles Bailey [this message]
2009-03-07 19:54   ` Grzegorz Kossakowski

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=20090307194821.GA29312@hashpling.org \
    --to=charles@hashpling.org \
    --cc=git@vger.kernel.org \
    --cc=grek@tuffmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).