Tree#diff: unexpected behavior of option :ignore_submodules
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 2.3k
- Forks
- 293
- PR merge metrics
- No merged PRs in 30d
Description
| :ignore_submodules | if true, submodules will be excluded from the diff completely. |
|---|
Problem
repo = Rugged::Repository.new('.')
commit = repo.head.target_id
diff = Rugged::Tree.diff(repo, nil, commit, ignore_submodules: true)
I expect excluding all submodules files but have following:
diff.patches.map { |p| p.delta.new_file[:path] }
=> [".gitmodules", "submodule_repo"]
What is wrong with it?
Contributor guide
No contributing guide indexed for this repository
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 with the Rugged::Tree.diff API documented at rubydoc.info and reproduce the provided Ruby snippet with ignore_submodules: true. Check how diff.patches reports .gitmodules and submodule_repo; done means the option's behavior is clarified or corrected so submodule entries are excluded as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, ruby
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100