X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=bundle.c;h=65ea26bdb8c2cef671030c3a62d87d84612e8144;hb=8a1c0d322e9b6963f3be6949475983d517d79796;hp=717a712e9a6c125a684cd4ee39ce5cbfaecef91d;hpb=03c6e97f809e5b89089a2c689d6a319e8d471455;p=git.git diff --git a/bundle.c b/bundle.c index 717a712e9..65ea26bdb 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); @@ -380,8 +372,10 @@ int create_bundle(struct bundle_header *header, const char *path, close(rls.in); if (finish_command(&rls)) return error ("pack-objects died"); - if (!bundle_to_stdout) - commit_lock_file(&lock); + if (!bundle_to_stdout) { + if (commit_lock_file(&lock)) + die_errno("cannot create '%s'", path); + } return 0; }