From: Matthias Kestenholz <matthias@spinlock.ch>
To: git@vger.kernel.org
Cc: junkio@cox.net
Subject: [PATCH] Make git-prune-packed a builtin
Date: Wed, 2 Aug 2006 18:17:29 +0200 [thread overview]
Message-ID: <20060802161729.GE20971@spinlock.ch> (raw)
Signed-off-by: Matthias Kestenholz <matthias@spinlock.ch>
---
Makefile | 6 +++---
prune-packed.c => builtin-prune-packed.c | 2 +-
builtin.h | 1 +
git.c | 1 +
4 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 2562a2c..e39c9da 100644
--- a/Makefile
+++ b/Makefile
@@ -196,7 +196,7 @@ PROGRAMS = \
git-hash-object$X git-index-pack$X git-local-fetch$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-receive-pack$X \
+ git-peek-remote$X git-receive-pack$X \
git-send-pack$X git-shell$X \
git-show-index$X git-ssh-fetch$X \
git-ssh-upload$X git-unpack-file$X \
@@ -216,7 +216,7 @@ BUILT_INS = git-log$X git-whatchanged$X
git-read-tree$X git-commit-tree$X git-write-tree$X \
git-apply$X git-show-branch$X git-diff-files$X git-update-index$X \
git-diff-index$X git-diff-stages$X git-diff-tree$X git-cat-file$X \
- git-fmt-merge-msg$X git-prune$X git-mv$X
+ git-fmt-merge-msg$X git-prune$X git-mv$X git-prune-packed$X
# what 'all' will build and 'install' will install, in gitexecdir
ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS)
@@ -273,7 +273,7 @@ BUILTIN_OBJS = \
builtin-diff-index.o builtin-diff-stages.o builtin-diff-tree.o \
builtin-cat-file.o builtin-mailsplit.o builtin-stripspace.o \
builtin-update-ref.o builtin-fmt-merge-msg.o builtin-prune.o \
- builtin-mv.o
+ builtin-mv.o builtin-prune-packed.o
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
EXTLIBS = -lz
diff --git a/prune-packed.c b/builtin-prune-packed.c
similarity index 96%
rename from prune-packed.c
rename to builtin-prune-packed.c
index d24b097..8ca8c8c 100644
--- a/prune-packed.c
+++ b/builtin-prune-packed.c
@@ -54,7 +54,7 @@ static void prune_packed_objects(void)
}
}
-int main(int argc, char **argv)
+int cmd_prune_packed(int argc, char **argv, const char *prefix)
{
int i;
diff --git a/builtin.h b/builtin.h
index f10d3b7..7ddfe28 100644
--- a/builtin.h
+++ b/builtin.h
@@ -20,6 +20,7 @@ extern int cmd_format_patch(int argc, co
extern int cmd_count_objects(int argc, const char **argv, const char *prefix);
extern int cmd_prune(int argc, const char **argv, const char *prefix);
+extern int cmd_prune_packed(int argc, const char **argv, const char *prefix);
extern int cmd_push(int argc, const char **argv, const char *prefix);
extern int cmd_grep(int argc, const char **argv, const char *prefix);
diff --git a/git.c b/git.c
index 110e82e..5b50762 100644
--- a/git.c
+++ b/git.c
@@ -263,6 +263,7 @@ static void handle_internal_command(int
{ "fmt-merge-msg", cmd_fmt_merge_msg, NEEDS_PREFIX },
{ "prune", cmd_prune, NEEDS_PREFIX },
{ "mv", cmd_mv, NEEDS_PREFIX },
+ { "prune-packed", cmd_prune_packed, NEEDS_PREFIX },
};
int i;
--
1.4.2.rc2.g767b2
--
Matthias Kestenholz
www.spinlock.ch
next reply other threads:[~2006-08-02 16:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-02 16:17 Matthias Kestenholz [this message]
2006-08-02 16:32 ` [PATCH/corrected] Make git-prune-packed a builtin Matthias Kestenholz
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=20060802161729.GE20971@spinlock.ch \
--to=matthias@spinlock.ch \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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).