jgit/org.eclipse.jgit.test/tst/org/eclipse/jgit
Jonathan Nieder 5be4814e38 Repository: Introduce exactRef and findRef, deprecate getRef
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>
2015-11-25 14:05:20 -08:00
..
api Repository: Introduce exactRef and findRef, deprecate getRef 2015-11-25 14:05:20 -08:00
attributes Adds the git attributes computation on the treewalk 2015-11-18 00:28:45 +01:00
diff Fix MissingObjectException in RenameDetector 2015-11-12 15:56:36 +01:00
dircache DirCache: Refuse to read files with invalid paths 2014-12-18 14:48:46 +01:00
events Move base test classes to the junit bundle for reuse for Java 7 tests 2013-02-04 07:24:56 +01:00
fnmatch Added characters to be escaped in file name patterns 2013-04-06 18:23:33 +02:00
gitrepo Fixed jgit test failures on Windows 2015-10-12 06:03:39 -04:00
ignore Fixed jgit test failures on Windows 2015-10-12 06:03:39 -04:00
internal/storage Repository: Introduce exactRef and findRef, deprecate getRef 2015-11-25 14:05:20 -08:00
junit Repository: Introduce exactRef and findRef, deprecate getRef 2015-11-25 14:05:20 -08:00
lib Repository: Introduce exactRef and findRef, deprecate getRef 2015-11-25 14:05:20 -08:00
merge Repository: Introduce exactRef and findRef, deprecate getRef 2015-11-25 14:05:20 -08:00
nls Move console classes to pgm bundle 2015-02-10 09:14:48 +01:00
notes Replace deprecated release() methods by close() 2015-05-21 02:05:45 +02:00
patch Suppress boxing warnings where we know they are ok 2012-09-22 01:21:00 +02:00
revplot Revert "CommitBuilder should check for duplicate parents" 2015-03-18 16:26:05 -07:00
revwalk Push control of time into MockSystemReader 2015-10-20 15:57:31 -07:00
storage/file Remove hardcoded target/trash from test cases 2013-11-01 19:57:47 -07:00
submodule containsGitModulesFile() should not crash on bare repository 2015-08-03 07:58:52 -04:00
symlinks Merge bundle org.eclipse.jgit.java7 into org.eclipse.jgit 2015-03-23 14:23:07 +01:00
test/resources Move SampleDataRepositoryTestCase to org.eclipse.jgit.test 2013-11-24 05:27:14 -05:00
transport Repository: Introduce exactRef and findRef, deprecate getRef 2015-11-25 14:05:20 -08:00
treewalk Let FS_Win32_Cygwin detect symlink support by creating temporary symlink 2015-11-21 01:49:49 +01:00
util Let FS_Win32_Cygwin detect symlink support by creating temporary symlink 2015-11-21 01:49:49 +01:00