rust-lang / rust-lang/git2-rs

Check that file is not in git index

Open
#477 4 comments 1 reaction 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

Hi! Thanks for this project!

I am trying to rewrite a project from shell to rust. And I am facing several documentation problems.

Currently, I am stuck with git ls-files alternative in git2-rs. How can I do something like git ls-files --error-unmatch "$filename" with git2-rs? Original code: https://github.com/sobolevn/git-secret/blob/master/src/_utils/_git_secret_tools.sh#L349

Thanks!

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 referenced src/_utils/_git_secret_tools.sh at line 349 and review the git2-rs repository and index documentation for an equivalent operation. Compare the documented behavior with git ls-files --error-unmatch "$filename" and clarify the expected result for a file absent from the index.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, rust, shell
Domain
tooling
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.