Skip to content

git pull --ff-only - #54987

Merged
jmagman merged 1 commit into
flutter:masterfrom
jmagman:ff-only
Apr 16, 2020
Merged

jmagman merged 1 commit into
flutter:masterfrom
jmagman:ff-only

Conversation

@jmagman

@jmagman jmagman commented Apr 16, 2020

Copy link
Copy Markdown
Member

Description

Use git pull --ff-only instead of --ff to try the fast forward, but exit if that's not possible.

Related Issues

Fixes #54983

Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I signed the [CLA].
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

  • No, no existing tests failed, so this is not a breaking change.
  • Yes, this is a breaking change. If not, delete the remainder of this section.

@jmagman jmagman added the tool Affects the "flutter" command-line tool. See also t: labels. label Apr 16, 2020
@jmagman jmagman self-assigned this Apr 16, 2020
@fluttergithubbot

Copy link
Copy Markdown
Contributor

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@jmagman

jmagman commented Apr 16, 2020

Copy link
Copy Markdown
Member Author

@christopherfujino I tested this manually and it worked, are there any devicelab tests or something else I can run to test?

@christopherfujino

Copy link
Copy Markdown
Contributor

@christopherfujino I tested this manually and it worked, are there any devicelab tests or something else I can run to test?

Yeah, jonah added a upgrade/downgrade integration test.

@christopherfujino

Copy link
Copy Markdown
Contributor

@jmagman

jmagman commented Apr 16, 2020

Copy link
Copy Markdown
Member Author

@christopherfujino

Copy link
Copy Markdown
Contributor

https://github.com/flutter/flutter/blob/master/packages/flutter_tools/test/integration.shard/downgrade_upgrade_integration_test.dart

Oh well Cirrus has my back on that, I meant is there any post-submit testing I can run.

To my knowledge that one test is all we have.

@christopherfujino

Copy link
Copy Markdown
Contributor

For science, are --ff and --ff-only effectively equivalent?

@jmagman

jmagman commented Apr 16, 2020

Copy link
Copy Markdown
Member Author

For science, are --ff and --ff-only effectively equivalent?

No, --ff will try the fast forward, but make a merge commit if it doesn't succeed. --ff-only will try, but will bail if it can't just fast forward.

https://git-scm.com/docs/git-pull#Documentation/git-pull.txt---ff-only

With --ff, when possible resolve the merge as a fast-forward (only update the branch pointer to match the merged branch; do not create a merge commit). When not possible (when the merged-in history is not a descendant of the current history), create a merge commit.

With --ff-only, resolve the merge as a fast-forward when possible. When not possible, refuse to merge and exit with a non-zero status.

@christopherfujino

christopherfujino commented Apr 16, 2020

Copy link
Copy Markdown
Contributor

For science, are --ff and --ff-only effectively equivalent?

No, --ff will try the fast forward, but make a merge commit if it doesn't succeed. --ff-only will try, but will bail if it can't just fast forward.

https://git-scm.com/docs/git-pull#Documentation/git-pull.txt---ff-only

With --ff, when possible resolve the merge as a fast-forward (only update the branch pointer to match the merged branch; do not create a merge commit). When not possible (when the merged-in history is not a descendant of the current history), create a merge commit.

With --ff-only, resolve the merge as a fast-forward when possible. When not possible, refuse to merge and exit with a non-zero status.

That seems OK, as long as we always merge in branches from now on (which we have to do from now on anyway, as I removed the functionality in flutter upgrade that resets backward anyway).

Also, this is what I thought was happening already...

@christopherfujino christopherfujino left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jmagman

jmagman commented Apr 16, 2020

Copy link
Copy Markdown
Member Author

That seems OK, as long as we always merge in branches from now on (which we have to do from now on anyway, as I removed the functionality in flutter upgrade that resets backward anyway).

I think --ff-only makes more sense here anyway. We don't want users to have random merge commits.

@jmagman

jmagman commented Apr 16, 2020

Copy link
Copy Markdown
Member Author

Merging on red build to close TODAY issue, build is red because of flake #54992.

@jmagman
jmagman merged commit ce83aaf into flutter:master Apr 16, 2020
@jmagman
jmagman deleted the ff-only branch April 16, 2020 21:20
pcsosinski pushed a commit to pcsosinski/flutter that referenced this pull request Apr 21, 2020
pcsosinski pushed a commit that referenced this pull request Apr 22, 2020
* Update engine, includes Dart 2.8.0-20.11.beta

* git pull --ff-only (#54987)

* [flutter_tools] Reland: fix multiple dart defines (#54973)

* Fix `frameworkVersionFor` for flutter doctor and usage (#54217)

* update engine hash, use dart 2.8.0-20.10-beta (with old naming schema)

Co-authored-by: Jenn Magder <magder@google.com>
Co-authored-by: Jonah Williams <jonahwilliams@google.com>
Co-authored-by: Christopher Fujino <christopherfujino@gmail.com>
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Git warning of a missing default when upgrading Flutter

4 participants