Re: [PATCH] git send-email: allow any rev-list option as an argument.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 04, 2008 at 01:04:27AM +0000, Junio C Hamano wrote:
> Pierre Habouzit <madcoder@xxxxxxxxxx> writes:
> 
> > As a summary, I'd say that I like both (1) and (3) because those are
> > handy, short, and either completely or mostly backward compatible. My
> > way would be to go down (1) and add a alias.s-e = !git send-email -F in
> > my .gitconfig.
> >
> > What do you think ?
> 
> I wonder if we can do this even without an explicit -F.
> 
> What command line arguments does send-email take, and what options would
> we want to give the underlying format-patch?  Can't you sift them without
> ambiguity?
> 
> The current syntax is:
> 
>     git send-email <flags>... <file|dir>...
> 
> I am wondering if we can just extend it to:
> 
>     git send-email <flags>... <<file|dir>...|rev>
> 
> E.g. we should be able to parse this out:
> 
>     git send-email --to git@xxxxxxxxxxxxxxx -M --suppress-cc=all origin
> 
> and notice "--to git@xxxxxxxxxxxxxxx" and "--suppress-cc" are for
> send-email, guess "-M" (or anything that is outside the current
> send-email's vocabulary) is meant for format-patch, and if there is no
> file or directory called "origin" then decide that the user wants to run
> format-patch, and act as a front-end as if the user did:
> 
> 	git format-patch -o tmp.$$ -M origin &&
>         ... perhaps do your --annotate and --compose here by launching
>         ... the editor...
>         git send-email --to git@xxxxxxxxxxxxxxx --suppress-cc=all tmp.$$ &&
> 	rm -fr tmp.$$
> 
> If you happen to have a file or a directory called origin, it would be
> safer for users if the command errored out asking for disambiguation.  The
> user can either say "./origin" or "origin^0" to disambiguate between them.

Oh right you can disambiguate references using ^0 so maybe my proposal
works after all, though it has to check for each file name if it's not a
reference _also_. I like it. I will rework my patch series now then,
since most of the discussed points of them have been addressed in the
thread.

-- 
·O·  Pierre Habouzit
··O                                                madcoder@xxxxxxxxxx
OOO                                                http://www.madism.org

Attachment: pgpSeG8wIuzm9.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux