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

Re: Re* [PATCH] Improvements to git-archive tests and add_submodule_odb()

From
Heiko Voigt <hvoigt@hvoigt.net>
Date
Dec 3, 2013, 20:42 UTC
Message-ID
<20131203204208.GC4629@sandbox-ub>
In-Reply-To
<xmqqpppdok2f.fsf_-_@gitster.dls.corp.google.com>
Hi,
On Tue, Dec 03, 2013 at 10:39:36AM -0800, Junio C Hamano wrote:
> OK, thanks, then let's do this.
Yes, sounds good.
Cheers Heiko
Show 36 quoted lines
> -- >8 --
> From: Nick Townsend <nick.townsend@mac.com>
> Date: Mon, 25 Nov 2013 15:31:09 -0800
> Subject: [PATCH] ref-iteration doc: add_submodule_odb() returns 0 for success
> 
> The usage sample of add_submodule_odb() function in the Submodules
> section expects non-zero return value for success, but the function
> actually reports success with zero.
> 
> Helped-by: René Scharfe <l.s.r@web.de>
> Reviewed-by: Heiko Voigt <hvoigt@hvoigt.net>
> Signed-off-by: Nick Townsend <nick.townsend@mac.com>
> ---
>  Documentation/technical/api-ref-iteration.txt | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/technical/api-ref-iteration.txt b/Documentation/technical/api-ref-iteration.txt
> index aa1c50f..02adfd4 100644
> --- a/Documentation/technical/api-ref-iteration.txt
> +++ b/Documentation/technical/api-ref-iteration.txt
> @@ -50,10 +50,10 @@ submodules object database. You can do this by a code-snippet like
>  this:
>  
>  	const char *path = "path/to/submodule"
> -	if (!add_submodule_odb(path))
> +	if (add_submodule_odb(path))
>  		die("Error submodule '%s' not populated.", path);
>  
> -`add_submodule_odb()` will return an non-zero value on success. If you
> +`add_submodule_odb()` will return zero on success. If you
>  do not do this you will get an error for each ref that it does not point
>  to a valid object.
>  
> -- 
> 1.8.5-262-g1a2486c
> 
Previous: Junio C HamanoNext: Nick Townsend
Message 6 of 13 in “Improvements to git-archive tests and add_submodule_odb()”
  1. Improvements to git-archive tests and add_submodule_odb()Nick Townsend, Dec 3, 2013
  2. Nick TownsendDec 3, 2013
  3. Junio C HamanoDec 3, 2013
  4. Heiko VoigtDec 3, 2013
  5. Re* [PATCH] Improvements to git-archive tests and add_submodule_odb()Junio C Hamano, Dec 3, 2013
  6. Heiko VoigtDec 3, 2013
  7. Nick TownsendDec 3, 2013
  8. Eric SunshineDec 3, 2013
  9. Junio C HamanoDec 3, 2013
  10. Additional git-archive testsNick Townsend, Dec 5, 2013
  11. Junio C HamanoDec 5, 2013
  12. Nick TownsendDec 10, 2013
  13. Junio C HamanoDec 10, 2013

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.