Subject: Re: [RFC/PATCH] git push usability improvements and default change

From: Finn Arne Gangstad <[email-masked]>
Date: Tue, 10 Mar 2009 23:04:00 +0100

On Tue, Mar 10, 2009 at 01:52:33PM -0400, Jeff King wrote:
> 
> I have not been following this topic too closely, so can you please
> explain (or point me to an explanation about) something? How do these
> options interact with refspecs given on the command line? That is, why
> would I choose to use:
> 
>   git push --current
> 
> over
> 
>   git push - HEAD

--current pushs the current branch to whatever it is tracking, no
matter what name it has (i.e. it can push to a branch of different
name). If it is not tracking anything, it will not push.

git push - HEAD pushes the current branch to a branch of the same name
on the "current remote", which defaults to origin if nothing is set up
for the branch.

> (assuming your earlier patch is applied, or "git push HEAD" if Junio's
> suggested DWIMmery is implemented). And what does it mean to say
> 
>   git push --matching - HEAD
> 
> ? Those are conflicting instructions. Is one followed and one discarded?
> Are they merged?

It would be an error, no refspecs can be specified with --matching.

- Finn Arne