Skip to content

Commit

Permalink
Only print "gclient sync" warning once during rebase (flutter#52133)
Browse files Browse the repository at this point in the history
Skip the "pre-rebase" message since it will also be printed "post-checkout" at the end.

Fixes flutter/flutter#146781

Before this PR:

![rebase](https://github.com/flutter/engine/assets/682784/db7279c7-ca27-4ccf-9f6b-f9c4ad10c20a)

On this PR it's only printed once

![Screenshot 2024-04-15 at 2 06 24�PM](https://github.com/flutter/engine/assets/682784/bc80a6bc-9fd9-447f-b060-18f3a5b05775)

Fixes flutter/flutter#146781
  • Loading branch information
jmagman authored Apr 16, 2024
1 parent bb127fe commit 4d69c0c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/githooks/lib/src/messages.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ const String _reset = '\x1B[0m';
/// Prints a reminder to stdout to run `gclient sync -D`. Uses colors when
/// stdout supports ANSI escape codes.
void printGclientSyncReminder(String command) {
if (command == 'pre-rebase') {
return;
}
final String prefix = io.stdout.supportsAnsiEscapes ? _redBoldUnderline : '';
final String postfix = io.stdout.supportsAnsiEscapes ? _reset : '';
io.stderr.writeln('$command: The engine source tree has been updated.');
Expand Down

0 comments on commit 4d69c0c

Please sign in to comment.