@@ -173,11 +173,11 @@ static int branch_merged(int kind, const char *name,
173
173
(head_rev ? repo_in_merge_bases (the_repository , rev , head_rev ) : 0 ) != merged ) {
174
174
if (merged )
175
175
warning (_ ("deleting branch '%s' that has been merged to\n"
176
- " '%s', but not yet merged to HEAD. " ),
176
+ " '%s', but not yet merged to HEAD" ),
177
177
name , reference_name );
178
178
else
179
179
warning (_ ("not deleting branch '%s' that is not yet merged to\n"
180
- " '%s', even though it is merged to HEAD. " ),
180
+ " '%s', even though it is merged to HEAD" ),
181
181
name , reference_name );
182
182
}
183
183
free (reference_name_to_free );
@@ -190,13 +190,13 @@ static int check_branch_commit(const char *branchname, const char *refname,
190
190
{
191
191
struct commit * rev = lookup_commit_reference (the_repository , oid );
192
192
if (!force && !rev ) {
193
- error (_ ("Couldn 't look up commit object for '%s'" ), refname );
193
+ error (_ ("couldn 't look up commit object for '%s'" ), refname );
194
194
return -1 ;
195
195
}
196
196
if (!force && !branch_merged (kinds , branchname , rev , head_rev )) {
197
- error (_ ("The branch '%s' is not fully merged.\n"
197
+ error (_ ("the branch '%s' is not fully merged.\n"
198
198
"If you are sure you want to delete it, "
199
- "run 'git branch -D %s'. " ), branchname , branchname );
199
+ "run 'git branch -D %s'" ), branchname , branchname );
200
200
return -1 ;
201
201
}
202
202
return 0 ;
@@ -207,7 +207,7 @@ static void delete_branch_config(const char *branchname)
207
207
struct strbuf buf = STRBUF_INIT ;
208
208
strbuf_addf (& buf , "branch.%s" , branchname );
209
209
if (git_config_rename_section (buf .buf , NULL ) < 0 )
210
- warning (_ ("Update of config-file failed" ));
210
+ warning (_ ("update of config-file failed" ));
211
211
strbuf_release (& buf );
212
212
}
213
213
@@ -260,7 +260,7 @@ static int delete_branches(int argc, const char **argv, int force, int kinds,
260
260
if (kinds == FILTER_REFS_BRANCHES ) {
261
261
const char * path ;
262
262
if ((path = branch_checked_out (name ))) {
263
- error (_ ("Cannot delete branch '%s' "
263
+ error (_ ("cannot delete branch '%s' "
264
264
"used by worktree at '%s'" ),
265
265
bname .buf , path );
266
266
ret = 1 ;
@@ -275,7 +275,7 @@ static int delete_branches(int argc, const char **argv, int force, int kinds,
275
275
& oid , & flags );
276
276
if (!target ) {
277
277
if (remote_branch ) {
278
- error (_ ("remote-tracking branch '%s' not found. " ), bname .buf );
278
+ error (_ ("remote-tracking branch '%s' not found" ), bname .buf );
279
279
} else {
280
280
char * virtual_name = mkpathdup (fmt_remotes , bname .buf );
281
281
char * virtual_target = resolve_refdup (virtual_name ,
@@ -290,7 +290,7 @@ static int delete_branches(int argc, const char **argv, int force, int kinds,
290
290
"Did you forget --remote?" ),
291
291
bname .buf );
292
292
else
293
- error (_ ("branch '%s' not found. " ), bname .buf );
293
+ error (_ ("branch '%s' not found" ), bname .buf );
294
294
FREE_AND_NULL (virtual_target );
295
295
}
296
296
ret = 1 ;
@@ -518,11 +518,11 @@ static void reject_rebase_or_bisect_branch(struct worktree **worktrees,
518
518
continue ;
519
519
520
520
if (is_worktree_being_rebased (wt , target ))
521
- die (_ ("Branch %s is being rebased at %s" ),
521
+ die (_ ("branch %s is being rebased at %s" ),
522
522
target , wt -> path );
523
523
524
524
if (is_worktree_being_bisected (wt , target ))
525
- die (_ ("Branch %s is being bisected at %s" ),
525
+ die (_ ("branch %s is being bisected at %s" ),
526
526
target , wt -> path );
527
527
}
528
528
}
@@ -578,7 +578,7 @@ static void copy_or_rename_branch(const char *oldname, const char *newname, int
578
578
if (ref_exists (oldref .buf ))
579
579
recovery = 1 ;
580
580
else
581
- die (_ ("Invalid branch name: '%s'" ), oldname );
581
+ die (_ ("invalid branch name: '%s'" ), oldname );
582
582
}
583
583
584
584
for (int i = 0 ; worktrees [i ]; i ++ ) {
@@ -594,9 +594,9 @@ static void copy_or_rename_branch(const char *oldname, const char *newname, int
594
594
595
595
if ((copy || !(oldref_usage & IS_HEAD )) && !ref_exists (oldref .buf )) {
596
596
if (oldref_usage & IS_HEAD )
597
- die (_ ("No commit on branch '%s' yet. " ), oldname );
597
+ die (_ ("no commit on branch '%s' yet" ), oldname );
598
598
else
599
- die (_ ("No branch named '%s'. " ), oldname );
599
+ die (_ ("no branch named '%s'" ), oldname );
600
600
}
601
601
602
602
/*
@@ -624,32 +624,32 @@ static void copy_or_rename_branch(const char *oldname, const char *newname, int
624
624
625
625
if (!copy && !(oldref_usage & IS_ORPHAN ) &&
626
626
rename_ref (oldref .buf , newref .buf , logmsg .buf ))
627
- die (_ ("Branch rename failed" ));
627
+ die (_ ("branch rename failed" ));
628
628
if (copy && copy_existing_ref (oldref .buf , newref .buf , logmsg .buf ))
629
- die (_ ("Branch copy failed" ));
629
+ die (_ ("branch copy failed" ));
630
630
631
631
if (recovery ) {
632
632
if (copy )
633
- warning (_ ("Created a copy of a misnamed branch '%s'" ),
633
+ warning (_ ("created a copy of a misnamed branch '%s'" ),
634
634
interpreted_oldname );
635
635
else
636
- warning (_ ("Renamed a misnamed branch '%s' away" ),
636
+ warning (_ ("renamed a misnamed branch '%s' away" ),
637
637
interpreted_oldname );
638
638
}
639
639
640
640
if (!copy && (oldref_usage & IS_HEAD ) &&
641
641
replace_each_worktree_head_symref (worktrees , oldref .buf , newref .buf ,
642
642
logmsg .buf ))
643
- die (_ ("Branch renamed to %s, but HEAD is not updated! " ), newname );
643
+ die (_ ("branch renamed to %s, but HEAD is not updated" ), newname );
644
644
645
645
strbuf_release (& logmsg );
646
646
647
647
strbuf_addf (& oldsection , "branch.%s" , interpreted_oldname );
648
648
strbuf_addf (& newsection , "branch.%s" , interpreted_newname );
649
649
if (!copy && git_config_rename_section (oldsection .buf , newsection .buf ) < 0 )
650
- die (_ ("Branch is renamed, but update of config-file failed" ));
650
+ die (_ ("branch is renamed, but update of config-file failed" ));
651
651
if (copy && strcmp (interpreted_oldname , interpreted_newname ) && git_config_copy_section (oldsection .buf , newsection .buf ) < 0 )
652
- die (_ ("Branch is copied, but update of config-file failed" ));
652
+ die (_ ("branch is copied, but update of config-file failed" ));
653
653
strbuf_release (& oldref );
654
654
strbuf_release (& newref );
655
655
strbuf_release (& oldsection );
@@ -773,7 +773,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
773
773
774
774
head = resolve_refdup ("HEAD" , 0 , & head_oid , NULL );
775
775
if (!head )
776
- die (_ ("Failed to resolve HEAD as a valid ref. " ));
776
+ die (_ ("failed to resolve HEAD as a valid ref" ));
777
777
if (!strcmp (head , "HEAD" ))
778
778
filter .detached = 1 ;
779
779
else if (!skip_prefix (head , "refs/heads/" , & head ))
@@ -866,7 +866,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
866
866
867
867
if (!argc ) {
868
868
if (filter .detached )
869
- die (_ ("Cannot give description to detached HEAD" ));
869
+ die (_ ("cannot give description to detached HEAD" ));
870
870
branch_name = head ;
871
871
} else if (argc == 1 ) {
872
872
strbuf_branchname (& buf , argv [0 ], INTERPRET_BRANCH_LOCAL );
@@ -878,8 +878,8 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
878
878
strbuf_addf (& branch_ref , "refs/heads/%s" , branch_name );
879
879
if (!ref_exists (branch_ref .buf ))
880
880
error ((!argc || branch_checked_out (branch_ref .buf ))
881
- ? _ ("No commit on branch '%s' yet. " )
882
- : _ ("No branch named '%s'. " ),
881
+ ? _ ("no commit on branch '%s' yet" )
882
+ : _ ("no branch named '%s'" ),
883
883
branch_name );
884
884
else if (!edit_branch_description (branch_name ))
885
885
ret = 0 ; /* happy */
@@ -892,8 +892,8 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
892
892
if (!argc )
893
893
die (_ ("branch name required" ));
894
894
else if ((argc == 1 ) && filter .detached )
895
- die (copy ? _ ("cannot copy the current branch while not on any. " )
896
- : _ ("cannot rename the current branch while not on any. " ));
895
+ die (copy ? _ ("cannot copy the current branch while not on any" )
896
+ : _ ("cannot rename the current branch while not on any" ));
897
897
else if (argc == 1 )
898
898
copy_or_rename_branch (head , argv [0 ], copy , copy + rename > 1 );
899
899
else if (argc == 2 )
@@ -916,14 +916,14 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
916
916
if (!branch ) {
917
917
if (!argc || !strcmp (argv [0 ], "HEAD" ))
918
918
die (_ ("could not set upstream of HEAD to %s when "
919
- "it does not point to any branch. " ),
919
+ "it does not point to any branch" ),
920
920
new_upstream );
921
921
die (_ ("no such branch '%s'" ), argv [0 ]);
922
922
}
923
923
924
924
if (!ref_exists (branch -> refname )) {
925
925
if (!argc || branch_checked_out (branch -> refname ))
926
- die (_ ("No commit on branch '%s' yet. " ), branch -> name );
926
+ die (_ ("no commit on branch '%s' yet" ), branch -> name );
927
927
die (_ ("branch '%s' does not exist" ), branch -> name );
928
928
}
929
929
@@ -946,12 +946,12 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
946
946
if (!branch ) {
947
947
if (!argc || !strcmp (argv [0 ], "HEAD" ))
948
948
die (_ ("could not unset upstream of HEAD when "
949
- "it does not point to any branch. " ));
949
+ "it does not point to any branch" ));
950
950
die (_ ("no such branch '%s'" ), argv [0 ]);
951
951
}
952
952
953
953
if (!branch_has_merge_config (branch ))
954
- die (_ ("Branch '%s' has no upstream information" ), branch -> name );
954
+ die (_ ("branch '%s' has no upstream information" ), branch -> name );
955
955
956
956
strbuf_reset (& buf );
957
957
strbuf_addf (& buf , "branch.%s.remote" , branch -> name );
@@ -965,11 +965,11 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
965
965
const char * start_name = argc == 2 ? argv [1 ] : head ;
966
966
967
967
if (filter .kind != FILTER_REFS_BRANCHES )
968
- die (_ ("The -a, and -r, options to 'git branch' do not take a branch name.\n"
968
+ die (_ ("the -a, and -r, options to 'git branch' do not take a branch name.\n"
969
969
"Did you mean to use: -a|-r --list <pattern>?" ));
970
970
971
971
if (track == BRANCH_TRACK_OVERRIDE )
972
- die (_ ("the '--set-upstream' option is no longer supported. Please use '--track' or '--set-upstream-to' instead. " ));
972
+ die (_ ("the '--set-upstream' option is no longer supported. Please use '--track' or '--set-upstream-to' instead" ));
973
973
974
974
if (recurse_submodules ) {
975
975
create_branches_recursively (the_repository , branch_name ,
0 commit comments