@@ -147,7 +147,7 @@ cmd_add()
147
147
148
148
if ! git submodule--helper config --check-writeable > /dev/null 2>&1
149
149
then
150
- die " $( eval_gettext " please make sure that the .gitmodules file is in the working tree" ) "
150
+ die " fatal: $( eval_gettext " please make sure that the .gitmodules file is in the working tree" ) "
151
151
fi
152
152
153
153
if test -n " $reference_path "
@@ -176,7 +176,7 @@ cmd_add()
176
176
case " $repo " in
177
177
./* |../* )
178
178
test -z " $wt_prefix " ||
179
- die " $( gettext " Relative path can only be used from the toplevel of the working tree" ) "
179
+ die " fatal: $( gettext " Relative path can only be used from the toplevel of the working tree" ) "
180
180
181
181
# dereference source url relative to parent's url
182
182
realrepo=$( git submodule--helper resolve-relative-url " $repo " ) || exit
@@ -186,7 +186,7 @@ cmd_add()
186
186
realrepo=$repo
187
187
;;
188
188
* )
189
- die " $( eval_gettext " repo URL: '\$ repo' must be absolute or begin with ./|../" ) "
189
+ die " fatal: $( eval_gettext " repo URL: '\$ repo' must be absolute or begin with ./|../" ) "
190
190
;;
191
191
esac
192
192
@@ -205,17 +205,17 @@ cmd_add()
205
205
if test -z " $force "
206
206
then
207
207
git ls-files --error-unmatch " $sm_path " > /dev/null 2>&1 &&
208
- die " $( eval_gettext " '\$ sm_path' already exists in the index" ) "
208
+ die " fatal: $( eval_gettext " '\$ sm_path' already exists in the index" ) "
209
209
else
210
210
git ls-files -s " $sm_path " | sane_grep -v " ^160000" > /dev/null 2>&1 &&
211
- die " $( eval_gettext " '\$ sm_path' already exists in the index and is not a submodule" ) "
211
+ die " fatal: $( eval_gettext " '\$ sm_path' already exists in the index and is not a submodule" ) "
212
212
fi
213
213
214
214
if test -d " $sm_path " &&
215
215
test -z $( git -C " $sm_path " rev-parse --show-cdup 2> /dev/null)
216
216
then
217
217
git -C " $sm_path " rev-parse --verify -q HEAD > /dev/null ||
218
- die " $( eval_gettext " '\$ sm_path' does not have a commit checked out" ) "
218
+ die " fatal: $( eval_gettext " '\$ sm_path' does not have a commit checked out" ) "
219
219
fi
220
220
221
221
if test -z " $force "
@@ -238,7 +238,7 @@ cmd_add()
238
238
239
239
if ! git submodule--helper check-name " $sm_name "
240
240
then
241
- die " $( eval_gettext " '$sm_name ' is not a valid submodule name" ) "
241
+ die " fatal: $( eval_gettext " '$sm_name ' is not a valid submodule name" ) "
242
242
fi
243
243
244
244
# perhaps the path exists and is already a git repo, else clone it
@@ -281,7 +281,7 @@ or you are unsure what this means choose another name with the '--name' option."
281
281
git config submodule." $sm_name " .url " $realrepo "
282
282
283
283
git add --no-warn-embedded-repo $force " $sm_path " ||
284
- die " $( eval_gettext " Failed to add submodule '\$ sm_path'" ) "
284
+ die " fatal: $( eval_gettext " Failed to add submodule '\$ sm_path'" ) "
285
285
286
286
git submodule--helper config submodule." $sm_name " .path " $sm_path " &&
287
287
git submodule--helper config submodule." $sm_name " .url " $repo " &&
@@ -290,7 +290,7 @@ or you are unsure what this means choose another name with the '--name' option."
290
290
git submodule--helper config submodule." $sm_name " .branch " $branch "
291
291
fi &&
292
292
git add --force .gitmodules ||
293
- die " $( eval_gettext " Failed to register submodule '\$ sm_path'" ) "
293
+ die " fatal: $( eval_gettext " Failed to register submodule '\$ sm_path'" ) "
294
294
295
295
# NEEDSWORK: In a multi-working-tree world, this needs to be
296
296
# set in the per-worktree config.
@@ -565,7 +565,7 @@ cmd_update()
565
565
else
566
566
subsha1=$( sanitize_submodule_env; cd " $sm_path " &&
567
567
git rev-parse --verify HEAD) ||
568
- die " $( eval_gettext " Unable to find current revision in submodule path '\$ displaypath'" ) "
568
+ die " fatal: $( eval_gettext " Unable to find current revision in submodule path '\$ displaypath'" ) "
569
569
fi
570
570
571
571
if test -n " $remote "
@@ -575,12 +575,12 @@ cmd_update()
575
575
then
576
576
# Fetch remote before determining tracking $sha1
577
577
fetch_in_submodule " $sm_path " $depth ||
578
- die " $( eval_gettext " Unable to fetch in submodule path '\$ sm_path'" ) "
578
+ die " fatal: $( eval_gettext " Unable to fetch in submodule path '\$ sm_path'" ) "
579
579
fi
580
580
remote_name=$( sanitize_submodule_env; cd " $sm_path " && git submodule--helper print-default-remote)
581
581
sha1=$( sanitize_submodule_env; cd " $sm_path " &&
582
582
git rev-parse --verify " ${remote_name} /${branch} " ) ||
583
- die " $( eval_gettext " Unable to find current \$ {remote_name}/\$ {branch} revision in submodule path '\$ sm_path'" ) "
583
+ die " fatal: $( eval_gettext " Unable to find current \$ {remote_name}/\$ {branch} revision in submodule path '\$ sm_path'" ) "
584
584
fi
585
585
586
586
if test " $subsha1 " ! = " $sha1 " || test -n " $force "
@@ -604,36 +604,36 @@ cmd_update()
604
604
# not be reachable from any of the refs
605
605
is_tip_reachable " $sm_path " " $sha1 " ||
606
606
fetch_in_submodule " $sm_path " " $depth " " $sha1 " ||
607
- die " $( eval_gettext " Fetched in submodule path '\$ displaypath', but it did not contain \$ sha1. Direct fetching of that commit failed." ) "
607
+ die " fatal: $( eval_gettext " Fetched in submodule path '\$ displaypath', but it did not contain \$ sha1. Direct fetching of that commit failed." ) "
608
608
fi
609
609
610
610
must_die_on_failure=
611
611
case " $update_module " in
612
612
checkout)
613
613
command=" git checkout $subforce -q"
614
- die_msg=" $( eval_gettext " Unable to checkout '\$ sha1' in submodule path '\$ displaypath'" ) "
614
+ die_msg=" fatal: $( eval_gettext " Unable to checkout '\$ sha1' in submodule path '\$ displaypath'" ) "
615
615
say_msg=" $( eval_gettext " Submodule path '\$ displaypath': checked out '\$ sha1'" ) "
616
616
;;
617
617
rebase)
618
618
command=" git rebase ${GIT_QUIET: +--quiet} "
619
- die_msg=" $( eval_gettext " Unable to rebase '\$ sha1' in submodule path '\$ displaypath'" ) "
619
+ die_msg=" fatal: $( eval_gettext " Unable to rebase '\$ sha1' in submodule path '\$ displaypath'" ) "
620
620
say_msg=" $( eval_gettext " Submodule path '\$ displaypath': rebased into '\$ sha1'" ) "
621
621
must_die_on_failure=yes
622
622
;;
623
623
merge)
624
624
command=" git merge ${GIT_QUIET: +--quiet} "
625
- die_msg=" $( eval_gettext " Unable to merge '\$ sha1' in submodule path '\$ displaypath'" ) "
625
+ die_msg=" fatal: $( eval_gettext " Unable to merge '\$ sha1' in submodule path '\$ displaypath'" ) "
626
626
say_msg=" $( eval_gettext " Submodule path '\$ displaypath': merged in '\$ sha1'" ) "
627
627
must_die_on_failure=yes
628
628
;;
629
629
!* )
630
630
command=" ${update_module#! } "
631
- die_msg=" $( eval_gettext " Execution of '\$ command \$ sha1' failed in submodule path '\$ displaypath'" ) "
631
+ die_msg=" fatal: $( eval_gettext " Execution of '\$ command \$ sha1' failed in submodule path '\$ displaypath'" ) "
632
632
say_msg=" $( eval_gettext " Submodule path '\$ displaypath': '\$ command \$ sha1'" ) "
633
633
must_die_on_failure=yes
634
634
;;
635
635
* )
636
- die " $( eval_gettext " Invalid update mode '$update_module ' for submodule path '$path '" ) "
636
+ die " fatal: $( eval_gettext " Invalid update mode '$update_module ' for submodule path '$path '" ) "
637
637
esac
638
638
639
639
if (sanitize_submodule_env; cd " $sm_path " && $command " $sha1 " )
@@ -660,7 +660,7 @@ cmd_update()
660
660
res=$?
661
661
if test $res -gt 0
662
662
then
663
- die_msg=" $( eval_gettext " Failed to recurse into submodule path '\$ displaypath'" ) "
663
+ die_msg=" fatal: $( eval_gettext " Failed to recurse into submodule path '\$ displaypath'" ) "
664
664
if test $res -ne 2
665
665
then
666
666
err=" ${err} ;$die_msg "
0 commit comments