]> git.ipfire.org Git - thirdparty/git.git/commit
surround %s with quotes when failed to lookup commit
authorTeng Long <dyroneteng@gmail.com>
Mon, 29 May 2023 13:27:56 +0000 (21:27 +0800)
committerJunio C Hamano <gitster@pobox.com>
Sat, 3 Jun 2023 00:01:10 +0000 (09:01 +0900)
commite4cf01346831ec8f2d4d2bd4d325d2f152259c49
tree99911d9789bbf5d63279d590cc89123b69123dd8
parentfe86abd7511a9a6862d5706c6fa1d9b57a63ba09
surround %s with quotes when failed to lookup commit

The output may become confusing to recognize if the user
accidentally gave an extra opening space, like:

   $ git commit --fixup=" 6d6360b67e99c2fd82d64619c971fdede98ee74b"
   fatal: could not lookup commit  6d6360b67e99c2fd82d64619c971fdede98ee74b

and it will be better if we surround the %s specifier with single quotes.

Signed-off-by: Teng Long <dyroneteng@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/commit.c
builtin/merge-tree.c