From: Ramkumar Ramachandra Date: Tue, 19 Jul 2011 17:17:42 GMT Subject: [PATCH 04/18] revert: Don't check lone argument in get_encoding Message-ID: <1311095876-3098-5-git-send-email-artagnon@gmail.com> In-Reply-To: <1311095876-3098-1-git-send-email-artagnon@gmail.com> The get_encoding function has only one callsite, and its caller makes sure that a NULL argument isn't passed. Remove a string marked for translation that will never be shown by not unnecessarily double-checking the argument. Suggested-by: Jonathan Nieder Suggested-by: Junio C Hamano Signed-off-by: Ramkumar Ramachandra --- builtin/revert.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/builtin/revert.c b/builtin/revert.c index 7dfe295..30b39c0 100644 --- a/builtin/revert.c +++ b/builtin/revert.c @@ -167,9 +167,6 @@ static char *get_encoding(const char *message) { const char *p = message, *eol; - if (!p) - die (_("Could not read commit message of %s"), - sha1_to_hex(commit->object.sha1)); while (*p && *p != '\n') { for (eol = p + 1; *eol && *eol != '\n'; eol++) ; /* do nothing */ -- 1.7.4.rc1.7.g2cf08.dirty