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

Re: [PATCHv2 2/2] pull: support rebased upstream + fetch + pull --rebase

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:04

Johannes Schindelin [off-list ref] writes:
How about

	oldremoteref="$(git rev-list --boundary HEAD --not \
			$(git rev-list -g $remoteref | sed 's/$/^@/') |
		sed -e '/^[^-]/d' -e q)"

Explanation: the "git rev-list -g $remoteref" lists the previous commits 
the remote ref pointed to, and the ^@ appended to them means all their 
parents.  Now, the outer rev-list says to take everything in HEAD but 
_not_ in those parents, showing the boundary commits.  The "sed" call 
lists the first such boundary commit (which must, by construction, be one 
of the commits shown by the first rev-list).
Hmm, I am not sure about that "(which must..." part.  When you have

          Y---X
         /
	B---o---o---o---H

wouldn't "rev-list --boundary H --not X^@" give B, not X nor Y?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help