]> source.dussan.org Git - jgit.git/commit
repo: Do not use search path to find refs/remotes/origin/<branch> 53/60853/5
authorJonathan Nieder <jrn@google.com>
Thu, 19 Nov 2015 20:47:18 +0000 (12:47 -0800)
committerJonathan Nieder <jrn@google.com>
Wed, 25 Nov 2015 22:05:24 +0000 (14:05 -0800)
commitfe98218e0df85012cb9b901c71c44f232f65cb3a
treefdf39c7e0080062487f508f5ea7ec3258faf1fb1
parent5be4814e38f2c3983dc27ac6d74f95f2d73ed400
repo: Do not use search path to find refs/remotes/origin/<branch>

When running from a non-bare repository, "jgit repo" checks whether
the rev passed in is a sha1 or branch name and in the latter case will
check out origin/<branch>.

We are expecting refs/remotes/origin/<branch>, but as a side effect of
using getRef we also end up looking for refs/origin/<branch>,
refs/heads/origin/<branch>, and so on.  Avoid that by using exactRef
instead.

Signed-off-by: Jonathan Nieder <jrn@google.com>
Change-Id: I670b2e48a88138a1f2104ea201baa958e9edbddb
org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java