From 490660a7c61d6226ac52d0e00198dd90a3891115 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Mon, 24 Nov 2014 00:41:39 +0100 Subject: [pgm] Add option --heads for ls-remote TODO: find a way to use option -h which is already captured by TextBuiltin's option --help which also uses the alias -h. Bug: 444072 Change-Id: Ie66584c2fc7fc224014a43cf928547703dd9d213 Signed-off-by: Matthias Sohn --- .../tst/org/eclipse/jgit/pgm/LsRemoteTest.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'org.eclipse.jgit.pgm.test/tst') diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/LsRemoteTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/LsRemoteTest.java index 695dea831e..f03edb0693 100644 --- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/LsRemoteTest.java +++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/LsRemoteTest.java @@ -93,4 +93,15 @@ public class LsRemoteTest extends CLIRepositoryTestCase { "d0b1ef2b3dea02bb2ca824445c04e6def012c32c refs/tags/tag3^{}", "" }, result.toArray()); } + + @Test + public void testLsRemoteHeads() throws Exception { + final List result = CLIGitCommand.execute( + "git ls-remote --heads " + + db.getDirectory(), db); + assertArrayEquals(new String[] { + "d0b1ef2b3dea02bb2ca824445c04e6def012c32c refs/heads/master", + "d0b1ef2b3dea02bb2ca824445c04e6def012c32c refs/heads/test", + "" }, result.toArray()); + } } -- cgit v1.2.3