]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Rename git-pack-intersect to git-pack-redundant
authorLukas_Sandström <lukass@etek.chalmers.se>
Wed, 9 Nov 2005 23:16:13 +0000 (00:16 +0100)
committerJunio C Hamano <junkio@cox.net>
Sat, 12 Nov 2005 05:19:11 +0000 (21:19 -0800)
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>
Signed-off-by: Junio C Hamano <junkio@cox.net>
.gitignore
Documentation/git-pack-redundant.txt [moved from Documentation/git-pack-intersect.txt with 83% similarity]
Makefile
git-repack.sh
pack-redundant.c [moved from pack-intersect.c with 98% similarity]

index 6ff25300e18c547d4cb5dd431db116d199c95e0b..1d1aa57676f961af98a46caf0b6377547fbfabcf 100644 (file)
@@ -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
similarity index 83%
rename from Documentation/git-pack-intersect.txt
rename to Documentation/git-pack-redundant.txt
index e5d6fc7d3dd44517713d37d75029060a888fec81..55c0d48bf1d64320c7e688987c663033a8ce2179 100644 (file)
@@ -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
 -----------
index 4c646c9e84ae37f3eaa458a601ac6d0f96f07d5e..b4dca5f228b2ce95d9c23405b99f534760a50481 100644 (file)
--- 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
index 3f28300566bb78e736af12670027279ee18bce51..4ce00225da2c9181f2c69ded6c07ba0111a01584 100755 (executable)
@@ -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
similarity index 98%
rename from pack-intersect.c
rename to pack-redundant.c
index 2267478c3616af9efb5476503f51f2fb904525cb..db3dcde22a3b290bd60762fc0ad81165c02f1fbb 100644 (file)
@@ -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;
        }