summaryrefslogtreecommitdiff
path: root/bundle.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-11-24 06:30:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-11-24 06:30:08 (GMT)
commite61f25f3a6bb5dcbb5ae5f8b4ad26c308982373c (patch)
tree2add4512857b856b31b35f2b827975c3d916ff63 /bundle.c
parent2a971012b6be236c46cab7212239d70d92b02715 (diff)
parentd21fc9342cd82bb48bfbf9f54024ae2d4e16a9a3 (diff)
downloadgit-e61f25f3a6bb5dcbb5ae5f8b4ad26c308982373c.zip
git-e61f25f3a6bb5dcbb5ae5f8b4ad26c308982373c.tar.gz
git-e61f25f3a6bb5dcbb5ae5f8b4ad26c308982373c.tar.bz2
Merge branch 'jc/log-stdin'
* jc/log-stdin: Add trivial tests for --stdin option to log family Make --stdin option to "log" family read also pathspecs setup_revisions(): do not call get_pathspec() too early Teach --stdin option to "log" family read_revision_from_stdin(): use strbuf Conflicts: revision.c
Diffstat (limited to 'bundle.c')
-rw-r--r--bundle.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/bundle.c b/bundle.c
index 717a712..ff97adc 100644
--- a/bundle.c
+++ b/bundle.c
@@ -204,7 +204,6 @@ int create_bundle(struct bundle_header *header, const char *path,
int i, ref_count = 0;
char buffer[1024];
struct rev_info revs;
- int read_from_stdin = 0;
struct child_process rls;
FILE *rls_fout;
@@ -256,15 +255,8 @@ int create_bundle(struct bundle_header *header, const char *path,
/* write references */
argc = setup_revisions(argc, argv, &revs, NULL);
- for (i = 1; i < argc; i++) {
- if (!strcmp(argv[i], "--stdin")) {
- if (read_from_stdin++)
- die("--stdin given twice?");
- read_revisions_from_stdin(&revs);
- continue;
- }
- return error("unrecognized argument: %s'", argv[i]);
- }
+ if (argc > 1)
+ return error("unrecognized argument: %s'", argv[1]);
object_array_remove_duplicates(&revs.pending);