@@ -431,7 +431,10 @@ static void NORETURN die_no_merge_candidates(const char *repo, const char **refs
431
431
const char * remote = curr_branch ? curr_branch -> remote_name : NULL ;
432
432
433
433
if (* refspecs ) {
434
- fprintf_ln (stderr , _ ("There are no candidates for merging among the refs that you just fetched." ));
434
+ if (opt_rebase )
435
+ fprintf_ln (stderr , _ ("There is no candidate for rebasing against among the refs that you just fetched." ));
436
+ else
437
+ fprintf_ln (stderr , _ ("There are no candidates for merging among the refs that you just fetched." ));
435
438
fprintf_ln (stderr , _ ("Generally this means that you provided a wildcard refspec which had no\n"
436
439
"matches on the remote end." ));
437
440
} else if (repo && curr_branch && (!remote || strcmp (repo , remote ))) {
@@ -441,7 +444,10 @@ static void NORETURN die_no_merge_candidates(const char *repo, const char **refs
441
444
repo );
442
445
} else if (!curr_branch ) {
443
446
fprintf_ln (stderr , _ ("You are not currently on a branch." ));
444
- fprintf_ln (stderr , _ ("Please specify which branch you want to merge with." ));
447
+ if (opt_rebase )
448
+ fprintf_ln (stderr , _ ("Please specify which branch you want to rebase against." ));
449
+ else
450
+ fprintf_ln (stderr , _ ("Please specify which branch you want to merge with." ));
445
451
fprintf_ln (stderr , _ ("See git-pull(1) for details." ));
446
452
fprintf (stderr , "\n" );
447
453
fprintf_ln (stderr , " git pull <remote> <branch>" );
@@ -453,7 +459,10 @@ static void NORETURN die_no_merge_candidates(const char *repo, const char **refs
453
459
remote_name = "<remote>" ;
454
460
455
461
fprintf_ln (stderr , _ ("There is no tracking information for the current branch." ));
456
- fprintf_ln (stderr , _ ("Please specify which branch you want to merge with." ));
462
+ if (opt_rebase )
463
+ fprintf_ln (stderr , _ ("Please specify which branch you want to rebase against." ));
464
+ else
465
+ fprintf_ln (stderr , _ ("Please specify which branch you want to merge with." ));
457
466
fprintf_ln (stderr , _ ("See git-pull(1) for details." ));
458
467
fprintf (stderr , "\n" );
459
468
fprintf_ln (stderr , " git pull <remote> <branch>" );
0 commit comments