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> Signed-off-by: Junio C Hamano <junkio@cox.net>
Lukas_Sandström committed
Nov 10, 2005 at 00:16 UTC
9bc0f32c77b755b8d77d215cc47fafff53cad6f5
5 files changed
+13
-11
.gitignore
+1
-1
@@ -60,7 +60,7 @@ git-mktag
60
git-name-rev
61
git-mv
62
git-octopus
63
-git-pack-intersect
63
+git-pack-redundant
64
git-pack-objects
65
git-parse-remote
66
git-patch-id
Documentation/git-pack-redundant.txt
renamed
+3
-3
@@ -1,14 +1,14 @@
1
-git-pack-intersect(1)
1
+git-pack-redundant(1)
2
=====================
3
4
NAME
5
----
6
-git-pack-intersect - Program used to find redundant pack files.
6
+git-pack-redundant - Program used to find redundant pack files.
7
8
9
SYNOPSIS
10
--------
11
-'git-pack-intersect [ -v ] < -a | .pack filename ... >'
11
+'git-pack-redundant [ -v ] < -a | .pack filename ... >'
12
13
DESCRIPTION
14
-----------
Makefile
+1
-1
@@ -122,7 +122,7 @@ PROGRAMS = \
122
git-unpack-objects$X git-update-index$X git-update-server-info$X \
123
git-upload-pack$X git-verify-pack$X git-write-tree$X \
124
git-update-ref$X git-symbolic-ref$X git-check-ref-format$X \
125
- git-name-rev$X git-pack-intersect$X $(SIMPLE_PROGRAMS)
125
+ git-name-rev$X git-pack-redundant$X $(SIMPLE_PROGRAMS)
126
127
# Backward compatibility -- to be removed after 1.0
128
PROGRAMS += git-ssh-pull$X git-ssh-push$X
git-repack.sh
+2
-2
@@ -45,7 +45,7 @@ if [ -z "$name" ]; then
45
if test "$remove_redandant" = t ; then
46
echo "Removing redundant packs."
47
sync
48
- redundant=$(git-pack-intersect -a)
48
+ redundant=$(git-pack-redundant -a)
49
if test "$redundant" != "" ; then
50
echo $redundant | xargs rm
51
fi
@@ -63,7 +63,7 @@ exit
63
if test "$remove_redandant" = t
64
then
65
sync
66
- redundant=$(git-pack-intersect -a)
66
+ redundant=$(git-pack-redundant -a)
67
if test "$redundant" != "" ; then
68
echo $redundant | xargs rm
69
fi
pack-redundant.c
renamed
+6
-4
@@ -8,8 +8,8 @@
8
9
#include "cache.h"
10
11
-static const char pack_intersect_usage[] =
12
-"git-pack-intersect [ -v ] < -a | <.pack filename> ...>";
11
+static const char pack_redundant_usage[] =
12
+"git-pack-redundant [ -v ] < -a | <.pack filename> ...>";
13
14
int all = 0, verbose = 0;
15
@@ -522,8 +522,10 @@ int main(int argc, char **argv)
522
523
for (i = 1; i < argc; i++) {
524
const char *arg = argv[i];
525
- if(!strcmp(arg, "--"))
525
+ if(!strcmp(arg, "--")) {
526
+ i++;
527
break;
528
+ }
529
if(!strcmp(arg, "-a")) {
530
all = 1;
531
continue;
@@ -533,7 +535,7 @@ int main(int argc, char **argv)
535
continue;
536
}
537
if(*arg == '-')
536
- usage(pack_intersect_usage);
538
+ usage(pack_redundant_usage);
539
else
540
break;
541
}