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

Re: [PATCH 3/3] commit-graph: error out on invalid commit oids in 'write --stdin-commits'

From
Jeff King <peff@peff.net>
Date
Apr 3, 2020, 19:51 UTC
Message-ID
<20200403195103.GA663412@coredump.intra.peff.net>
In-Reply-To
<20200403193842.GA7859@szeder.dev>
On Fri, Apr 03, 2020 at 09:38:42PM +0200, SZEDER Gábor wrote:
Show 8 quoted lines
> > > Can you explain more why the old behavior is a problem?
> 
> Because when I do:
> 
>    # sometimes I forgot that refs are not good...
>    $ echo HEAD | git commit-graph write --stdin-commits
> 
> then I get _nothing_: neither an error, nor a commit-graph.

OK, that makes more sense: it's an input format error, because we only take hex oids.

Do you care about complaining about:
  git rev-parse HEAD^{tree} | git commit-graph write --stdin-commits
? That's the case that's much more interesting, I think.
> Or introduce 'git commit-graph write --stdin-refs'?  Or teach
> '--stdin-commits' to DWIM and accept and parse refs?  Though the
> question still remains what to do with refs that can't be peeled back
> to commits
Right. I think there are two orthogonal questions:
  - whether to resolve arbitrary names to objects and how to handle such
    input if we don't
  - what to do with an oid (whether given as hex or resolved from a
    name) that isn't a commit-ish
-Peff
Previous: SZEDER GáborNext: SZEDER Gábor
Message 10 of 19 in “commit-graph: error out on invalid commit oids in 'write --stdin-commits'”
  1. 0/3 commit-graph: error out on invalid commit oids in 'write --stdin-commits'SZEDER Gábor, Aug 5, 2019
  2. 1/3 t5318-commit-graph: use 'test_expect_code'SZEDER Gábor, Aug 5, 2019
  3. 2/3 commit-graph: turn a group of write-related macro flags into an enumSZEDER Gábor, Aug 5, 2019
  4. 3/3 commit-graph: error out on invalid commit oids in 'write --stdin-commits'SZEDER Gábor, Aug 5, 2019
  5. Derrick StoleeAug 5, 2019
  6. SZEDER GáborAug 5, 2019
  7. Jeff KingApr 3, 2020
  8. Taylor BlauApr 3, 2020
  9. SZEDER GáborApr 3, 2020
  10. Jeff KingApr 3, 2020
  11. SZEDER GáborApr 3, 2020
  12. Jeff KingApr 3, 2020
  13. Taylor BlauApr 13, 2020
  14. Jeff KingApr 13, 2020
  15. Taylor BlauApr 14, 2020
  16. Taylor BlauApr 3, 2020
  17. Junio C HamanoApr 3, 2020
  18. Taylor BlauApr 3, 2020
  19. SZEDER GáborAug 5, 2019

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.