Should SecondsSinceUnixEpoch
be i64
instead of u64
?
#915
Replies: 2 comments 3 replies
-
That's a great idea, I simply didn't think of that as a use-case and followed I will be addressing that and validate it actually works with dates using the repository you linked. The other topic about discoverability is an interesting one - admittedly I didn't yet try to make that easy, but believe it's merely about getting started and maintaining a list consistently. From that point on, I will be setting up a document for that that is easy to discover, maintain and contribute to. Thanks for all your feedback, I will post here for updates. |
Beta Was this translation helpful? Give feedback.
-
I do understand how the project is still growing and that keep up with documentation at this stage is a huge pain point from the developer/maintainer point of view, so I fully understand the difficulty in that. That being said, I think introducing additional examples will be a useful first steps in providing discoverability - given that I just finished a way to extract logs, I could extract the relevant bits and convert that into a standalone example. This might take me a bit of time but if examples like this are something welcomed I will make a pull request at some point. |
Beta Was this translation helpful? Give feedback.
-
I noted in commit 4bc0ae1 that it was changed from the original u32 into u64 now, but I can't help but wonder why not follow
libgit2
in usingint64_t
instead? While I will acknowledge that the official Git client also use the unsigned int type, it doesn't make sense as i64 is plenty big enough enough for billions of years into the future already, that the format does not exclude the ability for backdated commits before the unix epoch (related StackOverflow thread), and that there exists efforts that make use of git commits using historical dates. For example, an archive of all French Civil Codes use backdated commits starting from 1800s), like this particular commit:Naturally, the default git client simply truncate the date to 0 so showing that as if it was "committed" at the Unix Epoch, which is wrong.
Anyway,
gix
as a whole is a lot more complete than I thought, and in fact quite usable as alibgit2
replacement for many low level features, but the lack of documentation (well, it's a work in progress, but I mean more a lack of code comment referencing similar API tolibgit2
) is a significant pain point, especially coming in fromlibgit2
where things likerevparse_single
was the spelling and it took me two days to find the equivalent (asgix::Repository::rev_parse_single()
- I latergit grep rev-parse
as per thegit rev-parse
command and that finally lead somewhere - tunnel visioned from using the API too exclusively), so thankfully I didn't end up thinking I need to write that feature and later find that it already exists... but I digress now.Beta Was this translation helpful? Give feedback.
All reactions