mirror of
https://github.com/git/git.git
synced 2026-01-24 17:41:30 +00:00
Merge 'no-dashed-invocation' into HEAD
This commit is contained in:
@@ -100,7 +100,7 @@ do
|
||||
if test $? -ne 0
|
||||
then
|
||||
gettextln "Simple merge did not work, trying automatic merge."
|
||||
git-merge-index -o git-merge-one-file -a ||
|
||||
git merge-index -o git-merge-one-file -a ||
|
||||
OCTOPUS_FAILURE=1
|
||||
next=$(git write-tree 2>/dev/null)
|
||||
fi
|
||||
|
||||
@@ -115,16 +115,16 @@ case "${1:-.}${2:-.}${3:-.}" in
|
||||
;;
|
||||
esac
|
||||
|
||||
src1=$(git-unpack-file $2)
|
||||
src2=$(git-unpack-file $3)
|
||||
src1=$(git unpack-file $2)
|
||||
src2=$(git unpack-file $3)
|
||||
case "$1" in
|
||||
'')
|
||||
echo "Added $4 in both, but differently."
|
||||
orig=$(git-unpack-file e69de29bb2d1d6434b8b29ae775ad8c2e48c5391)
|
||||
orig=$(git unpack-file e69de29bb2d1d6434b8b29ae775ad8c2e48c5391)
|
||||
;;
|
||||
*)
|
||||
echo "Auto-merging $4"
|
||||
orig=$(git-unpack-file $1)
|
||||
orig=$(git unpack-file $1)
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ then
|
||||
exit 0
|
||||
else
|
||||
echo "Simple merge failed, trying Automatic merge."
|
||||
if git-merge-index -o git-merge-one-file -a
|
||||
if git merge-index -o git-merge-one-file -a
|
||||
then
|
||||
exit 0
|
||||
else
|
||||
|
||||
@@ -69,7 +69,7 @@ call_merge () {
|
||||
test -z "$strategy" && strategy=recursive
|
||||
# If cmt doesn't have a parent, don't include it as a base
|
||||
base=$(git rev-parse --verify --quiet $cmt^)
|
||||
eval 'git-merge-$strategy' $strategy_opts $base ' -- "$hd" "$cmt"'
|
||||
eval 'git merge-$strategy' $strategy_opts $base ' -- "$hd" "$cmt"'
|
||||
rv=$?
|
||||
case "$rv" in
|
||||
0)
|
||||
|
||||
@@ -573,7 +573,7 @@ apply_stash () {
|
||||
|
||||
if test -n "$u_tree"
|
||||
then
|
||||
GIT_INDEX_FILE="$TMPindex" git-read-tree "$u_tree" &&
|
||||
GIT_INDEX_FILE="$TMPindex" git read-tree "$u_tree" &&
|
||||
GIT_INDEX_FILE="$TMPindex" git checkout-index --all &&
|
||||
rm -f "$TMPindex" ||
|
||||
die "$(gettext "Could not restore untracked files from stash entry")"
|
||||
|
||||
@@ -864,7 +864,7 @@ cmd_summary() {
|
||||
test $status != A && test $ignore_config = all && continue
|
||||
fi
|
||||
# Also show added or modified modules which are checked out
|
||||
GIT_DIR="$sm_path/.git" git-rev-parse --git-dir >/dev/null 2>&1 &&
|
||||
GIT_DIR="$sm_path/.git" git rev-parse --git-dir >/dev/null 2>&1 &&
|
||||
printf '%s\n' "$sm_path"
|
||||
done
|
||||
)
|
||||
@@ -898,11 +898,11 @@ cmd_summary() {
|
||||
missing_dst=
|
||||
|
||||
test $mod_src = 160000 &&
|
||||
! GIT_DIR="$name/.git" git-rev-parse -q --verify $sha1_src^0 >/dev/null &&
|
||||
! GIT_DIR="$name/.git" git rev-parse -q --verify $sha1_src^0 >/dev/null &&
|
||||
missing_src=t
|
||||
|
||||
test $mod_dst = 160000 &&
|
||||
! GIT_DIR="$name/.git" git-rev-parse -q --verify $sha1_dst^0 >/dev/null &&
|
||||
! GIT_DIR="$name/.git" git rev-parse -q --verify $sha1_dst^0 >/dev/null &&
|
||||
missing_dst=t
|
||||
|
||||
display_name=$(git submodule--helper relative-path "$name" "$wt_prefix")
|
||||
|
||||
27
git.c
27
git.c
@@ -588,6 +588,33 @@ static int run_argv(int *argcp, const char ***argv)
|
||||
*/
|
||||
if (!done_alias)
|
||||
handle_builtin(*argcp, *argv);
|
||||
else if (get_builtin(**argv)) {
|
||||
struct argv_array args = ARGV_ARRAY_INIT;
|
||||
int i;
|
||||
|
||||
if (get_super_prefix())
|
||||
die("%s doesn't support --super-prefix", **argv);
|
||||
|
||||
if (use_pager == -1)
|
||||
use_pager = check_pager_config(**argv);
|
||||
commit_pager_choice();
|
||||
|
||||
argv_array_push(&args, "git");
|
||||
for (i = 0; i < *argcp; i++)
|
||||
argv_array_push(&args, (*argv)[i]);
|
||||
|
||||
trace_argv_printf(args.argv, "trace: exec:");
|
||||
|
||||
/*
|
||||
* if we fail because the command is not found, it is
|
||||
* OK to return. Otherwise, we just pass along the status code.
|
||||
*/
|
||||
i = run_command_v_opt(args.argv, RUN_SILENT_EXEC_FAILURE |
|
||||
RUN_CLEAN_ON_EXIT);
|
||||
if (i >= 0 || errno != ENOENT)
|
||||
exit(i);
|
||||
die("could not execute builtin %s", **argv);
|
||||
}
|
||||
|
||||
/* .. then try the external ones */
|
||||
execv_dashed_external(*argv);
|
||||
|
||||
Reference in New Issue
Block a user