git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git archive: tar.umask ignored

From
René Scharfe <rene.scharfe@lsrfire.ath.cx>
Date
Apr 14, 2011, 18:04 UTC
Message-ID
<4DA73749.40303@lsrfire.ath.cx>
In-Reply-To
<BANLkTinEFPZoaUAc+8F1sPGE636u1vDOZw@mail.gmail.com>
Am 12.04.2011 22:39, schrieb Jacek Masiulaniec:
Show 10 quoted lines
> 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..

Show 6 quoted lines
> 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
 ----------
Previous: Jacek MasiulaniecNext: Junio C Hamano
Message 5 of 6 in “git archive: tar.umask ignored”
  1. Jacek MasiulaniecApr 12, 2011
  2. René ScharfeApr 12, 2011
  3. René ScharfeApr 12, 2011
  4. Jacek MasiulaniecApr 12, 2011
  5. René ScharfeApr 14, 2011
  6. Junio C HamanoApr 14, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.