Re: About -X<option>

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

 



Hi,

On Sat, 5 Jul 2008, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:
> 
> > Isn't that obvious?  -X looks like a short option, but the rest of 
> > that string does not consist of aggregated short options.
> 
> Ah, I see.  Then the issue is not about "not easy to code" but about "not
> being consistent".

I never meant to say "easy to code".  I always meant "not possible with 
parseopt, without major -- and ugly -- surgery".

> We can change it to "--X<option>[=<value>]" and "-X option[=<value>]"; 
> the topic is still young, not even documented properly IIRC, and is not 
> scheduled for 'master' any time soon yet.

I feel that this is too limiting.  You really do not want to allow passing 
"theirs" to git-merge, when you only ask for stratgey "resolve", right?  
Because the "resolve" strategy never heard about "theirs".

To be frank, the semantics of "theirs" _wants_ to treat it as a strategy; 
just think of

	$ git merge -s ours -Xtheirs

Besides, I sincerely doubt that anybody will find the naming of "-X" 
intuitive.

But let's step back a little: "theirs" is most likely something we do not 
want to announce, since a careful review in case of merge conflicts should 
be performed in that case.

So we do not want official support for it.

And there comes in an aspect of the broader plan for the second half of 
Miklos' project: user-defined merge backends.

By allowing users to put a script in their PATH (possibly resorting to "." 
just for that script), named "git-merge-<mybackend>", the following 
becomes possible:

	$ echo 'git merge-recursive --theirs "$@"' > ~/bin/git-merge-X
	$ chmod a+x ~/bin/git-merge-X
	$ git merge -s X

This would be even more flexible than the "-X" option, and it would 
properly keep "--theirs" out of our officially supported features.

If we feel like it, we could even accept a "git-merge-partially-theirs" 
into contrib/.

Ciao,
Dscho

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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