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

Re: [PATCH] builtin/tag.c: return appropriate value when --points-at finds an empty list

From
Derrick Stolee <stolee@gmail.com>
Date
Dec 11, 2017, 14:05 UTC
Message-ID
<ca421d38-2d9a-8681-7947-3799c59984a7@gmail.com>
In-Reply-To
<20171211134409.13339-1-g3orge.app@gmail.com>
On 12/11/2017 8:44 AM, George Papanikolaou wrote:
> `git tag --points-at` can simply return if the given rev does not have
> any tags pointing to it. It's not a failure but it shouldn't return
> with 0 value.

I disagree. I think the 0 return means "I completed successfully" and the empty output means "I didn't find any tags pointing to this object."

Changing the return value here could break a lot of scripts out in the wild, and I consider this to be an "API" compatibility that needs to stay as-is.

What are you using "--points-at" where you need a nonzero exit code instead of a different indicator?

Thanks, -Stolee

Previous: George PapanikolaouNext: George Papanikolaou
Message 2 of 3 in “builtin/tag.c: return appropriate value when --points-at finds an empty list”
  1. builtin/tag.c: return appropriate value when --points-at finds an empty listGeorge Papanikolaou, Dec 11, 2017
  2. Derrick StoleeDec 11, 2017
  3. George PapanikolaouDec 11, 2017

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.