rust-lang / rust-lang/git2-rs

git2::IndexTime is not ready for year 2038

Open
#1,191 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
2.1k
Forks
450
Avg merge
11m
Merged PRs (30d)
1

Description

Trying to construct a git2::IndexTime, I noticed that the signature of new is not year 2038 compatible.

pub fn new(seconds: i32, nanoseconds: u32) -> IndexTime

The function takes a signed 32-bit integer, which will overlow somewhere in 2038.

More information at https://theyear2038problem.com/

I see that the issue seems to be fixed in master but not yet published. I'll close this issue if the new version gets published.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the git2::IndexTime::new API described in the issue and compare the published version with master, where the issue says the problem is fixed. Confirm the current master behavior and check the release or publication state; done when a published version includes the year-2038-compatible API.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.