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

Re: [PATCH 5/7] remote-helpers: add support for an export command

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 1, 2010, 04:54 UTC
Message-ID
<7v634bsrg5.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1269881309-19690-6-git-send-email-srabbelier@gmail.com>
Sverre Rabbelier <srabbelier@gmail.com> writes:
Show 5 quoted lines
> ---
>
> 	This complements the 'import' capability, making it possible
> 	to use remote-helpers with only fast-import/fast-exports
> 	streams.

I've queued this in 'pu' only to say "I've seen it", but I suspect that this has to wait until after 1.7.1. I've been trying to shoot for 6-8 week cycle as originally envisioned, and if things go as planned, post 1.7.1 cycle opens around mid April.

Show 17 quoted lines
> +	for(ref = remote_refs; ref; ref = ref->next) {
> +		char* private;
> +		unsigned char sha1[20];
> +
> +
> +		if(data->refspecs)
> +			private = apply_refspecs(data->refspecs, data->refspec_nr, ref->name);
> +
> +		if(private && !get_sha1(private, sha1))
> +		{
> +			strbuf_addf(&buf, "^%s", private);
> +			string_list_append(strbuf_detach(&buf, NULL), &revlist_args);
> +		}
> +
> +		string_list_append(ref->name, &revlist_args);
> +
> +	}

What's happening here? Style violations aside, it appears that "private" is accessed uninitialized when data->refspecs is NULL.

Previous: Sverre RabbelierNext: Sverre Rabbelier
Message 9 of 14 in “remote-helpers: exporting”
  1. 0/7 remote-helpers: exportingSverre Rabbelier, Mar 29, 2010
  2. 1/7 clone: pass the remote name to remote_getSverre Rabbelier, Mar 29, 2010
  3. 2/7 clone: also configure url for bare clonesSverre Rabbelier, Mar 29, 2010
  4. 3/7 fast-import: always create marks_file directoriesSverre Rabbelier, Mar 29, 2010
  5. 4/7 remote-helpers: allow requesing the path to the .git directorySverre Rabbelier, Mar 29, 2010
  6. 5/7 remote-helpers: add support for an export commandSverre Rabbelier, Mar 29, 2010
  7. Daniel BarkalowMar 29, 2010
  8. Sverre RabbelierMar 29, 2010
  9. Junio C HamanoApr 1, 2010
  10. Sverre RabbelierApr 1, 2010
  11. 6/7 remote-helpers: add testgit helperSverre Rabbelier, Mar 29, 2010
  12. 7/7 remote-helpers: add tests for testgit helperSverre Rabbelier, Mar 29, 2010
  13. Jonathan NiederApr 12, 2010
  14. Sverre RabbelierApr 12, 2010

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.