All of lore.kernel.org
 help / color / mirror / Atom feed
From: drafnel@gmail.com
To: git@vger.kernel.org
Cc: gitster@pobox.com, Brandon Casey <drafnel@gmail.com>
Subject: [PATCH 2/5] Make mktag a builtin.
Date: Thu,  8 May 2008 21:19:46 -0500	[thread overview]
Message-ID: <7689656.1210299528037.JavaMail.teamon@b301.teamon.com> (raw)
In-Reply-To: <1210299589-10448-2-git-send-email-drafnel@example.com>

From: Brandon Casey <drafnel@gmail.com>

Signed-off-by: Brandon Casey <drafnel@gmail.com>
---
 Makefile  |    3 ++-
 builtin.h |    1 +
 git.c     |    1 +
 mktag.c   |    4 +---
 4 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 9d84c8d..1128cef 100644
--- a/Makefile
+++ b/Makefile
@@ -282,7 +282,6 @@ PROGRAMS += git-imap-send$X
 PROGRAMS += git-index-pack$X
 PROGRAMS += git-merge-index$X
 PROGRAMS += git-merge-tree$X
-PROGRAMS += git-mktag$X
 PROGRAMS += git-mktree$X
 PROGRAMS += git-pack-redundant$X
 PROGRAMS += git-patch-id$X
@@ -306,6 +305,7 @@ BUILT_INS += git-fsck-objects$X
 BUILT_INS += git-get-tar-commit-id$X
 BUILT_INS += git-init$X
 BUILT_INS += git-merge-subtree$X
+BUILT_INS += git-mktag$X
 BUILT_INS += git-peek-remote$X
 BUILT_INS += git-repo-config$X
 BUILT_INS += git-show$X
@@ -423,6 +423,7 @@ LIB_OBJS += log-tree.o
 LIB_OBJS += mailmap.o
 LIB_OBJS += match-trees.o
 LIB_OBJS += merge-file.o
+LIB_OBJS += mktag.o
 LIB_OBJS += object.o
 LIB_OBJS += pack-check.o
 LIB_OBJS += pack-revindex.o
diff --git a/builtin.h b/builtin.h
index 95126fd..a8d3a11 100644
--- a/builtin.h
+++ b/builtin.h
@@ -58,6 +58,7 @@ extern int cmd_merge_base(int argc, const char **argv, const char *prefix);
 extern int cmd_merge_ours(int argc, const char **argv, const char *prefix);
 extern int cmd_merge_file(int argc, const char **argv, const char *prefix);
 extern int cmd_merge_recursive(int argc, const char **argv, const char *prefix);
+extern int cmd_mktag(int argc, const char **argv, const char *prefix);
 extern int cmd_mv(int argc, const char **argv, const char *prefix);
 extern int cmd_name_rev(int argc, const char **argv, const char *prefix);
 extern int cmd_pack_objects(int argc, const char **argv, const char *prefix);
diff --git a/git.c b/git.c
index 89b431f..81aa31c 100644
--- a/git.c
+++ b/git.c
@@ -325,6 +325,7 @@ static void handle_internal_command(int argc, const char **argv)
 		{ "merge-ours", cmd_merge_ours, RUN_SETUP },
 		{ "merge-recursive", cmd_merge_recursive, RUN_SETUP | NEED_WORK_TREE },
 		{ "merge-subtree", cmd_merge_recursive, RUN_SETUP | NEED_WORK_TREE },
+		{ "mktag", cmd_mktag, RUN_SETUP },
 		{ "mv", cmd_mv, RUN_SETUP | NEED_WORK_TREE },
 		{ "name-rev", cmd_name_rev, RUN_SETUP },
 		{ "pack-objects", cmd_pack_objects, RUN_SETUP },
diff --git a/mktag.c b/mktag.c
index 5489ad6..352747b 100644
--- a/mktag.c
+++ b/mktag.c
@@ -156,7 +156,7 @@ static int verify_tag(const char *buffer, size_t size)
 
 #undef PD_FMT
 
-int main(int argc, char **argv)
+int cmd_mktag(int argc, const char **argv, const char *prefix)
 {
 	struct strbuf buf;
 	unsigned char result_sha1[20];
@@ -164,8 +164,6 @@ int main(int argc, char **argv)
 	if (argc != 1)
 		usage("git-mktag < signaturefile");
 
-	setup_git_directory();
-
 	strbuf_init(&buf, 0);
 	if (strbuf_read(&buf, 0, 4096) < 0) {
 		die("could not read from stdin");
-- 
1.5.5.67.g9a49

  parent reply	other threads:[~2008-05-09  2:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1210299589-10448-1-git-send-email-drafnel@example.com>
2008-05-09  2:19 ` [PATCH 1/5] mktag.c: adjust verify_tag parameters drafnel
2008-05-11 18:39   ` Junio C Hamano
2008-05-12 15:43     ` Brandon Casey
     [not found] ` <1210299589-10448-2-git-send-email-drafnel@example.com>
2008-05-09  2:19   ` drafnel [this message]
2008-05-11 17:28     ` [PATCH 2/5] Make mktag a builtin Junio C Hamano
2008-05-11 17:36       ` Junio C Hamano
2008-05-12 15:09       ` Brandon Casey
2008-05-12 17:04         ` Johannes Schindelin
2008-05-12 17:32           ` Brandon Casey
2008-05-12 18:41         ` Junio C Hamano
     [not found]   ` <1210299589-10448-3-git-send-email-drafnel@example.com>
2008-05-09  2:19     ` [PATCH 3/5] mktag.c: rename verify_tag to verify_tag_buffer drafnel
     [not found]     ` <1210299589-10448-4-git-send-email-drafnel@example.com>
2008-05-09  2:19       ` [PATCH 4/5] mktag.c: consolidate tag functions by merging mktag.c into builtin-tag.c drafnel
     [not found]       ` <1210299589-10448-5-git-send-email-drafnel@example.com>
2008-05-09  2:19         ` [PATCH 5/5] git-tag: call verify_tag_buffer to validate the generated tag object drafnel

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=7689656.1210299528037.JavaMail.teamon@b301.teamon.com \
    --to=drafnel@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.