Re: [PATCH] branch --edit-description: protect against mistyped branch name
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 6, 2012, 01:27 UTC
- Message-ID
- <7v62fkda4e.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <7vaa4wda60.fsf_-_@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 11 quoted lines
> + if (!ref_exists(branch_ref.buf)) {
> + strbuf_reset(&branch_ref);
> +
> + if (!argc)
> + return error("No commit on branch '%s' yet.",
> + branch_name);
> + else
> + return error("No such branch '%s'.", branch_name);
> + }
> + strbuf_reset(&branch_ref);
> +Of course these should be strbuf_release().