libgit2 / libgit2/libgit2sharp
Commits date wrong when date is prior to 01/01/1970
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 3.5k
- Forks
- 925
- PR merge metrics
- No merged PRs in 30d
Description
When creating a commit with a signature dated before 01/01/1970,
even if the signature is correct, the commit gets a wrong date.
(If intended, is there a work-around ?)
Reproduction steps
var author = Signature(author_name, author_email, author_date)
var last_commit = repo.Commit(message, author, author)
Expected behavior
author.When == last_commit.Author.When
Actual behavior
if author_date < 01/01/1970
author.When != last_commit.Author.When
Version of LibGit2Sharp (release number or SHA1)
libgit2sharp 0.26.0
Operating system(s) tested; .NET runtime tested
dotnet 2.2.401 on Ubuntu 18.04.3 LTS
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue from the Signature and Commit calls in the report with an author date before 01/01/1970 on .NET 2.2.401 and Ubuntu 18.04.3. Trace how the commit author date is serialized and read back, then verify that author.When equals last_commit.Author.When for pre-epoch dates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, git
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100