@matheusbsbs / matheus-bagliano / commits / 8951d7c1f1
Fork 0

Build in ls-remote

This actually replaces peek-remote with ls-remote, since peek-remote now handles everything. peek-remote remains an a second name for ls-remote, although its help message now gives the "ls-remote" name. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Daniel Barkalow committed Nov 4, 2007 at 15:51 UTC 8951d7c1f1ae38f34617b6c2490bf65e73e371f7
5 files changed +9 -9
Makefile
+1 -2
@@ -210,7 +210,6 @@ BASIC_LDFLAGS =
210 SCRIPT_SH = \
211 git-bisect.sh git-checkout.sh \
212 git-clean.sh git-clone.sh git-commit.sh \
213 - git-ls-remote.sh \
213 git-merge-one-file.sh git-mergetool.sh git-parse-remote.sh \
214 git-pull.sh git-rebase.sh git-rebase--interactive.sh \
215 git-repack.sh git-request-pull.sh \
@@ -345,6 +344,7 @@ BUILTIN_OBJS = \
344 builtin-log.o \
345 builtin-ls-files.o \
346 builtin-ls-tree.o \
347 + builtin-ls-remote.o \
348 builtin-mailinfo.o \
349 builtin-mailsplit.o \
350 builtin-merge-base.o \
@@ -352,7 +352,6 @@ BUILTIN_OBJS = \
352 builtin-mv.o \
353 builtin-name-rev.o \
354 builtin-pack-objects.o \
355 - builtin-peek-remote.o \
355 builtin-prune.o \
356 builtin-prune-packed.o \
357 builtin-push.o \
builtin-ls-remote.c renamed
+5 -5
@@ -3,10 +3,10 @@
3 #include "transport.h"
4 #include "remote.h"
5
6 -static const char peek_remote_usage[] =
7 -"git-peek-remote [--upload-pack=<git-upload-pack>] [<host>:]<directory>";
6 +static const char ls_remote_usage[] =
7 +"git-ls-remote [--upload-pack=<git-upload-pack>] [<host>:]<directory>";
8
9 -int cmd_peek_remote(int argc, const char **argv, const char *prefix)
9 +int cmd_ls_remote(int argc, const char **argv, const char *prefix)
10 {
11 int i;
12 const char *dest = NULL;
@@ -43,14 +43,14 @@ int cmd_peek_remote(int argc, const char **argv, const char *prefix)
43 flags |= REF_NORMAL;
44 continue;
45 }
46 - usage(peek_remote_usage);
46 + usage(ls_remote_usage);
47 }
48 dest = arg;
49 break;
50 }
51
52 if (!dest || i != argc - 1)
53 - usage(peek_remote_usage);
53 + usage(ls_remote_usage);
54
55 transport = transport_get(NULL, dest);
56 if (uploadpack != NULL)
builtin.h
+1 -1
@@ -48,6 +48,7 @@ extern int cmd_log(int argc, const char **argv, const char *prefix);
48 extern int cmd_log_reflog(int argc, const char **argv, const char *prefix);
49 extern int cmd_ls_files(int argc, const char **argv, const char *prefix);
50 extern int cmd_ls_tree(int argc, const char **argv, const char *prefix);
51 +extern int cmd_ls_remote(int argc, const char **argv, const char *prefix);
52 extern int cmd_mailinfo(int argc, const char **argv, const char *prefix);
53 extern int cmd_mailsplit(int argc, const char **argv, const char *prefix);
54 extern int cmd_merge_base(int argc, const char **argv, const char *prefix);
@@ -55,7 +56,6 @@ extern int cmd_merge_file(int argc, const char **argv, const char *prefix);
56 extern int cmd_mv(int argc, const char **argv, const char *prefix);
57 extern int cmd_name_rev(int argc, const char **argv, const char *prefix);
58 extern int cmd_pack_objects(int argc, const char **argv, const char *prefix);
58 -extern int cmd_peek_remote(int argc, const char **argv, const char *prefix);
59 extern int cmd_pickaxe(int argc, const char **argv, const char *prefix);
60 extern int cmd_prune(int argc, const char **argv, const char *prefix);
61 extern int cmd_prune_packed(int argc, const char **argv, const char *prefix);
contrib/examples/git-ls-remote.sh renamed
git.c
+2 -1
@@ -326,6 +326,7 @@ static void handle_internal_command(int argc, const char **argv)
326 { "log", cmd_log, RUN_SETUP | USE_PAGER },
327 { "ls-files", cmd_ls_files, RUN_SETUP },
328 { "ls-tree", cmd_ls_tree, RUN_SETUP },
329 + { "ls-remote", cmd_ls_remote },
330 { "mailinfo", cmd_mailinfo },
331 { "mailsplit", cmd_mailsplit },
332 { "merge-base", cmd_merge_base, RUN_SETUP },
@@ -333,7 +334,7 @@ static void handle_internal_command(int argc, const char **argv)
334 { "mv", cmd_mv, RUN_SETUP | NEED_WORK_TREE },
335 { "name-rev", cmd_name_rev, RUN_SETUP },
336 { "pack-objects", cmd_pack_objects, RUN_SETUP },
336 - { "peek-remote", cmd_peek_remote },
337 + { "peek-remote", cmd_ls_remote },
338 { "pickaxe", cmd_blame, RUN_SETUP },
339 { "prune", cmd_prune, RUN_SETUP },
340 { "prune-packed", cmd_prune_packed, RUN_SETUP },