diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-11-23 22:30:08 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-11-23 22:30:08 -0800 |
commit | e61f25f3a6bb5dcbb5ae5f8b4ad26c308982373c (patch) | |
tree | 2add4512857b856b31b35f2b827975c3d916ff63 /bundle.c | |
parent | 2a971012b6be236c46cab7212239d70d92b02715 (diff) | |
parent | d21fc9342cd82bb48bfbf9f54024ae2d4e16a9a3 (diff) | |
download | git-e61f25f3a6bb5dcbb5ae5f8b4ad26c308982373c.tar.gz |
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); |