git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: SH <saajey@yahoo.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: file permissions in Git repo
Date: Thu, 16 Jan 2014 21:26:23 -0500	[thread overview]
Message-ID: <20140117022623.GC12444@sigill.intra.peff.net> (raw)
In-Reply-To: <1389916737.92225.YahooMailNeo@web124906.mail.ne1.yahoo.com>

On Thu, Jan 16, 2014 at 03:58:57PM -0800, SH wrote:

> We have a repository which holds lots of shell and perl scripts. We add the
> files to repository (from windows client) with executable permissions (using
> cygwin) but when we pull that repository on another machine (windows or linux),
> files dont have executable permission. Can you please provide a solutions for
> this?

Git does not preserve file permissions _except_ for the executable bit.
So this should be working.

However, I suspect that `core.fileMode` is set to `false` in your
repository, which causes git to ignore the executable bit. When a
repository is initialized, we check whether the filesystem simply
creates everything with the executable bit. If so, we turn off
core.fileMode for the repository (since otherwise every file would have
it set).

-Peff

  reply	other threads:[~2014-01-17  2:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-16 23:58 file permissions in Git repo SH
2014-01-17  2:26 ` Jeff King [this message]
2014-01-17 18:08   ` Torsten Bögershausen
2014-01-17 19:20     ` SH
2014-01-17 19:55       ` Torsten Bögershausen
2014-01-17 20:11         ` SH

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=20140117022623.GC12444@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=saajey@yahoo.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).