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

Re: [PATCH v2] Fix fetch/pull when run without --update-head-ok

From: Daniel Barkalow <hidden>
Date: 2016-06-15 22:45:29

On Tue, 14 Oct 2008, Shawn O. Pearce wrote:
Johannes Schindelin [off-list ref] wrote:
quoted
On Mon, 13 Oct 2008, Daniel Barkalow wrote:
quoted
On Mon, 13 Oct 2008, Johannes Schindelin wrote:
quoted
I actually understand now why the tests started failing: the change from 
resolve_ref() to get_branch() as requested by Daniel are at fault: 
get_branch() does not check if the branch has an initial commit.
So, my vote is to revert back to resolve_ref(), even if it needs more 
lines.
Yes, I agree, resolve_ref() is the best thing to be using here,
even if it is more code.  get_branch() validates the commit and we
don't want that.  We really just want to know if the current branch
is going to be updated, we don't care to what/why.
It doesn't validate the commit; it doesn't even validate the symref. The 
resolve_ref()-using code validates the symref, and I think that's an 
error; we also don't care what state we'd update the current branch from.

	-Daniel
*This .sig left intentionally blank*
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help