From: Willy Tarreau <w@1wt.eu>
To: Rogan Dawes <discard@dawes.za.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] tar-tree: add the "tar.applyUmask" config option
Date: Thu, 20 Jul 2006 11:55:53 +0200 [thread overview]
Message-ID: <20060720095553.GA10920@1wt.eu> (raw)
In-Reply-To: <44BF507A.4080801@dawes.za.net>
On Thu, Jul 20, 2006 at 11:44:26AM +0200, Rogan Dawes wrote:
> Willy Tarreau wrote:
> >+int git_tar_config(const char *var, const char *value)
> >+{
> >+ if (!strcmp(var, "tar.umask")) {
> >+ if (!strcmp(value, "user")) {
> >+ tar_umask = umask(0);
> >+ umask(tar_umask);
> >+ } else {
> >+ tar_umask = git_config_int(var, value);
>
> Looks like you forgot:
> umask(tar_umask);
not at all : we don't want to change the process's umask, but set the
mask that will be used to position file modes in the output archive.
The reason for umask(tar_umask) above is because you cannot read the
process umask without changing it, so you have to do it twice with a
dummy value first.
> >+ }
> >+ return 0;
> >+ }
> >+ return git_default_config(var, value);
> >+}
>
> Or else move it to just before the "return 0;" line.
>
> Rogan
Regards,
Willy
next prev parent reply other threads:[~2006-07-20 9:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-19 21:40 [PATCH] tar-tree: add the "tar.applyUmask" config option Willy Tarreau
2006-07-19 22:33 ` Junio C Hamano
2006-07-19 22:50 ` Willy Tarreau
2006-07-20 9:30 ` Willy Tarreau
2006-07-20 9:44 ` Rogan Dawes
2006-07-20 9:55 ` Willy Tarreau [this message]
2006-07-19 22:39 ` Johannes Schindelin
2006-07-20 8:14 ` Rene Scharfe
2006-07-24 6:42 ` 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=20060720095553.GA10920@1wt.eu \
--to=w@1wt.eu \
--cc=discard@dawes.za.net \
--cc=git@vger.kernel.org \
/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).