Re: [PATCH v2 3/4] builtin/stash: provide a way to export stashes to a ref

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

 



On Tue, Mar 29 2022, brian m. carlson wrote:

> +	if (argc) {
> +		/*
> +		 * Find each specified stash, and load data into the array.
> +		 */
> +		for (int i = 0; i < argc; i++) {
> +			ALLOC_GROW_BY(items, nitems, 1, nalloc);
> +			if (parse_revision(&revision, argv[i], 0) ||
> +			    get_oid_with_context(the_repository, revision.buf,
> +						 GET_OID_QUIETLY | GET_OID_GENTLY,
> +						 &items[i], &unused)) {
> +				error(_("unable to find stash entry %s"), argv[i]);
> +				res = -1;
> +				goto out;
> +			}
> +		}

One thing I missed on the first read-through, in the earlier commit you
factored out parse_revision(), which now contains this code (which was
here before this series):
	
	+	if (!commit) {
	+		if (!ref_exists(ref_stash)) {
	+			fprintf_ln(stderr, _("No stash entries found."));
	+			return -1;
	+		}

Aren't we going to print both "No stash entries" and "unable to find
stash entry %s" in those cases?



[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