From: "Lukas Sandström" <lukass@etek.chalmers.se>
To: git@vger.kernel.org
Cc: Petr Baudis <pasky@suse.cz>, junkio@cox.net
Subject: [PATCH] Rename git-pack-intersect to git-pack-redundant
Date: Thu, 10 Nov 2005 00:16:13 +0100 [thread overview]
Message-ID: <4372833D.3010706@etek.chalmers.se> (raw)
In-Reply-To: <20051109111917.GB30496@pasky.or.cz>
Petr Baudis wrote:
> Dear diary, on Wed, Nov 09, 2005 at 02:20:59AM CET, I got a letter
> where Lukas Sandström <lukass@etek.chalmers.se> said that...
>
>>This patch series adds git-pack-intersect. It finds redundant packs
>>by calculating the union of all objects present in .git/objects/pack
>>and then computing the smallest set of packs which contain all the
>>objects in this union.
>
>
> Sounds nice, except the name - it does something else than what the name
> says, so perhaps something like 'git-pack-redundant' would be more
> appropriate.
>
Yes, it would. git-pack-intersect is a working name from before
I knew what the program would actually do. In the beginning
it just computed the intersection of two pack-files...
/Lukas Sandström
-- >8 -- cut here -- >8 --
Subject: [PATCH] Rename git-pack-intersect to git-pack-redundant
This patch renames git-pack-intersect to git-pack-redundant
as suggested by Petr Baudis. The new name reflects what the
program does, rather than how it does it.
Also fix a small argument parsing bug.
Signed-off-by: Lukas Sandström <lukass@etek.chalmers.se>
---
.gitignore | 2 +-
Documentation/git-pack-redundant.txt | 6 +++---
Makefile | 2 +-
git-repack.sh | 4 ++--
pack-redundant.c | 10 ++++++----
5 files changed, 13 insertions(+), 11 deletions(-)
rename Documentation/{git-pack-intersect.txt => git-pack-redundant.txt} (86%)
rename pack-intersect.c => pack-redundant.c (98%)
applies-to: 85a2ca124a0579c98df5e6d9158a7ee358aeefef
4db829aa0d1811ccf3505aca232045d7970aec5d
diff --git a/.gitignore b/.gitignore
index 6ff2530..1d1aa57 100644
--- a/.gitignore
+++ b/.gitignore
@@ -60,7 +60,7 @@ git-mktag
git-name-rev
git-mv
git-octopus
-git-pack-intersect
+git-pack-redundant
git-pack-objects
git-parse-remote
git-patch-id
diff --git a/Documentation/git-pack-intersect.txt b/Documentation/git-pack-redundant.txt
similarity index 86%
rename from Documentation/git-pack-intersect.txt
rename to Documentation/git-pack-redundant.txt
index a73d9e3..3829616 100644
--- a/Documentation/git-pack-intersect.txt
+++ b/Documentation/git-pack-redundant.txt
@@ -1,14 +1,14 @@
-git-pack-intersect(1)
+git-pack-redundant(1)
=====================
NAME
----
-git-pack-intersect - Program used to find redundant pack files.
+git-pack-redundant - Program used to find redundant pack files.
SYNOPSIS
--------
-'git-pack-intersect [ -v ] < -a | .pack filename ... >'
+'git-pack-redundant [ -v ] < -a | .pack filename ... >'
DESCRIPTION
-----------
diff --git a/Makefile b/Makefile
index 4c646c9..b4dca5f 100644
--- a/Makefile
+++ b/Makefile
@@ -122,7 +122,7 @@ PROGRAMS = \
git-unpack-objects$X git-update-index$X git-update-server-info$X \
git-upload-pack$X git-verify-pack$X git-write-tree$X \
git-update-ref$X git-symbolic-ref$X git-check-ref-format$X \
- git-name-rev$X git-pack-intersect$X $(SIMPLE_PROGRAMS)
+ git-name-rev$X git-pack-redundant$X $(SIMPLE_PROGRAMS)
# Backward compatibility -- to be removed after 1.0
PROGRAMS += git-ssh-pull$X git-ssh-push$X
diff --git a/git-repack.sh b/git-repack.sh
index 3f28300..4ce0022 100755
--- a/git-repack.sh
+++ b/git-repack.sh
@@ -45,7 +45,7 @@ if [ -z "$name" ]; then
if test "$remove_redandant" = t ; then
echo "Removing redundant packs."
sync
- redundant=$(git-pack-intersect -a)
+ redundant=$(git-pack-redundant -a)
if test "$redundant" != "" ; then
echo $redundant | xargs rm
fi
@@ -63,7 +63,7 @@ exit
if test "$remove_redandant" = t
then
sync
- redundant=$(git-pack-intersect -a)
+ redundant=$(git-pack-redundant -a)
if test "$redundant" != "" ; then
echo $redundant | xargs rm
fi
diff --git a/pack-intersect.c b/pack-redundant.c
similarity index 98%
rename from pack-intersect.c
rename to pack-redundant.c
index 2267478..db3dcde 100644
--- a/pack-intersect.c
+++ b/pack-redundant.c
@@ -8,8 +8,8 @@
#include "cache.h"
-static const char pack_intersect_usage[] =
-"git-pack-intersect [ -v ] < -a | <.pack filename> ...>";
+static const char pack_redundant_usage[] =
+"git-pack-redundant [ -v ] < -a | <.pack filename> ...>";
int all = 0, verbose = 0;
@@ -522,8 +522,10 @@ int main(int argc, char **argv)
for (i = 1; i < argc; i++) {
const char *arg = argv[i];
- if(!strcmp(arg, "--"))
+ if(!strcmp(arg, "--")) {
+ i++;
break;
+ }
if(!strcmp(arg, "-a")) {
all = 1;
continue;
@@ -533,7 +535,7 @@ int main(int argc, char **argv)
continue;
}
if(*arg == '-')
- usage(pack_intersect_usage);
+ usage(pack_redundant_usage);
else
break;
}
---
0.99.9.GIT
prev parent reply other threads:[~2005-11-09 23:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-09 1:20 [PATCH 0/4] Add git-pack-intersect Lukas Sandström
2005-11-09 1:22 ` [PATCH 1/4] " Lukas Sandström
2005-11-09 1:23 ` [PATCH 2/4] Add documentation for git-pack-intersect Lukas Sandström
2005-11-09 1:24 ` [PATCH 3/4] Add git-pack-intersect to .gitignore Lukas Sandström
2005-11-09 1:25 ` [PATCH 4/4] Make git-repack use git-pack-intersect Lukas Sandström
2005-11-09 11:19 ` [PATCH 0/4] Add git-pack-intersect Petr Baudis
2005-11-09 11:58 ` Andreas Ericsson
2005-11-09 23:24 ` Lukas Sandström
2005-11-10 0:15 ` Junio C Hamano
2005-11-09 23:16 ` Lukas Sandström [this message]
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=4372833D.3010706@etek.chalmers.se \
--to=lukass@etek.chalmers.se \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=pasky@suse.cz \
/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.