git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thiago Farina <tfransosi@gmail.com>
To: git@vger.kernel.org
Cc: jrnieder@gmail.com, gitster@pobox.com, pclouds@gmail.com,
	Thiago Farina <tfransosi@gmail.com>
Subject: [Patch v2] help.c: Pull cmd_version out of this file.
Date: Wed,  1 Sep 2010 00:10:32 -0300	[thread overview]
Message-ID: <dc636803969cfa958d76ec2461ebdbe79b335ee3.1283310520.git.tfransosi@gmail.com> (raw)

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>
---
 .gitignore        |    1 +
 Makefile          |    1 +
 builtin/version.c |    7 +++++++
 help.c            |    6 ------
 4 files changed, 9 insertions(+), 6 deletions(-)
 create mode 100644 builtin/version.c

diff --git a/.gitignore b/.gitignore
index fcdd822..5bdddc4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -151,6 +151,7 @@
 /git-var
 /git-verify-pack
 /git-verify-tag
+/git-version
 /git-web--browse
 /git-whatchanged
 /git-write-tree
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

                 reply	other threads:[~2010-09-01  3:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dc636803969cfa958d76ec2461ebdbe79b335ee3.1283310520.git.tfransosi@gmail.com \
    --to=tfransosi@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=pclouds@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).