​​
On Tue, Oct 18, 2016 at 7:44 AM, 'Terry Brown' via leo-editor <
leo-editor@googlegroups.com> wrote:

​Thanks for these constructive remarks, Terry.​

we want
> ​...a unique commit ID.  That doesn't have to be the commit's hash.
>
​...

> If we know the timestamp, 201501234567, we know the the commit, done.
>

​Reasonable.​

​

> If you use the hash, you need to know if it's a hash for a system with or
> without .git, because in one case it's a preceding hash, and in the other
> it's the current hash.
>

​No.  Commit hooks are always for systems with git.​


Also, every time there's a merge, the preceding hash has no unique
> ​ ​
> following commit.
>

​A nit.​


So let's check:
> ​ ​
> In my Leo mail folder:
> ​ grep...​
>
​...​


> 121 message since August 2014.


​But has anyone actually used those id's?  I don't think I ever have.

To me that's high enough utilization to keep the only robust,
> unambiguous method we have for identifying specific commits.
>

​I'm still not entirely convinced, but the following would be better hook:

    import leo.core.leoVersion as v
    v.create_commit_timestamp_json(after=True)​

This will create a new-style .json file (see below). The id/hash will be
the string: "after <the last hash>" I think this is clever. It (mostly)
solves the problem of looking ahead to see what the hash for the upcoming
commit will be.

*Summary*

Further discussions will not block b1.

The following code changes should happen before b1, coming later today:

- create_commit_timestamp_json will create legacy timestamp fields, as well
as the new "date" and "hash" fields.  If the new "after" keyword arg is
True, the hash will start with "after ".

- get_version_from_json should report "legacy" timestamps as before.

In short, both leoVersion.py and any new git hooks should handle .json
files in an upward compatible way. The user will always see at least as
much data in the signon as before.

Thanks again, Terry.  This has been an enjoyable debate.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to