Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When comparing between different branches, an invalid commit is used as source. #814

Open
MeroZemory opened this issue Apr 10, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@MeroZemory
Copy link

MeroZemory commented Apr 10, 2024

I compared commits from different branches (from 994ec6bc5194ac7fd323033cc83cebf2d0df7f42 to b73b6b229e0fa3ef10f8ebd1ebbfbd72011a6f7f),
but the comparison of a specific file (settings. json), the comparison result is actually a different comparison result (from 9f31ac4e4891b8641f655ecc18c1e6578e206647 to b73b6b229e0fa3ef10f8ebd1ebbfbd72011a6f7f).

This was the case no matter which commit in the new branch I tried to compare.

To reproduce this, I did a simple test of creating a new branch by checking out to the old commit from an new repository, committing a few changes, and naming the branch, but I failed to reproduce it.

  • I tested further and found that 9f31ac4e is used as source, even when comparing commits e386ec2d, 994ec6bc in the same branch.

main branch:

  • b73b6b229e0fa3ef10f8ebd1ebbfbd72011a6f7f
  • 9f31ac4e4891b8641f655ecc18c1e6578e206647
    new branch:
  • 994ec6bc5194ac7fd323033cc83cebf2d0df7f42

Steps to Reproduce
Steps to reproduce the behaviour:

  1. Clone: https://github.com/MeroZemory/temp-bug-report.git
  2. Compare commits from 994ec6bc to b73b6b22

Environment

  • Git Graph Extension Version: 1.30.0
  • Visual Studio Code Version: 1.88
  • Operating System: Windows 10

Screenshots

994ec6bc
994ec6bc^ <-> 994ec6bc

b73b6b22
b73b6b22^ <-> b73b6b22

from 994ec6bc to b73b6b22
994ec6bc <-> b73b6b22

from 994ec6bc to b73b6b22 (2)
994ec6bc <-> b73b6b22

Additional Context
Git Graph OUTPUT:
[2024-04-10 17:58:08.081] > git diff --name-status --find-renames --diff-filter=AMDR -z 994ec6bc5194ac7fd323033cc83cebf2d0df7f42 b73b6b229e0fa3ef10f8ebd1ebbfbd72011a6f7f [2024-04-10 17:58:08.083] > git diff --numstat --find-renames --diff-filter=AMDR -z 994ec6bc5194ac7fd323033cc83cebf2d0df7f42 b73b6b229e0fa3ef10f8ebd1ebbfbd72011a6f7f

@MeroZemory MeroZemory added the bug Something isn't working label Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants