rust-lang / rust-lang/git2-rs

how can i see changes in merge request?

Open
#1,005 0 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

i try to use diff to check source_branch and target_branch last commit, at first, it seemed like everything was normal

but when i try to use revert, diff will keep the revert changes in

my steps:

  1. create aaa in master
  2. create branch dev
  3. create bbb in dev
  4. create merge dev -> master
  5. merged it and revert it
  6. create ccc in dev
  7. create merge dev -> master again

follow this steps, i can't use diff in here, i check diff in this source and target branch last commit, it have 'bbb' and 'ccc' in the same time, but if i try it in git bash, it only have 'ccc'

i was use repo.diff_tree_to_tree and diff.deltas().enumerate()

i don't know is it something wrong with my code, or it really can't use diff in here, please get some suggestions, thank you.

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 by reproducing the described branch, merge, revert, and second-merge sequence, then inspect the behavior of repo.diff_tree_to_tree and diff.deltas().enumerate(). Compare the resulting deltas with Git Bash for the same source and target commits; done means determining whether the discrepancy is expected or a reproducible git2-rs bug.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Bug
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.