git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "René Scharfe" <rene.scharfe@lsrfire.ath.cx>
To: Jacek Masiulaniec <jacek.masiulaniec@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: git archive: tar.umask ignored
Date: Thu, 14 Apr 2011 20:04:57 +0200	[thread overview]
Message-ID: <4DA73749.40303@lsrfire.ath.cx> (raw)
In-Reply-To: <BANLkTinEFPZoaUAc+8F1sPGE636u1vDOZw@mail.gmail.com>

Am 12.04.2011 22:39, schrieb Jacek Masiulaniec:
> On 12 April 2011 19:19, René Scharfe<rene.scharfe@lsrfire.ath.cx>  wrote:
>> The local setting of tar.umask does not affect the archive created at the
>> remote end.  If your "remote" repository is in fact located on the same
>> machine and accessed with the same user then of course settings in
>> ~/.gitconfig will take effect.
> 
> I've eventually realised this by reading the source code.  The command
> I actually needed was:
> 
>    cd /repo/website.git&&  git -c tar.umask=0022 archive HEAD

Yes, there's no point in using --remote if you can read the files directly.
I assumed you did that to make the command easier to reproduce by avoiding
to set up a git daemon etc..

> Can't comment on the proposed diff without getting better handle on
> the whole system, but my knee-jerk reaction would be to resist the
> urge to add more switches.  Maybe the existing -c switch could be made
> to cooperate with --remote, or maybe the documentation could be edited
> to make it clearer that -c and --remote are not related in the way I
> had originally assumed.

Yes, the documentation should be updated first.

-- >8 --
Subject: archive: document limitation of tar.umask config setting

The local value of the config variable tar.umask is not passed to the
other side with --remote.  We may want to change that, but for now just
document this fact.

Reported-by: Jacek Masiulaniec <jacek.masiulaniec@gmail.com>
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
---
 Documentation/git-archive.txt |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Documentation/git-archive.txt b/Documentation/git-archive.txt
index f2b8684..9c750e2 100644
--- a/Documentation/git-archive.txt
+++ b/Documentation/git-archive.txt
@@ -98,7 +98,8 @@ tar.umask::
 	tar archive entries.  The default is 0002, which turns off the
 	world write bit.  The special value "user" indicates that the
 	archiving user's umask will be used instead.  See umask(2) for
-	details.
+	details.  If `--remote` is used then only the configuration of
+	the remote repository takes effect.
 
 ATTRIBUTES
 ----------

  reply	other threads:[~2011-04-14 18:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-12  9:39 git archive: tar.umask ignored Jacek Masiulaniec
2011-04-12 18:19 ` René Scharfe
2011-04-12 20:02   ` René Scharfe
2011-04-12 20:39   ` Jacek Masiulaniec
2011-04-14 18:04     ` René Scharfe [this message]
2011-04-14 22:57       ` Junio C Hamano

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=4DA73749.40303@lsrfire.ath.cx \
    --to=rene.scharfe@lsrfire.ath.cx \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jacek.masiulaniec@gmail.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).