top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration
Print Preview

Check out doesn't set x-flag on CIFS

+1 vote

When on a CIFS filesystem a git checkout does not replicate the executable flag from the repository:

 $ git clone git://git/abettersqlplus
 Cloning into 'abettersqlplus'...
 remote: Counting objects: 522, done.
 remote: Compressing objects: 100% (342/342), done.
 remote: Total 522 (delta 166), reused 522 (delta 166)
 Receiving objects: 100% (522/522), 82.40 KiB, done.
 Resolving deltas: 100% (166/166), done.
 $ ls -l abettersqlplus/
 -rw-rw-r-- 1 aesser geneity 45860 May 29 14:46 abettersqlplus/

Subsequently git status reports the file as changed:

 $ cd abettersqlplus/
 $ git status
 # On branch master
 # Changes not staged for commit:
 # (use "git add ..." to update what will be committed)
 # (use "git checkout -- ..." to discard changes in working directory)
 # modified:

no changes added to commit (use "git add" and/or "git commit -a")
If I set the x-flag manually, all is well:

 $ chmod +x
 $ git status
 # On branch master

nothing to commit (working directory clean)

This problem doesn't occur on ext3 or NFS file systems. Client is Ubuntu 12.04 with git version CIFS is exported from Ubuntu 12.04 with Samba version 3.6.3.

Since git recognises the x-flag on this CIFS file system, shouldn't it also be able to set it on checkout?

posted May 29, 2013 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

Similar Questions
0 votes

we're evaluating Git to be used in our companies Tool. But a hard requirement is the possibility to set an "intend-to-edit" flag on a file (better path). Notice that I did not use the word "lock"! :-)

One easy implementation might be a special branch "XYZ-locks" that contains an empty blob for every flagged file. So our tool just needs to check, whether a blob exists for the path that's intended to edit, tries to push a commit that touches the file and only allows editing if the push succeeds.

Does anybody have a better idea, maybe with notes?

0 votes

I am unable to clone my repository. I get a message of out of memory. The server is located on Hyper-V running on Win Server 2008 R2 SP-1
The OS is Windows 7 64BIT.

+1 vote

I'm using git 1.9.1 in Ubuntu 14.04.

I have a repository on github, a clone on my desktop and bare repo on a private server, in my desktop the remotes looks like this

all (fetch)
all (push)
all (push)
server (fetch)
server (push)
origin (fetch)
origin (push)

If I commit to master in my desktop and run 'git push all master', the github and the server repos are correctly updated, but if I run 'git status' the message says:

Your branch is ahead of 'origin/master' by 1 commit.
 (use "git push" to publish your local commits)

The message won't update unless I run git fetch or git push origin master. I'd expect the git status to give me a updated status message after calling 'git push all master'.

+2 votes

I just want to know why GIT doesnt track read/write permission? What I want is just GIT keep what every I checked in? ( I am OK with the executable permission control)

Useful Links with Similar Problem
Contact Us
+91 9880187415
#470/147, 3rd Floor, 5th Main,
HSR Layout Sector 7,
Bangalore - 560102,
Karnataka INDIA.