Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think these changes make sense.
Here's my reasoning:
merge=ours
keeps what is in the currently checked out branch. Meaning, if you're onmaster
and your saygit merge feature
, it'll keep the generated reports frommaster
(this is likely the other way around when rebasing, in which case this would make more sense howeverFor example, say
master
has evolved with changes that had an impact on gas, so the reports are updated. Infeature
, which is not yet rebased on top ofmaster
you also made changes that impact gas, so in that branch, reports are also changed but in a different way than inmaster
.Now you decide to rebase your
feature
on top ofmaster
. These changes will keep the reports fromfeature
regardless of what's inmaster
.The problem now is that your gas reports only include numbers that didn't take into account the changes from
master
and your reports are flawed. So you never have a guarantee that your report is indeed up-to-date unless you run the gas report command again.So in short:
merge=ours
gives you the wrong reportI don't think we should add this here.
@gravityblast you opinion please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can we solve that? I want to stop merge errors on those files.
As I see, when we are in a branch, the changes there contain the most recent reports
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried to explain above. This is not always the case.
Any scenario in which
master
has evolved with changes that have impact on gas, will result in an out of date gas report after rebase+merge because yourfeature
branch didn't have those changes.You need to run gas report generation again to be sure you have the latest numbers.
The way I do it is, when there's a merge conflict due to gas reports, I re-run gas report generation and continue the rebase. Repeat until done.
Then you always have the latest state of gas report ensured.