From 28fe8e4620323cd12abb5069c57c3a0d708f3306 Mon Sep 17 00:00:00 2001 From: Peter Dillinger Date: Wed, 29 Apr 2020 13:42:43 -0700 Subject: [PATCH] Fix bug in format-diff.sh (#6772) Summary: Nasty bug in which more/different changes would be applied than those shown to user Pull Request resolved: https://github.com/facebook/rocksdb/pull/6772 Test Plan: manual Reviewed By: siying Differential Revision: D21304604 Pulled By: pdillinger fbshipit-source-id: 7e20740e513c9c300d1522511290a025b35abedc --- build_tools/format-diff.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/format-diff.sh b/build_tools/format-diff.sh index 0fd3417f4..aa04093b0 100755 --- a/build_tools/format-diff.sh +++ b/build_tools/format-diff.sh @@ -121,7 +121,7 @@ if [ -z "$uncommitted_code" ] then git diff -U0 "$FORMAT_UPSTREAM_MERGE_BASE" | $CLANG_FORMAT_DIFF -i -p 1 else - git diff -U0 HEAD^ | $CLANG_FORMAT_DIFF -i -p 1 + git diff -U0 HEAD | $CLANG_FORMAT_DIFF -i -p 1 fi echo "Files reformatted!"