Skip to content

Commit 4279000

Browse files
committed
messages: avoid SHA-1 in end-user facing messages
There are still a handful mentions of SHA-1 when we meant the (hexadecimal) object names in end-user facing messages. Rewrite them. I was hoping that this can mostly be s/SHA-1/object name/, but a few messages needed rephrasing to keep the result readable. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 47ae905 commit 4279000

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

builtin/blame.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
842842
const char *contents_from = NULL;
843843
const struct option options[] = {
844844
OPT_BOOL(0, "incremental", &incremental, N_("Show blame entries as we find them, incrementally")),
845-
OPT_BOOL('b', NULL, &blank_boundary, N_("Show blank SHA-1 for boundary commits (Default: off)")),
845+
OPT_BOOL('b', NULL, &blank_boundary, N_("Do not show object names of boundary commits (Default: off)")),
846846
OPT_BOOL(0, "root", &show_root, N_("Do not treat root commits as boundaries (Default: off)")),
847847
OPT_BOOL(0, "show-stats", &show_stats, N_("Show work cost statistics")),
848848
OPT_BOOL(0, "progress", &show_progress, N_("Force progress reporting")),

builtin/name-rev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ int cmd_name_rev(int argc, const char **argv, const char *prefix)
521521
int all = 0, transform_stdin = 0, allow_undefined = 1, always = 0, peel_tag = 0;
522522
struct name_ref_data data = { 0, 0, STRING_LIST_INIT_NODUP, STRING_LIST_INIT_NODUP };
523523
struct option opts[] = {
524-
OPT_BOOL(0, "name-only", &data.name_only, N_("print only names (no SHA-1)")),
524+
OPT_BOOL(0, "name-only", &data.name_only, N_("print only ref-based names (no object names)")),
525525
OPT_BOOL(0, "tags", &data.tags_only, N_("only use tags to name the commits")),
526526
OPT_STRING_LIST(0, "refs", &data.ref_filters, N_("pattern"),
527527
N_("only use refs matching <pattern>")),

builtin/pack-objects.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3325,7 +3325,7 @@ static void get_object_list(int ac, const char **av)
33253325
if (starts_with(line, "--shallow ")) {
33263326
struct object_id oid;
33273327
if (get_oid_hex(line + 10, &oid))
3328-
die("not an SHA-1 '%s'", line + 10);
3328+
die("not an object name '%s'", line + 10);
33293329
register_shallow(the_repository, &oid);
33303330
use_bitmap_index = 0;
33313331
continue;

parse-options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ int parse_opt_passthru_argv(const struct option *, const char *, int);
314314
#define OPT__FORCE(var, h, f) OPT_COUNTUP_F('f', "force", (var), (h), (f))
315315
#define OPT__ABBREV(var) \
316316
{ OPTION_CALLBACK, 0, "abbrev", (var), N_("n"), \
317-
N_("use <n> digits to display SHA-1s"), \
317+
N_("use <n> digits to display object names"), \
318318
PARSE_OPT_OPTARG, &parse_opt_abbrev_cb, 0 }
319319
#define OPT__COLOR(var, h) \
320320
OPT_COLOR_FLAG(0, "color", (var), (h))

t/t0040-parse-options.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Magic arguments
4444
--no-ambiguous negative ambiguity
4545
4646
Standard options
47-
--abbrev[=<n>] use <n> digits to display SHA-1s
47+
--abbrev[=<n>] use <n> digits to display object names
4848
-v, --verbose be verbose
4949
-n, --dry-run dry run
5050
-q, --quiet be quiet

0 commit comments

Comments
 (0)