Re: git push (mis ?)behavior

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Pierre Habouzit <madcoder@...>
Cc: <git@...>
Date: Thursday, September 27, 2007 - 3:22 pm

Pierre Habouzit <madcoder@debian.org> writes:


The default is not --all but "matching branches", iow, what you
have never published yet never goes out.

Having said that, I would agree that in some workflows "I am on
this branch and I would want to push only this branch" would be
the norm, and the norm even be "and this branch 'foo' is called
identically as 'foo' at the remote site as well".

Don't worry about me when discussing to change the default.
Myself, I also often push only one or two branches.  A typical
workflow for me while working on git.git is to prepare 'maint'
(if there are any changes) and 'master', push them (without
pushing 'next' and 'pu') to a private "build it to make sure"
repository I have at a k.org machine which runs RH, make sure
they are Ok, and then continue working on integrating 'next' and
'pu'.  At the end of the day, I push out all four integration
branches to a separate "publish" area, but even this one, I rely
on the explicit configuration (remote.<name>.push) to push out
only the integration branches and not other branches.

We would also want to have --mirror option that acts like --all
but removes the refs from the remote that do not exist anymore,
so we will be talking about updating "git push" in the near
future anyway.

So what's the desired semantics?

The current semantics is:

   "git push" says "you do not say to which repository?" and
   consults "branch.<current>.remote" but defaults to 'origin'
   if unconfigured.  

   "git push <name>" (or using the <name> determined as above)
   says "you do not say which branches?" and consults
   "remote.<name>.push" to find branches to push out, but
   defaults to 'matching branches' if unconfigured.

What you would want to change is the fallback behaviour for
unconfigured "remote.<name>.push".  I think it is sensible to
have an option to make it push only the current branch.  I am
not sure if it is sensible to make that the default (and
introduce --matching option to get the current behaviour) at
this point in 1.5.X series, but from the general usability point
of view, I would not object to demote 'matching' to optional and
make 'current only' the default in 1.6.X or later.

Thoughts?
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
git push (mis ?)behavior, Pierre Habouzit, (Thu Sep 27, 9:04 am)
Re: git push (mis ?)behavior, Junio C Hamano, (Thu Sep 27, 3:22 pm)
Re: git push (mis ?)behavior, Miles Bader, (Wed Oct 3, 1:10 am)
Re: git push (mis ?)behavior, Pierre Habouzit, (Wed Oct 3, 3:35 am)
Re: git push (mis ?)behavior, Miles Bader, (Wed Oct 3, 4:57 am)
Re: git push (mis ?)behavior, Wincent Colaiuta, (Wed Oct 3, 6:25 am)
Re: git push (mis ?)behavior, Benoit SIGOURE, (Wed Oct 3, 7:10 am)
Re: git push (mis ?)behavior, Karl , (Wed Oct 3, 6:49 am)
Re: git push (mis ?)behavior, Johannes Schindelin, (Wed Oct 3, 11:27 am)
Re: git push (mis ?)behavior, Wincent Colaiuta, (Wed Oct 3, 12:26 pm)
Re: git push (mis ?)behavior, Karl , (Wed Oct 3, 12:07 pm)
Re: git push (mis ?)behavior, Johannes Schindelin, (Wed Oct 3, 12:18 pm)
Re: git push (mis ?)behavior, Pierre Habouzit, (Wed Oct 3, 12:28 pm)
Re: git push (mis ?)behavior, Johannes Schindelin, (Wed Oct 3, 12:44 pm)
Re: git push (mis ?)behavior, Karl , (Wed Oct 3, 1:02 pm)
Re: git push (mis ?)behavior, Steffen Prohaska, (Thu Oct 4, 10:47 am)
Re: git push (mis ?)behavior, Wincent Colaiuta, (Thu Oct 4, 11:54 am)
Re: git push (mis ?)behavior, Steffen Prohaska, (Thu Oct 4, 12:24 pm)
Re: git push (mis ?)behavior, Wincent Colaiuta, (Thu Oct 4, 1:49 pm)
Re: git push (mis ?)behavior, Junio C Hamano, (Wed Oct 3, 7:08 am)
Re: git push (mis ?)behavior, Karl , (Wed Oct 3, 9:14 am)
Re: git push (mis ?)behavior, Wincent Colaiuta, (Wed Oct 3, 7:22 am)
Re: git push (mis ?)behavior, Pierre Habouzit, (Wed Oct 3, 5:03 am)
Re: git push (mis ?)behavior, Wincent Colaiuta, (Wed Oct 3, 2:47 am)
Re: git push (mis ?)behavior, Miles Bader, (Wed Oct 3, 4:32 am)
Re: git push (mis ?)behavior, Junio C Hamano, (Wed Oct 3, 1:39 am)
Re: git push (mis ?)behavior, Wincent Colaiuta, (Fri Sep 28, 8:38 am)
Re: git push (mis ?)behavior, Steffen Prohaska, (Fri Sep 28, 2:52 am)
Re: git push (mis ?)behavior, Junio C Hamano, (Fri Sep 28, 3:07 am)
Re: git push (mis ?)behavior, Jan Hudec, (Tue Oct 9, 1:05 am)
Re: git push (mis ?)behavior, Steffen Prohaska, (Tue Oct 9, 3:23 am)
Re: git push (mis ?)behavior, Steffen Prohaska, (Fri Sep 28, 5:11 am)
Re: git push (mis ?)behavior, Johannes Schindelin, (Fri Sep 28, 9:31 am)
Re: git push (mis ?)behavior, Pierre Habouzit, (Fri Sep 28, 2:58 am)
Re: git push (mis ?)behavior, Steffen Prohaska, (Fri Sep 28, 5:26 am)
Re: git push (mis ?)behavior, Junio C Hamano, (Fri Sep 28, 5:44 am)
Re: git push (mis ?)behavior, Steffen Prohaska, (Fri Sep 28, 6:04 am)
Re: git push (mis ?)behavior, Pierre Habouzit, (Thu Sep 27, 3:36 pm)
Re: git push (mis ?)behavior, Wincent Colaiuta, (Thu Sep 27, 9:30 am)
Re: git push (mis ?)behavior, Benoit SIGOURE, (Thu Sep 27, 11:28 am)