Skydio / revup

Effortlessly create and manage pull requests without changing branches. Powers a stacked diffs workflow with python and git "plumbing" commands.
https://github.com/Skydio/revup
MIT License
317 stars 67 forks source link

Review incorrectly marked rebase if only whitespace changed #2

Closed jerry-skydio closed 1 year ago

jerry-skydio commented 2 years ago

if a review contains only whitespaces changes from the previous version, revup can incorrectly mark it as (rebase) or (no change). the workaround is to run "revup upload --rebase" to force an upload.

we use git patch-id under the hood to determine if a branch needs to be pushed. if the number of commits between the remote and local branches matches and each commit's patch-id also matches, it is determined to be a rebase and is not pushed.

git patch-id however strips all whitespace before calculating the patch-id, so two patches that are the same except for whitespace will have the same patch-id. this will require an upstream patch to add a flag that can un-ignore whitespace.

jerry-skydio commented 2 years ago

https://github.com/gitgitgadget/git/pull/1359 is related

jerry-skydio commented 1 year ago

should be fixed in the next release