All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manlio Perillo <manlio.perillo@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: recommendation for patch maintenance
Date: Fri, 21 Dec 2012 22:30:57 +0100	[thread overview]
Message-ID: <50D4D511.4010003@gmail.com> (raw)
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:
> [...]
> 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).

> 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.

> 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-----

  reply	other threads:[~2012-12-21 21:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-21 14:45 recommendation for patch maintenance Manlio Perillo
2012-12-21 17:01 ` Junio C Hamano
2012-12-21 17:29   ` Manlio Perillo
2012-12-21 18:17     ` Junio C Hamano
2012-12-21 21:30       ` Manlio Perillo [this message]
2012-12-21 22:17         ` 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=50D4D511.4010003@gmail.com \
    --to=manlio.perillo@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.