git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* BUG: git request-pull broken for plain branches
@ 2014-06-25  9:55 Uwe Kleine-König
  2014-06-25 12:05 ` Linus Torvalds
  0 siblings, 1 reply; 5+ messages in thread
From: Uwe Kleine-König @ 2014-06-25  9:55 UTC (permalink / raw)
  To: Linus Torvalds, Junio C Hamano; +Cc: git, kernel

Hello,

I have git from Debian's 2.0.0-2 package:

	$ git version
	git version 2.0.0

git request-pull is broken for me:

	$ git rev-parse HEAD
	9e065e4a5a58308f1a0da4bb80b830929dfa90b3
	$ git ls-remote origin | grep 9e065e4a5a58308f1a0da4bb80b830929dfa90b3
	9e065e4a5a58308f1a0da4bb80b830929dfa90b3	refs/heads/ukl/for-mainline
	$ git request-pull origin/master origin HEAD > /dev/null
	warn: No match for commit 9e065e4a5a58308f1a0da4bb80b830929dfa90b3 found at origin
	warn: Are you sure you pushed 'HEAD' there?

The same happens on 2.0.0.421.g786a89d.

The problem is in git-request-pull.sh's find_matching_ref. This code has
more than one problem (looking on 2.0.0.421.g786a89d):

	- find_matching_ref doesn't assign to $found if none of the if
	  conditions in the loop match (this results in my problem);
	- find_matching_ref happily overwrites $found even if the
	  previous ref was better according to the metric specified
	  above the definition of find_matching_ref; and
	- the output generated uses $pretty_remote without asserting
	  that it matches $ref. In my case this results in a branch
	  specification of "HEAD" even if I fix find_matching_ref to
	  return refs/heads/ukl/for-mainline.

I tried to add this case to t/t5150-request-pull.sh, but didn't
understand how after starring at it for half an hour. :-(

Bisection points on 024d34cb0813 (request-pull: more strictly match
local/remote branches) as first bad commit. Apart from introducing the
warning, it also changes the branch spec from "ukl/for-mainline" (which
is correct) to the name of the current branch (which is bogus). Also
024d34cb0813 makes 5 out of 7 tests in t/t5150-request-pull.sh fail.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-06-26  7:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-25  9:55 BUG: git request-pull broken for plain branches Uwe Kleine-König
2014-06-25 12:05 ` Linus Torvalds
2014-06-25 13:21   ` Uwe Kleine-König
2014-06-25 20:41     ` Junio C Hamano
2014-06-26  7:06       ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).