aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eriksen <s022018@student.dtu.dk>2006-05-23 14:15:29 +0200
committerJunio C Hamano <junkio@cox.net>2006-05-23 13:11:12 -0700
commit0864f26421b3c599b462bc867de948d14b268d76 (patch)
tree8b1ecbe84f1614cd81e7857768367f57abff646d
parent405053d2d98c613d028795df439de657981e0711 (diff)
downloadgit-0864f26421b3c599b462bc867de948d14b268d76.tar.gz
git-0864f26421b3c599b462bc867de948d14b268d76.tar.xz
Builtin git-ls-files.
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--Makefile6
-rw-r--r--builtin-ls-files.c (renamed from ls-files.c)3
-rw-r--r--builtin.h1
-rw-r--r--git.c3
4 files changed, 8 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 5423b7a79..c540d7d9f 100644
--- a/Makefile
+++ b/Makefile
@@ -155,7 +155,7 @@ PROGRAMS = \
git-diff-index$X git-diff-stages$X \
git-diff-tree$X git-fetch-pack$X git-fsck-objects$X \
git-hash-object$X git-index-pack$X git-local-fetch$X \
- git-ls-files$X git-ls-tree$X git-mailinfo$X git-merge-base$X \
+ git-ls-tree$X git-mailinfo$X git-merge-base$X \
git-merge-index$X git-mktag$X git-mktree$X git-pack-objects$X git-patch-id$X \
git-peek-remote$X git-prune-packed$X git-read-tree$X \
git-receive-pack$X git-rev-parse$X \
@@ -171,7 +171,7 @@ PROGRAMS = \
BUILT_INS = git-log$X git-whatchanged$X git-show$X \
git-count-objects$X git-diff$X git-push$X \
git-grep$X git-rev-list$X git-check-ref-format$X \
- git-init-db$X
+ git-init-db$X git-ls-files$X
# what 'all' will build and 'install' will install, in gitexecdir
ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS)
@@ -220,7 +220,7 @@ LIB_OBJS = \
BUILTIN_OBJS = \
builtin-log.o builtin-help.o builtin-count.o builtin-diff.o builtin-push.o \
builtin-grep.o builtin-rev-list.o builtin-check-ref-format.o \
- builtin-init-db.o
+ builtin-init-db.o builtin-ls-files.o
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
LIBS = $(GITLIBS) -lz
diff --git a/ls-files.c b/builtin-ls-files.c
index 4a4af1ca3..3a0c5f215 100644
--- a/ls-files.c
+++ b/builtin-ls-files.c
@@ -10,6 +10,7 @@
#include "cache.h"
#include "quote.h"
+#include "builtin.h"
static int abbrev = 0;
static int show_deleted = 0;
@@ -648,7 +649,7 @@ static const char ls_files_usage[] =
"[ --exclude-per-directory=<filename> ] [--full-name] [--abbrev] "
"[--] [<file>]*";
-int main(int argc, const char **argv)
+int cmd_ls_files(int argc, const char **argv, char** envp)
{
int i;
int exc_given = 0;
diff --git a/builtin.h b/builtin.h
index 60541262c..a0713d374 100644
--- a/builtin.h
+++ b/builtin.h
@@ -27,5 +27,6 @@ extern int cmd_grep(int argc, const char **argv, char **envp);
extern int cmd_rev_list(int argc, const char **argv, char **envp);
extern int cmd_check_ref_format(int argc, const char **argv, char **envp);
extern int cmd_init_db(int argc, const char **argv, char **envp);
+extern int cmd_ls_files(int argc, const char **argv, char **envp);
#endif
diff --git a/git.c b/git.c
index 3216d311b..9cfa9ebce 100644
--- a/git.c
+++ b/git.c
@@ -52,7 +52,8 @@ static void handle_internal_command(int argc, const char **argv, char **envp)
{ "grep", cmd_grep },
{ "rev-list", cmd_rev_list },
{ "init-db", cmd_init_db },
- { "check-ref-format", cmd_check_ref_format }
+ { "check-ref-format", cmd_check_ref_format },
+ { "ls-files", cmd_ls_files }
};
int i;