diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-11-24 07:30:08 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-11-24 07:30:08 +0100 |
commit | e61f25f3a6bb5dcbb5ae5f8b4ad26c308982373c (patch) | |
tree | 2add4512857b856b31b35f2b827975c3d916ff63 /bundle.c | |
parent | Merge branch 'mr/gitweb-snapshot' (diff) | |
parent | Add trivial tests for --stdin option to log family (diff) | |
download | git-e61f25f3a6bb5dcbb5ae5f8b4ad26c308982373c.tar.xz git-e61f25f3a6bb5dcbb5ae5f8b4ad26c308982373c.zip |
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.c | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -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); |