From: "René Scharfe" <rene.scharfe@lsrfire.ath.cx>
To: Jacek Masiulaniec <jacekm@dobremiasto.net>
Cc: git@vger.kernel.org
Subject: Re: git archive: tar.umask ignored
Date: Tue, 12 Apr 2011 20:19:35 +0200 [thread overview]
Message-ID: <4DA497B7.706@lsrfire.ath.cx> (raw)
In-Reply-To: <BANLkTimTs+Qh9fNs6pLcZidYy-YjXNR2iw@mail.gmail.com>
Am 12.04.2011 11:39, schrieb Jacek Masiulaniec:
> Hello git@,
>
> I believe git has an issue with command line override of configuration options.
> Notice how in both cases below the file mode is 775 despite tar.umask
> difference:
>
> [jacekm@localhost git]$ ./git --version
> git version 1.7.4.4
> [jacekm@localhost git]$ ./git archive --remote=/repo/website.git HEAD
> | tar -tvf - | head -1
> drwxrwxr-x root/root 0 2011-04-11 13:47:09 bin/
> [jacekm@localhost git]$ ./git -c tar.umask=0022 archive
> --remote=/repo/website.git HEAD | tar -tvf - | head -1
> drwxrwxr-x root/root 0 2011-04-11 13:47:09 bin/
> [jacekm@localhost git]$
>
> In contrast, tweaking tar.umask in ~/.gitconfig does have the desired
> impact on the file mode.
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.
If --remote is specified then the local archive process just passes all
command line options (except --remote itself, --output and --exec) to
the other side which then does all the actual work. The config option
tar.umask is not even read in that case.
We'd need to read all relevant config settings (from the command line,
and perhaps the user's config file and the system-wide one, but not the
ones from any local repository) and then pass them over somehow. We
could piggy-back on the existing command line option passing, but for
that we'd need to add new command line options. OK, just a single one,
because archive only recognizes tar.umask currently.
Would a new --umask command line option alone (that overrides any config
setting) be sufficient for your use case?
Thanks,
René
next prev parent reply other threads:[~2011-04-12 18:20 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 [this message]
2011-04-12 20:02 ` René Scharfe
2011-04-12 20:39 ` Jacek Masiulaniec
2011-04-14 18:04 ` René Scharfe
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=4DA497B7.706@lsrfire.ath.cx \
--to=rene.scharfe@lsrfire.ath.cx \
--cc=git@vger.kernel.org \
--cc=jacekm@dobremiasto.net \
/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).