News for hackers. Stuff that matters.
Re:All 104 amendments to the Constitution of India as Git co... by frob on Sunday January 24, 2021 @12:25PM (#25893785)
I always love these sort of things. Here's the same for the US constitution: https://github.com/JesseKPhillips/USA-Constitution

As a bonus, this one attempted to backdate the commits in a cyphered way (git dates are unix timestamps so the author needed to get clever to do anything before t=0 in 1970).

Re:All 104 amendments to the Constitution of India as Git co... by mishraprince on Sunday January 24, 2021 @01:00PM (#25894082)
I did think about having correct dates and authors, but then I got lazy and in fact got more focussed on getting all the amendments in place. Now that the core work is done, I'll add corrected dates (perhaps real date + 100 years), authors and committers in one of the later commits. Thanks for reminding!
Re:All 104 amendments to the Constitution of India as Git co... by ardy42 on Sunday January 24, 2021 @04:35PM (#25896328)
> I did think about having correct dates and authors, but then I got lazy and in fact got more focussed on getting all the amendments in place. Now that the core work is done, I'll add corrected dates (perhaps real date + 100 years), authors and committers in one of the later commits. Thanks for reminding!

How would you even do authorship? These amendments are basically institutional works, with sometimes convoluted histories (e.g. https://en.wikipedia.org/wiki/Twenty-seventh_Amendment_to_th...).

Re:All 104 amendments to the Constitution of India as Git co... by saghm on Sunday January 24, 2021 @06:39PM (#25897369)
GP is the person who submitted this story, so I assume they're talking about the Indian Constitution, not the US one. It's possible that their legal system attributes authorship more directly than the US does.
Re:All 104 amendments to the Constitution of India as Git co... by chungy on Sunday January 24, 2021 @01:43PM (#25894512)
> git dates are unix timestamps so the author needed to get clever to do anything before t=0 in 1970

More specifically, git dates are unsigned timestamps with an epoch in common with Unix timestamps.

The big difference is that Unix timestamps are signed and have no problem whatsoever backdating to 1776.

Re:All 104 amendments to the Constitution of India as Git co... by progval on Sunday January 24, 2021 @06:17PM (#25897220)
> git dates are unsigned timestamps

You are thinking of the in-memory representation of the (main) implementation, not the git format itself.

The on-disk/wire format is text representation, encoded in decimal. You can add a minus sign in front of it, git won't crash when parsing it. The implementation will, however, display the wrong date on git log, but it's a bug that git developers are working on.

For example (coincidentally, it is also a constitution):

    $ git init
    $ curl https://archive.softwareheritage.org/api/1/vault/revision/5e8f80061263d818ae3fc6c8d2086b5278f271ea/gitfast/raw/ | gunzip | git fast-import > /dev/null
    $ git show 5e8f80061263d818ae3fc6c8d2086b5278f271e | grep Date
    Date:   Thu Jan 1 00:00:00 1970 +0000
    $ git cat-file -p 5e8f80061263d818ae3fc6c8d2086b5278f271e | grep author
    author State Constitutional Conventions <> -5706313200 -0455
Re:All 104 amendments to the Constitution of India as Git co... by rcoveson on Sunday January 24, 2021 @02:03PM (#25894711)
I wouldn't say "no problem whatsoever." Lots of things encode Unix time as a 32 bit signed integer, which can't date back further than 1901.

Any fixed-with type is going to have a lower- and upper-bound; whether it has a sign or not doesn't change that.

If git was trying to choose a bound for a 32 bit timestamp, I think 1970 is a reasonable starting point; doubling your future space is more important than covering space in the past. If it's 64-bit, though, then it's kind of silly to not just envelop the entirety of human history with all the room you've got (as a 64 bit signed integer with 0=year 1970 does).

Re:All 104 amendments to the Constitution of India as Git co... by smlckz on Sunday January 24, 2021 @01:01PM (#25894094)
It should not be hard to do the same to this one, given that the constitution of india came into effect on 26th january 1950.
Re:All 104 amendments to the Constitution of India as Git co... by pickpuck on Monday January 25, 2021 @05:59PM (#25910115)
I wonder how difficult it would be to show the evolution of US jurisprudence via court ruling precedents.
Re:All 104 amendments to the Constitution of India as Git co... by 404mm on Sunday January 24, 2021 @06:43PM (#25897401)
The commit messages to amendments are a missed opportunity here.