Re: [PATCH 2/2] builtin-remote: make rm operation safer in mirrored repository

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

 



On Tue, Feb 03, 2009 at 12:51:13PM -0500, Jay Soffian wrote:

> So much work for what seemed such a minor change. :) I hope this version is
> well-polished enough.

The more minor the change, the more major the comments. :) Thanks for
sticking with it. This version looks good to me except for one thing:

> +	/* don't delete non-remote branches */
> +	if (prefixcmp(refname, "refs/remotes")) {
> +		if (!prefixcmp(refname, "refs/heads/"))
> +			string_list_append(abbrev_branch(refname),
> +					   branches->skipped);
> +		return 0;
> +	}

Why does this version introduce the "only skip refs/heads/" check?
Shouldn't we also protect other random refs (or if not, shouldn't the
commit message explain why not)?

> +	if (skipped.nr) {
> +		fprintf(stderr, skipped.nr == 1 ?
> +			"Note: A non-remote branch was not removed; "
> +			"to delete it, use:\n" :
> +			"Note: Non-remote branches were not removed; "
> +			"to delete them, use:\n");

Ooh, proper pluralization. Classy.

-Peff
--
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