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

Re: recommendation for patch maintenance

From
Manlio Perillo <manlio.perillo@gmail.com>
Date
Dec 21, 2012, 21:30 UTC
Message-ID
<50D4D511.4010003@gmail.com>
In-Reply-To
<7vip7v1d96.fsf@alter.siamese.dyndns.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Il 21/12/2012 19:17, Junio C Hamano ha scritto:
Show 12 quoted lines
> [...]
> Of course you can plan ahead (this is what I usually do when working
> on a series that is not "how about this" throw-away patch I send to
> this list all the time) and name the topic "topic-v1", fork the new
> round "topic-v2", "topic-v3", etc. and do things like
> 
>     $ sh -c 'git diff topic-v2~$1 topic-v3~$1' - 4
> 
> (the point being that then you do ^P or whatever shell command
> history mechanism to recall that line, edit "4" to "3" and rerun the
> comparison for other corresponding ones).
> 

Thanks, this seems fine. Maybe topic-v2 --> topic/v2 (it looks better to me).

Show 18 quoted lines
> On a related but different front, I've been thinking about improving
> the "format-patch --subject-prefix" mechanism to make it even easier
> to use.
>
> [...]
>
> What if we added another option, say --reroll $n (or -v$n), to let
> you write:
> 
>     $ git format-patch --cover-letter -v4 -o ./+mp master
> 
> that produces output files named like:
> 
>     ./+mp/v4-0000-cover-letter.txt
>     ./+mp/v4-0001-git-completion.bash.add-support-for-pa.txt
> 
> with the subject '[PATCH v4]' prefix?
> 

I think it is a good idea to reduce the things one have to do by hand. I, too, was thinking something similar, with a -v$n option.

And, from these few days I have started to follow the mailing list, it seems that '[PATCH v$n'] is the standard practice.

By the way, I would also like to be able to set the default value for the --output option in config file; something like:

  [format]
  output = +mp/$(git symbolic-ref --short HEAD)
where the string will be processed by the shell:
   sh -c 'printf "+mp/$(git symbolic-ref --short HEAD)'"

Note that printf is POSIX, and the standard suggests to use it instead of echo: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html

I have read the affected source code, and it should not be too hard. What do you think?

I should be able to hack the patch in the weekend, but I'm not sure it will be accepted.

Show 7 quoted lines
> Then you can transplant the cover letter material from the cover
> letter from the older iteration to the new cover letter in your
> editor, and sending them out will become
> 
>     $ git send-email ... ./+mp/v4-*.txt
> 
> Hmm?
Seems good.
Regards   Manlio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlDU1REACgkQscQJ24LbaUT5dgCgismeh+R3B26otuBIXRf/VUiq +5gAoIR56wVfs8Vw8AAWtim4aor97MXN =DfeG -----END PGP SIGNATURE-----

Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 6 in “recommendation for patch maintenance”
  1. Manlio PerilloDec 21, 2012
  2. Junio C HamanoDec 21, 2012
  3. Manlio PerilloDec 21, 2012
  4. Junio C HamanoDec 21, 2012
  5. Manlio PerilloDec 21, 2012
  6. Junio C HamanoDec 21, 2012

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.