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

Suggestion: Use --first-parent when detecting git changes compared to upstream #471

Open
scottjasso opened this issue Dec 19, 2023 · 0 comments
Labels
🌊 enhancement New feature or request

Comments

@scottjasso
Copy link

Is your feature request related to a problem? Please describe

In a typical feature branch workflow, you often merge the latest changes from master into the feature branch.

When you do this, the tide prompt shows you how many commits you're ahead of @{upstream}, but it counts each merged commit from master individually, rather than treating it as 1 single merge commit. So if there were 100 commits in master, the prompt shows ↑101, not ↑1.

This can be misleading because, if you were to rebase master, you'd also get a high number like (↑100), but often rebasing is not desired. So it's hard to tell from the prompt which one you did.

Describe the solution you'd like

By using --first-parent in this code, git will count a merge commit as a single commit.

(I have no problem making the change, just wanted to get feedback first 😄)

Additional context

This is for the typical github PR workflow -- if we update a PR, we only want to merge master, not rebase master, so that history is preserved. With this change, a high number like ↑100 is a sign you messed up your history.

@scottjasso scottjasso added the 🌊 enhancement New feature or request label Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌊 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant