Skip to content

Commit 1bdaebe

Browse files
author
Git for Windows Build Agent
committed
Merge 'no-dashed-invocation' into HEAD
2 parents 10f8807 + dc4ffc1 commit 1bdaebe

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
@@ -843,7 +843,7 @@ cmd_summary() {
843843
test $status != A && test $ignore_config = all && continue
844844
fi
845845
# Also show added or modified modules which are checked out
846-
GIT_DIR="$sm_path/.git" git-rev-parse --git-dir >/dev/null 2>&1 &&
846+
GIT_DIR="$sm_path/.git" git rev-parse --git-dir >/dev/null 2>&1 &&
847847
printf '%s\n' "$sm_path"
848848
done
849849
)
@@ -877,11 +877,11 @@ cmd_summary() {
877877
missing_dst=
878878

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

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

887887
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
@@ -628,6 +628,32 @@ static int run_argv(int *argcp, const char ***argv)
628628
*/
629629
if (!done_alias)
630630
handle_builtin(*argcp, *argv);
631+
else if (get_builtin(**argv)) {
632+
struct argv_array args = ARGV_ARRAY_INIT;
633+
int i;
634+
635+
argv_array_push(&args, "git");
636+
for (i = 0; i < *argcp; i++)
637+
argv_array_push(&args, (*argv)[i]);
638+
639+
if (get_super_prefix())
640+
die("%s doesn't support --super-prefix", args.argv[0]);
641+
642+
if (use_pager == -1)
643+
use_pager = check_pager_config(args.argv[0]);
644+
commit_pager_choice();
645+
646+
trace_argv_printf(args.argv, "trace: exec:");
647+
648+
/*
649+
* if we fail because the command is not found, it is
650+
* OK to return. Otherwise, we just pass along the status code.
651+
*/
652+
i = run_command_v_opt(args.argv, RUN_SILENT_EXEC_FAILURE | RUN_CLEAN_ON_EXIT);
653+
if (i >= 0 || errno != ENOENT)
654+
exit(i);
655+
die("could not execute builtin %s", args.argv[1]);
656+
}
631657

632658
/* .. then try the external ones */
633659
execv_dashed_external(*argv);

0 commit comments

Comments
 (0)