Re: [PATCH] Add a birdview-on-the-source-code section to the user manual

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

 



On 2007-05-09 01:10:13 +0200, Johannes Schindelin wrote:

> On Tue, 8 May 2007, Karl Hasselström wrote:
>
> > I think this is less confusing:
> >
> >   This variable will contain the 160-bit SHA-1.
> >
> > It avoids talking of hex, since it's not really stored in hex
> > format any more than any other binary number with a number of bits
> > divisible by four. And it avoids saying big-endian, which is not
> > relevant anyway since we don't use hashes as integers.
>
> Well, I do not buy into that. First, we _have_ to say that it is
> big-endian. It was utterly confusing to _me_ that the hash was not
> little endian, as I expected on an Intel processor.

If you think of it as a integer and not a byte array, then yes. But
fair enough, if it confused you, it'd probably confuse others as well.

> And I'd rather mention the hex representation (what you see in
> git-log and git-ls-tree). This helps debugging, believe me.

But that byte array doesn't store the hex representation!

There is a trivial transformation that will convert a 20-byte integer
to a 40-character hex string representation of that integer: translate
each nibble to one hex digit. But the code snippet you gave uses the
former representation, and that's the point I thought you were trying
to make in the first place.

-- 
Karl Hasselström, kha@xxxxxxxxxxx
      www.treskal.com/kalle
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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