All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Alexander Kuleshov <kuleshovmail@gmail.com>
Cc: Jeff King <peff@peff.net>, "git\@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [PATCH] format-patch: introduce format.outputDirectory configuration
Date: Fri, 19 Jun 2015 08:59:59 -0700	[thread overview]
Message-ID: <xmqq616jbse8.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CANCZXo72BscpXKGAtVPt_1QuffcOpTz6nGB+__q0JLisuTaKsQ@mail.gmail.com> (Alexander Kuleshov's message of "Fri, 19 Jun 2015 19:33:01 +0600")

Alexander Kuleshov <kuleshovmail@gmail.com> writes:

> 2015-06-19 3:46 GMT+06:00 Junio C Hamano <gitster@pobox.com>:
>> I agree with "later -o should override an earlier one", but I do not
>> necessarily agree with "'-o -' should be --stdout", for a simple
>> reason that "-o foo" is not "--stdout >foo".
>>
>> Perhaps something like this to replace builtin/ part of Alexander's
>> patch?
>>
>> @@ -1337,6 +1342,9 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
>>                 die (_("--subject-prefix and -k are mutually exclusive."));
>>         rev.preserve_subject = keep_subject;
>>
>> +       if (!output_directory && !use_stdout)
>> +               output_directory = config_output_directory;
>> +
>>
>
> But there is following condition above:
>
>  if (!use_stdout)
>       output_directory = set_outdir(prefix, output_directory);
>
> After which output_directory will be "./" everytime and
>
>>
>> +       if (!output_directory && !use_stdout)
>> +               output_directory = config_output_directory;
>> +
>>
>
> will not work here.

I thought I made that "if we did not see '-o dir' on the command
line, initialize output_directory to what we read from the config"
before we make a call to set_outdir().

What I am missing?  

Puzzled...  FWIW, IIRC, the patch you are responding to passed the
test you added.

  reply	other threads:[~2015-06-19 16:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-18 11:18 [PATCH] format-patch: introduce format.outputDirectory configuration Alexander Kuleshov
2015-06-18 17:13 ` Junio C Hamano
2015-06-18 19:57   ` Jeff King
2015-06-18 20:05     ` Junio C Hamano
2015-06-18 20:06       ` Junio C Hamano
2015-06-18 20:13         ` Jeff King
2015-06-18 20:22           ` Jeff King
2015-06-18 21:46             ` Junio C Hamano
2015-06-19  4:14               ` Jeff King
2015-06-19  7:06                 ` Alexander Kuleshov
2015-06-19 13:33               ` Alexander Kuleshov
2015-06-19 15:59                 ` Junio C Hamano [this message]
2015-06-19 17:19                   ` Alexander Kuleshov
2015-06-19 17:27                     ` Alexander Kuleshov
2015-06-19 17:49                       ` Alexander Kuleshov
2015-06-19 18:14                       ` Junio C Hamano
2015-06-19 11:34 ` Remi Galan Alfonso
2015-06-19 11:34   ` Alexander Kuleshov

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=xmqq616jbse8.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=kuleshovmail@gmail.com \
    --cc=peff@peff.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.