Skip to content

[lint] make sure clang-tidy is diffing against the right thing#28788

Closed
suo wants to merge 4 commits intogh/suo/202/basefrom
gh/suo/202/head
Closed

[lint] make sure clang-tidy is diffing against the right thing#28788
suo wants to merge 4 commits intogh/suo/202/basefrom
gh/suo/202/head

Conversation

@suo
Copy link
Copy Markdown
Member

@suo suo commented Oct 28, 2019

Stack from ghstack:

Okay, my last fix was wrong because it turns out that the base SHA is
computed at PR time using the actual repo's view of the base ref, not
the user's. So if the user doesn't rebase on top of the latest master
before putting up the PR, the diff thing is wrong anyway.

This PR fixes the issue by not relying on any of these API details and
just getting the merge-base of the base and head refs, which should
guarantee we are diffing against the right thing.

This solution taken from github/VisualStudio#1008

Differential Revision: D18172391

Okay, my last fix was wrong because it turns out that the base SHA is
computed at PR time using the actual repo's view of the base ref, not
the user's. So if the user doesn't rebase on top of the latest master
before putting up the PR, the diff thing is wrong anyway.

This PR fixes the issue by not relying on any of these API details and
just getting the merge-base of the base and head refs, which should
guarantee we are diffing against the right thing.
@suo suo requested a review from ezyang October 28, 2019 16:50
…hing"


Okay, my last fix was wrong because it turns out that the base SHA is
computed at PR time using the actual repo's view of the base ref, not
the user's. So if the user doesn't rebase on top of the latest master
before putting up the PR, the diff thing is wrong anyway.

This PR fixes the issue by not relying on any of these API details and
just getting the merge-base of the base and head refs, which should
guarantee we are diffing against the right thing.

This solution taken from github/VisualStudio#1008

Differential Revision: [D18172391](https://our.internmc.facebook.com/intern/diff/D18172391)
suo added a commit that referenced this pull request Oct 28, 2019
Okay, my last fix was wrong because it turns out that the base SHA is
computed at PR time using the actual repo's view of the base ref, not
the user's. So if the user doesn't rebase on top of the latest master
before putting up the PR, the diff thing is wrong anyway.

This PR fixes the issue by not relying on any of these API details and
just getting the merge-base of the base and head refs, which should
guarantee we are diffing against the right thing.

ghstack-source-id: 31ee994
Pull Request resolved: #28788
…hing"


Okay, my last fix was wrong because it turns out that the base SHA is
computed at PR time using the actual repo's view of the base ref, not
the user's. So if the user doesn't rebase on top of the latest master
before putting up the PR, the diff thing is wrong anyway.

This PR fixes the issue by not relying on any of these API details and
just getting the merge-base of the base and head refs, which should
guarantee we are diffing against the right thing.

This solution taken from github/VisualStudio#1008

Differential Revision: [D18172391](https://our.internmc.facebook.com/intern/diff/D18172391)
…hing"


Okay, my last fix was wrong because it turns out that the base SHA is
computed at PR time using the actual repo's view of the base ref, not
the user's. So if the user doesn't rebase on top of the latest master
before putting up the PR, the diff thing is wrong anyway.

This PR fixes the issue by not relying on any of these API details and
just getting the merge-base of the base and head refs, which should
guarantee we are diffing against the right thing.

This solution taken from github/VisualStudio#1008

Differential Revision: [D18172391](https://our.internmc.facebook.com/intern/diff/D18172391)
suo added a commit that referenced this pull request Oct 28, 2019
Okay, my last fix was wrong because it turns out that the base SHA is
computed at PR time using the actual repo's view of the base ref, not
the user's. So if the user doesn't rebase on top of the latest master
before putting up the PR, the diff thing is wrong anyway.

This PR fixes the issue by not relying on any of these API details and
just getting the merge-base of the base and head refs, which should
guarantee we are diffing against the right thing.

ghstack-source-id: 90e1fad
Pull Request resolved: #28788
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@suo merged this pull request in 9f890a9.

@facebook-github-bot facebook-github-bot deleted the gh/suo/202/head branch November 1, 2019 14:17
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
Pull Request resolved: pytorch#28788

Okay, my last fix was wrong because it turns out that the base SHA is
computed at PR time using the actual repo's view of the base ref, not
the user's. So if the user doesn't rebase on top of the latest master
before putting up the PR, the diff thing is wrong anyway.

This PR fixes the issue by not relying on any of these API details and
just getting the merge-base of the base and head refs, which should
guarantee we are diffing against the right thing.

This solution taken from github/VisualStudio#1008

Test Plan: Imported from OSS

Differential Revision: D18172391

Pulled By: suo

fbshipit-source-id: 491a50119194508b2eefa5bd39fe813ca85f27b1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants