Skip to content

Commit 0501b7e

Browse files
committed
Merge branch 'ja/do-not-ask-needless-questions' into maint
Git sometimes gives an advice in a rhetorical question that does not require an answer, which can confuse new users and non native speakers. Attempt to rephrase them. * ja/do-not-ask-needless-questions: git-filter-branch: be more direct in an error message read-tree -m: make error message for merging 0 trees less smart aleck usability: don't ask questions if no reply is required
2 parents c95f0d2 + 6963893 commit 0501b7e

File tree

6 files changed

+12
-11
lines changed

6 files changed

+12
-11
lines changed

Documentation/git-read-tree.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Merging
137137
-------
138138
If `-m` is specified, 'git read-tree' can perform 3 kinds of
139139
merge, a single tree merge if only 1 tree is given, a
140-
fast-forward merge with 2 trees, or a 3-way merge if 3 trees are
140+
fast-forward merge with 2 trees, or a 3-way merge if 3 or more trees are
141141
provided.
142142

143143

builtin/am.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,7 +1312,7 @@ static int parse_mail(struct am_state *state, const char *mail)
13121312
}
13131313

13141314
if (is_empty_file(am_path(state, "patch"))) {
1315-
printf_ln(_("Patch is empty. Was it split wrong?"));
1315+
printf_ln(_("Patch is empty."));
13161316
die_user_resolve(state);
13171317
}
13181318

@@ -1940,7 +1940,8 @@ static void am_resolve(struct am_state *state)
19401940

19411941
if (unmerged_cache()) {
19421942
printf_ln(_("You still have unmerged paths in your index.\n"
1943-
"Did you forget to use 'git add'?"));
1943+
"You should 'git add' each file with resolved conflicts to mark them as such.\n"
1944+
"You might run `git rm` on a file to accept \"deleted by them\" for it."));
19441945
die_user_resolve(state);
19451946
}
19461947

builtin/checkout.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,9 +1286,8 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
12861286
* new_branch && argc > 1 will be caught later.
12871287
*/
12881288
if (opts.new_branch && argc == 1)
1289-
die(_("Cannot update paths and switch to branch '%s' at the same time.\n"
1290-
"Did you intend to checkout '%s' which can not be resolved as commit?"),
1291-
opts.new_branch, argv[0]);
1289+
die(_("'%s' is not a commit and a branch '%s' cannot be created from it"),
1290+
argv[0], opts.new_branch);
12921291

12931292
if (opts.force_detach)
12941293
die(_("git checkout: --detach does not take a path argument '%s'"),

builtin/read-tree.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,10 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)
226226
setup_work_tree();
227227

228228
if (opts.merge) {
229-
if (stage < 2)
230-
die("just how do you expect me to merge %d trees?", stage-1);
231229
switch (stage - 1) {
230+
case 0:
231+
die("you must specify at least one tree to merge");
232+
break;
232233
case 1:
233234
opts.fn = opts.prefix ? bind_merge : oneway_merge;
234235
break;

git-filter-branch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ git rev-parse --no-flags --revs-only --symbolic-full-name \
239239
sed -e '/^^/d' "$tempdir"/raw-heads >"$tempdir"/heads
240240

241241
test -s "$tempdir"/heads ||
242-
die "Which ref do you want to rewrite?"
242+
die "You must specify a ref to rewrite."
243243

244244
GIT_INDEX_FILE="$(pwd)/../index"
245245
export GIT_INDEX_FILE

help.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,8 @@ const char *help_unknown_cmd(const char *cmd)
411411

412412
if (SIMILAR_ENOUGH(best_similarity)) {
413413
fprintf_ln(stderr,
414-
Q_("\nDid you mean this?",
415-
"\nDid you mean one of these?",
414+
Q_("\nThe most similar command is",
415+
"\nThe most similar commands are",
416416
n));
417417

418418
for (i = 0; i < n; i++)

0 commit comments

Comments
 (0)