Skip to content

Commit

Permalink
Remind users to run git add
Browse files Browse the repository at this point in the history
It is confusing to run gofmt -w as instructed only to get the exact same
error when retrying the commit because you forgot to add the changes
gofmt made to the commit. This change avoids that confusion.

Running exactly "git add" will give an error message reminding you to
tell it what to add. Since we don't know what that is (it could be a
patch fragment), we can't include it in our message so this is fine.
  • Loading branch information
sethwklein committed Jan 31, 2013
1 parent 237436f commit eb20284
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fmt-check
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ test_fmt() {
fi
if test -n "$list"
then
echo >&2 "gofmt needs to format these files (run gofmt -w):"
echo >&2 "gofmt needs to format these files (run gofmt -w and git add):"
printf "$list"
exitcode=1
fi
Expand Down

0 comments on commit eb20284

Please sign in to comment.