[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Git merge missing file permissions


git update-index --chmod=+x file
git commit


On Dec 6, 2013, at 7:42 AM, Mateus Caruccio <mateus caruccio getupcloud com> wrote:

While creating an app from a downloadable cart and quickstart (both pretty simple) I got this behavior. Maybe it's only me misunderstanding how git works, but definitely not what I was expecting.

$ git --version
git version (Apple Git-47)

# go to /tmp and create two repos, "a" and "b"

$ git init /tmp/a
$ git init /tmp/b
$ cd /tmp/a/
$ echo 'i am a' > file
$ git add file
$ git commit file -m 'add to a'

# init repo "b" and set exec bits of "file" 

$ cd /tmp/b
$ echo 'i am b' > file
$ git add file;
$ git commit file -m 'add to b'
$ chmod +x file                       <--- chmod "upstream" repo
$ git commit -a -m 'exec perm'

# go back to "a" and do a recursive merge

$ cd /tmp/a/
$ git remote add upstream /tmp/b
$ git pull -s recursive -X theirs upstream master
$ cat file
i am b
$ ls -l file
-rw-r--r--  1 mateus  wheel  7  6 Dez 13:28 file

What I get from now on is a properly merged file content but "old/local-repo" permission bits.

Now I have to ask you:
- Is this the real life?
- Is this just fantasy?
- Is this me not reading all git man pages?

Mateus Caruccio
Master of Puppets
+55 (51) 8298.0026
gtalk: mateus caruccio getupcloud com
twitter: @MateusCaruccio

This message and any attachment are solely for the intended
recipient and may contain confidential or privileged information
and it can not be forwarded or shared without permission.
Thank you!
dev mailing list
dev lists openshift redhat com

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]