From: Junio C Hamano Date: Mon, 06 Feb 2012 01:27:29 GMT Subject: Re: [PATCH] branch --edit-description: protect against mistyped branch name Message-ID: <7v62fkda4e.fsf@alter.siamese.dyndns.org> In-Reply-To: <7vaa4wda60.fsf_-_@alter.siamese.dyndns.org> Junio C Hamano writes: > + 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().