From: Junio C Hamano Date: Mon, 1 Jun 2015 19:45:09 +0000 (-0700) Subject: Merge branch 'ah/usage-strings' X-Git-Tag: v2.5.0-rc0~68 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/6e0ac8e45f688abf8deb10a1716461b61400f669?ds=inline;hp=-c Merge branch 'ah/usage-strings' A few usage string updates. * ah/usage-strings: blame, log: format usage strings similarly to those in documentation --- 6e0ac8e45f688abf8deb10a1716461b61400f669 diff --combined builtin/blame.c index 8d70623cb8,5710dcbec6..662339fe63 --- a/builtin/blame.c +++ b/builtin/blame.c @@@ -27,7 -27,7 +27,7 @@@ #include "line-range.h" #include "line-log.h" - static char blame_usage[] = N_("git blame [] [] [] [--] file"); + static char blame_usage[] = N_("git blame [] [] [] [--] "); static const char *blame_opt_usage[] = { blame_usage, @@@ -2085,6 -2085,7 +2085,6 @@@ static void find_alignment(struct score for (e = sb->ent; e; e = e->next) { struct origin *suspect = e->suspect; - struct commit_info ci; int num; if (compute_auto_abbrev) @@@ -2095,7 -2096,6 +2095,7 @@@ if (longest_file < num) longest_file = num; if (!(suspect->commit->object.flags & METAINFO_SHOWN)) { + struct commit_info ci; suspect->commit->object.flags |= METAINFO_SHOWN; get_commit_info(suspect->commit, &ci, 1); if (*option & OUTPUT_SHOW_EMAIL) @@@ -2104,7 -2104,6 +2104,7 @@@ num = utf8_strwidth(ci.author.buf); if (longest_author < num) longest_author = num; + commit_info_destroy(&ci); } num = e->s_lno + e->num_lines; if (longest_src_lines < num) @@@ -2114,6 -2113,8 +2114,6 @@@ longest_dst_lines = num; if (largest_score < ent_score(sb, e)) largest_score = ent_score(sb, e); - - commit_info_destroy(&ci); } max_orig_digits = decimal_width(longest_src_lines); max_digits = decimal_width(longest_dst_lines); @@@ -2348,7 -2349,6 +2348,7 @@@ static struct commit *fake_working_tree if (strbuf_read(&buf, 0, 0) < 0) die_errno("failed to read from stdin"); } + convert_to_git(path, buf.buf, buf.len, &buf, 0); origin->file.ptr = buf.buf; origin->file.size = buf.len; pretend_sha1_file(buf.buf, buf.len, OBJ_BLOB, origin->blob_sha1);