git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] help.c: Pull cmd_version out of this file.
@ 2010-08-29 20:44 Thiago Farina
  2010-08-30  2:38 ` Jonathan Nieder
  0 siblings, 1 reply; 18+ messages in thread
From: Thiago Farina @ 2010-08-29 20:44 UTC (permalink / raw)
  To: Git Mailing List

Promote cmd_version to a builtin, by moving it to its own file
in builtin/version.c

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
---
 Makefile          |    1 +
 builtin/version.c |    7 +++++++
 help.c            |    6 ------
 3 files changed, 8 insertions(+), 6 deletions(-)
 create mode 100644 builtin/version.c

diff --git a/Makefile b/Makefile
index b4745a5..0f3b6d8 100644
--- a/Makefile
+++ b/Makefile
@@ -738,6 +738,7 @@ BUILTIN_OBJS += builtin/upload-archive.o
 BUILTIN_OBJS += builtin/var.o
 BUILTIN_OBJS += builtin/verify-pack.o
 BUILTIN_OBJS += builtin/verify-tag.o
+BUILTIN_OBJS += builtin/version.o
 BUILTIN_OBJS += builtin/write-tree.o
 
 GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
diff --git a/builtin/version.c b/builtin/version.c
new file mode 100644
index 0000000..d98e260
--- /dev/null
+++ b/builtin/version.c
@@ -0,0 +1,7 @@
+#include "builtin.h"
+
+int cmd_version(int argc, const char **argv, const char *prefix)
+{
+	printf("git version %s\n", git_version_string);
+	return 0;
+}
diff --git a/help.c b/help.c
index 7f4928e..ad4f923 100644
--- a/help.c
+++ b/help.c
@@ -362,9 +362,3 @@ const char *help_unknown_cmd(const char *cmd)
 
 	exit(1);
 }
-
-int cmd_version(int argc, const char **argv, const char *prefix)
-{
-	printf("git version %s\n", git_version_string);
-	return 0;
-}
-- 
1.7.2.1.95.g3d045

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2010-10-28  3:12 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-29 20:44 [PATCH] help.c: Pull cmd_version out of this file Thiago Farina
2010-08-30  2:38 ` Jonathan Nieder
2010-08-30  2:40   ` Jonathan Nieder
2010-09-01  2:38     ` Thiago Farina
2010-09-01  3:04       ` Nguyen Thai Ngoc Duy
2010-09-01  3:11         ` Thiago Farina
2010-09-01  6:11       ` Junio C Hamano
2010-09-01  6:22         ` Thiago Farina
2010-09-02  1:04           ` Junio C Hamano
2010-09-02  1:16             ` Thiago Farina
2010-09-02  4:35           ` Jonathan Nieder
2010-09-02 16:31             ` Junio C Hamano
2010-10-27 15:12               ` Thiago Farina
2010-10-27 15:18                 ` Jonathan Nieder
2010-10-27 16:06                   ` Thiago Farina
2010-10-27 16:45                     ` Jonathan Nieder
2010-10-28  2:13                       ` Thiago Farina
2010-10-28  3:11                         ` Jonathan Nieder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).