guldkorn icon indicating copy to clipboard operation
guldkorn copied to clipboard

Workaround for rebase-merged commits/branches

Open katrinleinweber opened this issue 4 years ago • 1 comments

Might this be solvable ...

https://github.com/mewmew/guldkorn/blob/113db2cc84ad3035ab2b0fef3fa93dfcc4562da5/main.go#L215-L222

... by checking the origin's commit list for a commit with matching author AND a different committer or for the same message?

I tried the rather dirty git-based way just now, but this didn't work:

  1. git clone --depth=1 ORIGIN_URL
  2. git remote add $forkRepoName FORK_URL
  3. git fetch --depth=1 $forkRepoName $forkBranchName
  4. Then, git diff --exit-code$defaultBranch $forkRepoName/$forkBranchName didn't produce 0 because later changes on $defaultBranch caused a new diff.

katrinleinweber avatar Mar 27 '20 11:03 katrinleinweber

Might this be solvable ... ... by checking the origin's commit list for a commit with matching author AND a different committer or for the same message?

Hi Katrin,

Yeah, the approach you mentioned may be "good enough". If we are checking the individual commits, we may also want to check if the contents diff is indeed identical too, and not rely solely on the commit message.

Cheers, Robin

mewmew avatar Mar 27 '20 14:03 mewmew