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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 03, 2020 at 09:38:42PM +0200, SZEDER Gábor wrote:

> > > 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux