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

--ignore-invalid flag to git log et al.?

From
Paul Mackerras <paulus@samba.org>
Date
Jul 11, 2007, 07:29 UTC
Message-ID
<18068.34542.502048.222112@cargo.ozlabs.ibm.com>
Junio,

What would you think about a --ignore-invalid flag for things like git rev-list and git log, to tell it to ignore any refs on the command line that are not valid objects?

Currently there is a buglet in gitk where if a user puts some sort of ref on the command line, and then makes the ref invalid (e.g. by deleting the ref if it is a head or tag, or doing a git prune if it is a sha1 ID with no head/tag pointing to it), and then does "Update" in gitk, it will get an error because of the now-invalid ref. (Yes, this is a bit of a corner case, but I have had a user point out this behaviour to me.) With a --ignore-invalid flag, gitk could use this when doing "Update" to avoid the error.

An alternative would be to have some way to validate refs. I don't know how to do that efficiently. I think I would not want to have to do a fork/exec for every ref that I wanted to check.

Thoughts?
Paul.
Next: Alex Riesen
Message 1 of 4 in “--ignore-invalid flag to git log et al.?”
  1. Paul MackerrasJul 11, 2007
  2. Alex RiesenJul 11, 2007
  3. Paul MackerrasJul 11, 2007
  4. Junio C HamanoJul 11, 2007

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.