Re: [RFC] Add a suffix option to git-format-patch
- From
- Josh Boyer <jwboyer@gmail.com>
- Date
- Jan 17, 2007, 14:50 UTC
- Message-ID
- <625fc13d0701170650j5a9eb7dbyc7527d9c2b999076@mail.gmail.com>
- In-Reply-To
- <Pine.LNX.4.63.0701171446410.22628@wbgn013.biozentrum.uni-wuerzburg.de>
On 1/17/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 23 quoted lines
> Hi, > > On Wed, 17 Jan 2007, Josh Boyer wrote: > > > Could we add an option to git-format-patch to use ".patch" as the file > > suffix instead of ".txt"? Something like the below? > > > > diff --git a/builtin-log.c b/builtin-log.c > > index a59b4ac..4eb2d32 100644 > > --- a/builtin-log.c > > +++ b/builtin-log.c > > @@ -217,6 +217,7 @@ static int git_format_config(const char *var, > > const char *value) > > > > static FILE *realstdout = NULL; > > static const char *output_directory = NULL; > > +static int psuffix = 0; > > Why not > > static const char *file_extension = ".txt" > > Hmm?
Yes, that's better. I was more going for "would something like this option be accepted" to start with. And I'm lazy, so the patch I wrote was just an example for my specific use case :).
> You'd call it with "--extension=.patch", and if you really want, you can > make a config variable from it.
Good idea. I'll try and get this done soon-ish. I'm not very familiar with the git code, so if someone beats me to it, I won't be disappointed in the least ;)
josh