Re: Teach git-bundle to read revision arguments from stdin like git-rev-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Adam Brewster <adambrewster@xxxxxxxxx> writes:

> @@ -227,8 +228,16 @@ int create_bundle(struct bundle_header *header, const char *path,
>  
>  	/* write references */
>  	argc = setup_revisions(argc, argv, &revs, NULL);
> -	if (argc > 1)
> -		return error("unrecognized argument: %s'", argv[1]);
> +
> +	for (i = 1; i < argc; i++) {
> +		if (!strcmp(argv[i], "--stdin")) {
> +			if (read_from_stdin++)
> +				die("--stdin given twice?");

Hmm, do we deeply care about this case?  What bad things coulc happen if
you call read_revisions_from_stdin() twice?

> +			read_revisions_from_stdin(&revs);
> +			continue;
> +		}
> +		return error("unrecognized argument: %s'", argv[i]);
> +	}
>  
>  	for (i = 0; i < revs.pending.nr; i++) {
>  		struct object_array_entry *e = revs.pending.objects + i;
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux