fix(git): diff a branch name against its upstream when the local copy is stale - #8
Merged
Conversation
… is stale `diffity master` took the merge base against the local master, so every commit the remote had gained since the last pull was counted as part of the change set. With a local master 88 commits behind, an 11-file change was reported as 325 files, +14524/-3457. A bare local branch name with a configured upstream now resolves to that upstream when it is behind. Ranges, tags and commits are left alone: those are pinned deliberately. Adds an argv-form `git()` runner, used for the new resolution rather than building shell strings out of refs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018PkYQzbsnMihHesafWvXKs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
diffity mastertook the merge base against the local master, so every commit the remote hadgained since the last pull counted as part of the change set. On NCBackend3#14360 with a local
master 88 commits behind, an 11-file pull request rendered as 325 files, +14524/−3457.
A bare local branch name with a configured upstream now resolves to that upstream when it is behind
it. Ranges, tags and commits are left alone — those are pinned on purpose. Adds an argv-form
git()runner and uses it for the new resolution rather than building shell strings out of refs.
Verified:
/api/diff?ref=masteron that PR now returns 11 files, +367/−22, matching GitHub.Stacked on #7.
🤖 Generated with Claude Code
https://claude.ai/code/session_018PkYQzbsnMihHesafWvXKs