Re: [PATCH 2/4] builtin/rev-parse: learn --null-oid

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

 



Taylor Blau <me@xxxxxxxxxxxx> writes:

> In either case, I think '--zero-oid' makes more sense than '--null-oid'
> (and it matches the tests that are already written). The pair
> '--zero-oid' and '--empty-oid=<type>' make sense to me.

I am not sure rev-parse should even know about "empty-oid".  An end
user or a script who wants to learn what name an empty blob has can
and should ask "git hash-object -t blob --stdin </dev/null".

I can buy --zero-oid might be handy, but don't see a pressing need
if it is merely to support our test suite and sample hooks.
Instead, something like

  ZERO_OID=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')

should suffice, no?

Take this as a mild indifference, not as a strong rejection.




[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