git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 5/8] builtin/clone: compute checkout metadata for clones

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Mar 15, 2020, 17:44 UTC
Message-ID
<20200315174445.GA6910@camp.crustytoothpaste.net>
In-Reply-To
<20200315103929.GH3122@szeder.dev>
On 2020-03-15 at 10:39:29, SZEDER Gábor wrote:
Show 13 quoted lines
> On Tue, Mar 10, 2020 at 06:20:43PM +0000, brian m. carlson wrote:
> > diff --git a/builtin/clone.c b/builtin/clone.c
> > index 1ad26f4d8c..00e5427ef1 100644
> > --- a/builtin/clone.c
> > +++ b/builtin/clone.c
> > @@ -780,11 +780,12 @@ static int checkout(int submodule_progress)
> >  	if (!strcmp(head, "HEAD")) {
> >  		if (advice_detached_head)
> >  			detach_advice(oid_to_hex(&oid));
> > +		free(head);
> > +		head = NULL;
> 
> Coccinelle suggests to use FREE_AND_NULL(head) instead.
I'll do that.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
Previous: SZEDER GáborNext: Junio C Hamano
Message 6 of 14 in “Additional metadata for filter processes”
  1. 0/8 Additional metadata for filter processesbrian m. carlson, Mar 10, 2020
  2. 1/8 builtin/checkout: pass branch info down to checkout_worktreebrian m. carlson, Mar 10, 2020
  3. 3/8 convert: provide additional metadata to filtersbrian m. carlson, Mar 10, 2020
  4. 5/8 builtin/clone: compute checkout metadata for clonesbrian m. carlson, Mar 10, 2020
  5. SZEDER GáborMar 15, 2020
  6. brian m. carlsonMar 15, 2020
  7. Junio C HamanoMar 15, 2020
  8. 4/8 builtin/checkout: compute checkout metadata for checkoutsbrian m. carlson, Mar 10, 2020
  9. 6/8 builtin/rebase: compute checkout metadata for rebasesbrian m. carlson, Mar 10, 2020
  10. 2/8 convert: permit passing additional metadata to filter processesbrian m. carlson, Mar 10, 2020
  11. Junio C HamanoMar 11, 2020
  12. brian m. carlsonMar 12, 2020
  13. 8/8 t0021: test filter metadata for additional casesbrian m. carlson, Mar 10, 2020
  14. 7/8 builtin/reset: compute checkout metadata for resetbrian m. carlson, Mar 10, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.