Thread (33 messages) flat view 33 messages, 4 authors, 2016-06-15

Re: [ITCH] Specify refspec without remote

From: Ramkumar Ramachandra <hidden>
Date: 2016-06-15 22:56:46

Jeff King wrote:
On Thu, Apr 11, 2013 at 01:49:54AM +0530, Ramkumar Ramachandra wrote:
quoted
Huh, why?  Simply because he specified master alongside it?  How can
we infer what you said in a consistent system?
That's kind of my point. Why would they put two refs together in a
single push command? Did they mean "I am pushing up master, and since I
just tagged it, send the tag along, too"? Or did they really mean to
push them to two different places? If so, why not just run two separate
push commands?
I disagree.  The protocol was built ground up to support updating
multiple refs in the same git push.  Running N separate push commands
is _not_ the same thing at all; it running N times as slowly aside.

Pushing multiple refs is a valid and cogent usecase (while multiple
remotes is not).  git is a distributed system: I make lots of changes
to various branches, tags and decide to push only when I'm taking a
break for lunch: at this point, I want to update all my refs on the
remote.  In other words, I batch up ref updates because git is _meant_
to do that: creating/ modifying/ moving/ deleting refs is super-fast
(and happens all the time), while pushing is a slow and dangerous
(because gc runs) operation.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help