Skip to content

Commit c28c4cd

Browse files
committed
Merge 'no-dashed-invocation' into HEAD
2 parents 5da3992 + 5a17df2 commit c28c4cd

File tree

7 files changed

+37
-11
lines changed

7 files changed

+37
-11
lines changed

git-merge-octopus.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ do
100100
if test $? -ne 0
101101
then
102102
gettextln "Simple merge did not work, trying automatic merge."
103-
git-merge-index -o git-merge-one-file -a ||
103+
git merge-index -o git-merge-one-file -a ||
104104
OCTOPUS_FAILURE=1
105105
next=$(git write-tree 2>/dev/null)
106106
fi

git-merge-one-file.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,16 @@ case "${1:-.}${2:-.}${3:-.}" in
115115
;;
116116
esac
117117

118-
src1=$(git-unpack-file $2)
119-
src2=$(git-unpack-file $3)
118+
src1=$(git unpack-file $2)
119+
src2=$(git unpack-file $3)
120120
case "$1" in
121121
'')
122122
echo "Added $4 in both, but differently."
123-
orig=$(git-unpack-file e69de29bb2d1d6434b8b29ae775ad8c2e48c5391)
123+
orig=$(git unpack-file e69de29bb2d1d6434b8b29ae775ad8c2e48c5391)
124124
;;
125125
*)
126126
echo "Auto-merging $4"
127-
orig=$(git-unpack-file $1)
127+
orig=$(git unpack-file $1)
128128
;;
129129
esac
130130

git-merge-resolve.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ then
4545
exit 0
4646
else
4747
echo "Simple merge failed, trying Automatic merge."
48-
if git-merge-index -o git-merge-one-file -a
48+
if git merge-index -o git-merge-one-file -a
4949
then
5050
exit 0
5151
else

git-rebase--merge.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ call_merge () {
6969
test -z "$strategy" && strategy=recursive
7070
# If cmt doesn't have a parent, don't include it as a base
7171
base=$(git rev-parse --verify --quiet $cmt^)
72-
eval 'git-merge-$strategy' $strategy_opts $base ' -- "$hd" "$cmt"'
72+
eval 'git merge-$strategy' $strategy_opts $base ' -- "$hd" "$cmt"'
7373
rv=$?
7474
case "$rv" in
7575
0)

git-stash.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ apply_stash () {
502502

503503
if test -n "$u_tree"
504504
then
505-
GIT_INDEX_FILE="$TMPindex" git-read-tree "$u_tree" &&
505+
GIT_INDEX_FILE="$TMPindex" git read-tree "$u_tree" &&
506506
GIT_INDEX_FILE="$TMPindex" git checkout-index --all &&
507507
rm -f "$TMPindex" ||
508508
die "$(gettext "Could not restore untracked files from stash")"

git-submodule.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ cmd_summary() {
846846
test $status != A && test $ignore_config = all && continue
847847
fi
848848
# Also show added or modified modules which are checked out
849-
GIT_DIR="$sm_path/.git" git-rev-parse --git-dir >/dev/null 2>&1 &&
849+
GIT_DIR="$sm_path/.git" git rev-parse --git-dir >/dev/null 2>&1 &&
850850
printf '%s\n' "$sm_path"
851851
done
852852
)
@@ -880,11 +880,11 @@ cmd_summary() {
880880
missing_dst=
881881

882882
test $mod_src = 160000 &&
883-
! GIT_DIR="$name/.git" git-rev-parse -q --verify $sha1_src^0 >/dev/null &&
883+
! GIT_DIR="$name/.git" git rev-parse -q --verify $sha1_src^0 >/dev/null &&
884884
missing_src=t
885885

886886
test $mod_dst = 160000 &&
887-
! GIT_DIR="$name/.git" git-rev-parse -q --verify $sha1_dst^0 >/dev/null &&
887+
! GIT_DIR="$name/.git" git rev-parse -q --verify $sha1_dst^0 >/dev/null &&
888888
missing_dst=t
889889

890890
display_name=$(git submodule--helper relative-path "$name" "$wt_prefix")

git.c

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,32 @@ static int run_argv(int *argcp, const char ***argv)
623623
*/
624624
if (!done_alias)
625625
handle_builtin(*argcp, *argv);
626+
else if (get_builtin(**argv)) {
627+
struct argv_array args = ARGV_ARRAY_INIT;
628+
int i;
629+
630+
argv_array_push(&args, "git");
631+
for (i = 0; i < *argcp; i++)
632+
argv_array_push(&args, (*argv)[i]);
633+
634+
if (get_super_prefix())
635+
die("%s doesn't support --super-prefix", args.argv[0]);
636+
637+
if (use_pager == -1)
638+
use_pager = check_pager_config(args.argv[0]);
639+
commit_pager_choice();
640+
641+
trace_argv_printf(args.argv, "trace: exec:");
642+
643+
/*
644+
* if we fail because the command is not found, it is
645+
* OK to return. Otherwise, we just pass along the status code.
646+
*/
647+
i = run_command_v_opt(args.argv, RUN_SILENT_EXEC_FAILURE | RUN_CLEAN_ON_EXIT);
648+
if (i >= 0 || errno != ENOENT)
649+
exit(i);
650+
die("could not execute builtin %s", args.argv[1]);
651+
}
626652

627653
/* .. then try the external ones */
628654
execv_dashed_external(*argv);

0 commit comments

Comments
 (0)