google / glog

C++ implementation of the Google logging module
http://google.github.io/glog/
BSD 3-Clause "New" or "Revised" License
7k stars 2.05k forks source link

symbolize_unittest: make it a bit more portable #985

Closed vapier closed 9 months ago

vapier commented 9 months ago

rebase of #87

codecov-commenter commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (7d973f9) 63.92% compared to head (76c2c47) 64.19%. Report is 3 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #985 +/- ## ========================================== + Coverage 63.92% 64.19% +0.27% ========================================== Files 17 17 Lines 3326 3326 Branches 1125 1125 ========================================== + Hits 2126 2135 +9 + Misses 774 767 -7 + Partials 426 424 -2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sergiud commented 9 months ago

Thanks for the PR.

Could you please rebase and push the commit again as I no longer seem to have access to your branch after force pushing.

vapier commented 9 months ago

pretty sure you can fetch the commit you clobbered from the remote

$ git fetch https://github.com/vapier/glog 233df366d56df9d3d32898451f2ba1ace7e234de
$ git cherry-pick FETCH_HEAD
sergiud commented 9 months ago

That's not the issue. I simply can't push to your master since the branch no longer contains the PR commit.

For future reference, please submit your changes from a dedicated feature branch to avoid confusion that local and remote branches with the same name can cause.

vapier commented 9 months ago

yeah, that's not really a thing. don't force push if you don't want to clobber/rewrite a ref.

i can rebase the original commit onto the latest branch & push to my repo again. but i can't re-open PR's in this project. i can only file new ones.

sergiud commented 9 months ago

yeah, that's not really a thing. don't force push if you don't want to clobber/rewrite a ref.

What is not a thing? Force pushing is perfectly fine and necessary when rebasing which is what I did. I simply messed up the local ref when pushing.

This works now. Thanks.

vapier commented 9 months ago

requiring people use non-default branches to generate PRs to somehow protect against bad force pushes. you force pushed the wrong state to a remote branch. giving it a diff name wouldn't have helped -- you would have typed the remote branch in order to rewrite it.

but whatever, let's just agree to disagree and move on.

sergiud commented 9 months ago

That's fine. I'm eager to learn.

giving it a diff name wouldn't have helped

Why not? Compare

git push git@github.com:vapier/glog.git master:master # whoops

vs

git push git@github.com:vapier/glog.git portable-labels

If you have a better suggestion how to avoid such a mishap, please let me know.