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

Re: DWIM ref names for push/fetch

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:18

Daniel Barkalow [off-list ref] writes:
Is this difference simply due to the different languages the matching 
portions of these were originally written in?
If anything, the semantics on the fetch side is _very_ much
intentional and is done deliberately that way to be usable.  

On the other hand, push started as "matching only", and then
"match tail part of the name" as an afterthought.  It was so
afterthought that it had an idiotic behaviour of independently
match the source and destination side even when there is no
colon, which was fixed only recently.

So if you would want to match fetch and push, you should not
change the semantics on fetch to match what push does, as the
latter was done pretty much without design.

Having said that, I think fetch and push DWIMmery are
fundamentally different, especially when you do not have a
colon.  push without storing anything on the receiving end would
not make any sense whatsoever, but fetch without using tracking
branches does make perfect sense, so push does pretend dst side
has what matched with src side pattern, while fetch treats no
colon pattern as not storing.  IOW, even if we wanted to reuse
the code on both sides as much as possible, I suspect we would
need to have details different between them.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help