5be4814e38
The Repository class provides only one method to look up a ref by name, getRef. If I request refs/heads/master and that ref does not exist, getRef will look further in the search path: ref/refs/heads/master refs/heads/refs/heads/master refs/remotes/refs/heads/master This behavior is counterintuitive, needlessly inexpensive, and usually not what the caller expects. Allow callers to specify whether to use the search path by providing two separate methods: - exactRef, which looks up a ref when its exact name is known - findRef, which looks for a ref along the search path For backward compatibility, keep getRef as a deprecated synonym for findRef. This change introduces findRef and exactRef but does not update callers outside tests to use them yet. Change-Id: I35375d942baeb3ded15520388f8ebb9c0cc86f8c Signed-off-by: Jonathan Nieder <jrn@google.com> |
||
---|---|---|
.. | ||
.settings | ||
META-INF | ||
tst/org/eclipse/jgit/http | ||
.classpath | ||
.gitignore | ||
.project | ||
build.properties | ||
org.eclipse.jgit.http--All-Tests.launch | ||
plugin.properties | ||
pom.xml |