aboutsummaryrefslogtreecommitdiff
path: root/builtin/pack-objects.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2012-02-01 22:17:19 +0700
committerJunio C Hamano <gitster@pobox.com>2012-02-01 13:04:11 -0800
commit3a2ec52e99deabbf000cb576ccde73a12934bf60 (patch)
tree78c2e8ff543f3353d3c0a52412fe02c5c7674af5 /builtin/pack-objects.c
parent6a301345a545ce5faf1a054d6c9bf1558dd46b0d (diff)
downloadgit-3a2ec52e99deabbf000cb576ccde73a12934bf60.tar.gz
git-3a2ec52e99deabbf000cb576ccde73a12934bf60.tar.xz
pack-objects: remove bogus comment
The comment was introduced in b5d97e6 (pack-objects: run rev-list equivalent internally. - 2006-09-04), stating that git pack-objects [options] base-name <refs...> is acceptable and refs should be passed into rev-list. But that's not true. All arguments after base-name are ignored. Remove the comment and reject this syntax (i.e. no more arguments after base name) Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/pack-objects.c')
-rw-r--r--builtin/pack-objects.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 297f79285..80e311457 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -2484,23 +2484,10 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
usage(pack_usage);
}
- /* Traditionally "pack-objects [options] base extra" failed;
- * we would however want to take refs parameter that would
- * have been given to upstream rev-list ourselves, which means
- * we somehow want to say what the base name is. So the
- * syntax would be:
- *
- * pack-objects [options] base <refs...>
- *
- * in other words, we would treat the first non-option as the
- * base_name and send everything else to the internal revision
- * walker.
- */
-
if (!pack_to_stdout)
base_name = argv[i++];
- if (pack_to_stdout != !base_name)
+ if (pack_to_stdout != !base_name || argv[i])
usage(pack_usage);
if (!pack_to_stdout && !pack_size_limit)