|
|
@ -92,7 +92,7 @@ test_expect_success 'status --column' '
|
|
|
|
# On branch main
|
|
|
|
# On branch main
|
|
|
|
# Your branch and '\''upstream'\'' have diverged,
|
|
|
|
# Your branch and '\''upstream'\'' have diverged,
|
|
|
|
# and have 1 and 2 different commits each, respectively.
|
|
|
|
# and have 1 and 2 different commits each, respectively.
|
|
|
|
# (use "git pull" to merge the remote branch into yours)
|
|
|
|
# (use "git pull" if you want to integrate the remote branch with yours)
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Changes to be committed:
|
|
|
|
# Changes to be committed:
|
|
|
|
# (use "git restore --staged <file>..." to unstage)
|
|
|
|
# (use "git restore --staged <file>..." to unstage)
|
|
|
@ -123,7 +123,7 @@ cat >expect <<\EOF
|
|
|
|
# On branch main
|
|
|
|
# On branch main
|
|
|
|
# Your branch and 'upstream' have diverged,
|
|
|
|
# Your branch and 'upstream' have diverged,
|
|
|
|
# and have 1 and 2 different commits each, respectively.
|
|
|
|
# and have 1 and 2 different commits each, respectively.
|
|
|
|
# (use "git pull" to merge the remote branch into yours)
|
|
|
|
# (use "git pull" if you want to integrate the remote branch with yours)
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Changes to be committed:
|
|
|
|
# Changes to be committed:
|
|
|
|
# (use "git restore --staged <file>..." to unstage)
|
|
|
|
# (use "git restore --staged <file>..." to unstage)
|
|
|
@ -270,7 +270,7 @@ test_expect_success 'status with gitignore' '
|
|
|
|
On branch main
|
|
|
|
On branch main
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
and have 1 and 2 different commits each, respectively.
|
|
|
|
and have 1 and 2 different commits each, respectively.
|
|
|
|
(use "git pull" to merge the remote branch into yours)
|
|
|
|
(use "git pull" if you want to integrate the remote branch with yours)
|
|
|
|
|
|
|
|
|
|
|
|
Changes to be committed:
|
|
|
|
Changes to be committed:
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
@ -335,7 +335,7 @@ test_expect_success 'status with gitignore (nothing untracked)' '
|
|
|
|
On branch main
|
|
|
|
On branch main
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
and have 1 and 2 different commits each, respectively.
|
|
|
|
and have 1 and 2 different commits each, respectively.
|
|
|
|
(use "git pull" to merge the remote branch into yours)
|
|
|
|
(use "git pull" if you want to integrate the remote branch with yours)
|
|
|
|
|
|
|
|
|
|
|
|
Changes to be committed:
|
|
|
|
Changes to be committed:
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
@ -405,7 +405,7 @@ test_expect_success 'status -uno' '
|
|
|
|
On branch main
|
|
|
|
On branch main
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
and have 1 and 2 different commits each, respectively.
|
|
|
|
and have 1 and 2 different commits each, respectively.
|
|
|
|
(use "git pull" to merge the remote branch into yours)
|
|
|
|
(use "git pull" if you want to integrate the remote branch with yours)
|
|
|
|
|
|
|
|
|
|
|
|
Changes to be committed:
|
|
|
|
Changes to be committed:
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
@ -467,7 +467,7 @@ test_expect_success 'status -unormal' '
|
|
|
|
On branch main
|
|
|
|
On branch main
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
and have 1 and 2 different commits each, respectively.
|
|
|
|
and have 1 and 2 different commits each, respectively.
|
|
|
|
(use "git pull" to merge the remote branch into yours)
|
|
|
|
(use "git pull" if you want to integrate the remote branch with yours)
|
|
|
|
|
|
|
|
|
|
|
|
Changes to be committed:
|
|
|
|
Changes to be committed:
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
@ -522,7 +522,7 @@ test_expect_success 'status -uall' '
|
|
|
|
On branch main
|
|
|
|
On branch main
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
and have 1 and 2 different commits each, respectively.
|
|
|
|
and have 1 and 2 different commits each, respectively.
|
|
|
|
(use "git pull" to merge the remote branch into yours)
|
|
|
|
(use "git pull" if you want to integrate the remote branch with yours)
|
|
|
|
|
|
|
|
|
|
|
|
Changes to be committed:
|
|
|
|
Changes to be committed:
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
@ -582,7 +582,7 @@ test_expect_success 'status with relative paths' '
|
|
|
|
On branch main
|
|
|
|
On branch main
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
and have 1 and 2 different commits each, respectively.
|
|
|
|
and have 1 and 2 different commits each, respectively.
|
|
|
|
(use "git pull" to merge the remote branch into yours)
|
|
|
|
(use "git pull" if you want to integrate the remote branch with yours)
|
|
|
|
|
|
|
|
|
|
|
|
Changes to be committed:
|
|
|
|
Changes to be committed:
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
@ -650,7 +650,7 @@ test_expect_success TTY 'status with color.ui' '
|
|
|
|
On branch <GREEN>main<RESET>
|
|
|
|
On branch <GREEN>main<RESET>
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
and have 1 and 2 different commits each, respectively.
|
|
|
|
and have 1 and 2 different commits each, respectively.
|
|
|
|
(use "git pull" to merge the remote branch into yours)
|
|
|
|
(use "git pull" if you want to integrate the remote branch with yours)
|
|
|
|
|
|
|
|
|
|
|
|
Changes to be committed:
|
|
|
|
Changes to be committed:
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
@ -773,7 +773,7 @@ test_expect_success 'status without relative paths' '
|
|
|
|
On branch main
|
|
|
|
On branch main
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
and have 1 and 2 different commits each, respectively.
|
|
|
|
and have 1 and 2 different commits each, respectively.
|
|
|
|
(use "git pull" to merge the remote branch into yours)
|
|
|
|
(use "git pull" if you want to integrate the remote branch with yours)
|
|
|
|
|
|
|
|
|
|
|
|
Changes to be committed:
|
|
|
|
Changes to be committed:
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
@ -847,7 +847,6 @@ test_expect_success 'dry-run of partial commit excluding new file in index' '
|
|
|
|
On branch main
|
|
|
|
On branch main
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
and have 1 and 2 different commits each, respectively.
|
|
|
|
and have 1 and 2 different commits each, respectively.
|
|
|
|
(use "git pull" to merge the remote branch into yours)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Changes to be committed:
|
|
|
|
Changes to be committed:
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
@ -901,7 +900,7 @@ test_expect_success 'status submodule summary is disabled by default' '
|
|
|
|
On branch main
|
|
|
|
On branch main
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
and have 1 and 2 different commits each, respectively.
|
|
|
|
and have 1 and 2 different commits each, respectively.
|
|
|
|
(use "git pull" to merge the remote branch into yours)
|
|
|
|
(use "git pull" if you want to integrate the remote branch with yours)
|
|
|
|
|
|
|
|
|
|
|
|
Changes to be committed:
|
|
|
|
Changes to be committed:
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
@ -958,7 +957,7 @@ test_expect_success 'status submodule summary' '
|
|
|
|
On branch main
|
|
|
|
On branch main
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
and have 1 and 2 different commits each, respectively.
|
|
|
|
and have 1 and 2 different commits each, respectively.
|
|
|
|
(use "git pull" to merge the remote branch into yours)
|
|
|
|
(use "git pull" if you want to integrate the remote branch with yours)
|
|
|
|
|
|
|
|
|
|
|
|
Changes to be committed:
|
|
|
|
Changes to be committed:
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
@ -1013,11 +1012,11 @@ test_expect_success 'status -s submodule summary' '
|
|
|
|
'
|
|
|
|
'
|
|
|
|
|
|
|
|
|
|
|
|
test_expect_success 'status submodule summary (clean submodule): commit' '
|
|
|
|
test_expect_success 'status submodule summary (clean submodule): commit' '
|
|
|
|
cat >expect <<EOF &&
|
|
|
|
cat >expect-status <<EOF &&
|
|
|
|
On branch main
|
|
|
|
On branch main
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
and have 2 and 2 different commits each, respectively.
|
|
|
|
and have 2 and 2 different commits each, respectively.
|
|
|
|
(use "git pull" to merge the remote branch into yours)
|
|
|
|
(use "git pull" if you want to integrate the remote branch with yours)
|
|
|
|
|
|
|
|
|
|
|
|
Changes not staged for commit:
|
|
|
|
Changes not staged for commit:
|
|
|
|
(use "git add <file>..." to update what will be committed)
|
|
|
|
(use "git add <file>..." to update what will be committed)
|
|
|
@ -1033,12 +1032,13 @@ Untracked files:
|
|
|
|
|
|
|
|
|
|
|
|
no changes added to commit (use "git add" and/or "git commit -a")
|
|
|
|
no changes added to commit (use "git add" and/or "git commit -a")
|
|
|
|
EOF
|
|
|
|
EOF
|
|
|
|
|
|
|
|
sed "/git pull/d" expect-status > expect-commit &&
|
|
|
|
git commit -m "commit submodule" &&
|
|
|
|
git commit -m "commit submodule" &&
|
|
|
|
git config status.submodulesummary 10 &&
|
|
|
|
git config status.submodulesummary 10 &&
|
|
|
|
test_must_fail git commit --dry-run >output &&
|
|
|
|
test_must_fail git commit --dry-run >output &&
|
|
|
|
test_cmp expect output &&
|
|
|
|
test_cmp expect-commit output &&
|
|
|
|
git status >output &&
|
|
|
|
git status >output &&
|
|
|
|
test_cmp expect output
|
|
|
|
test_cmp expect-status output
|
|
|
|
'
|
|
|
|
'
|
|
|
|
|
|
|
|
|
|
|
|
cat >expect <<EOF
|
|
|
|
cat >expect <<EOF
|
|
|
@ -1065,7 +1065,6 @@ test_expect_success 'commit --dry-run submodule summary (--amend)' '
|
|
|
|
On branch main
|
|
|
|
On branch main
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
and have 2 and 2 different commits each, respectively.
|
|
|
|
and have 2 and 2 different commits each, respectively.
|
|
|
|
(use "git pull" to merge the remote branch into yours)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Changes to be committed:
|
|
|
|
Changes to be committed:
|
|
|
|
(use "git restore --source=HEAD^1 --staged <file>..." to unstage)
|
|
|
|
(use "git restore --source=HEAD^1 --staged <file>..." to unstage)
|
|
|
@ -1117,7 +1116,7 @@ test_expect_success '--ignore-submodules=untracked suppresses submodules with un
|
|
|
|
On branch main
|
|
|
|
On branch main
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
and have 2 and 2 different commits each, respectively.
|
|
|
|
and have 2 and 2 different commits each, respectively.
|
|
|
|
(use "git pull" to merge the remote branch into yours)
|
|
|
|
(use "git pull" if you want to integrate the remote branch with yours)
|
|
|
|
|
|
|
|
|
|
|
|
Changes to be committed:
|
|
|
|
Changes to be committed:
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
@ -1226,7 +1225,7 @@ test_expect_success "--ignore-submodules=untracked doesn't suppress submodules w
|
|
|
|
On branch main
|
|
|
|
On branch main
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
and have 2 and 2 different commits each, respectively.
|
|
|
|
and have 2 and 2 different commits each, respectively.
|
|
|
|
(use "git pull" to merge the remote branch into yours)
|
|
|
|
(use "git pull" if you want to integrate the remote branch with yours)
|
|
|
|
|
|
|
|
|
|
|
|
Changes to be committed:
|
|
|
|
Changes to be committed:
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
@ -1283,7 +1282,7 @@ test_expect_success "--ignore-submodules=untracked doesn't suppress submodule su
|
|
|
|
On branch main
|
|
|
|
On branch main
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
and have 2 and 2 different commits each, respectively.
|
|
|
|
and have 2 and 2 different commits each, respectively.
|
|
|
|
(use "git pull" to merge the remote branch into yours)
|
|
|
|
(use "git pull" if you want to integrate the remote branch with yours)
|
|
|
|
|
|
|
|
|
|
|
|
Changes to be committed:
|
|
|
|
Changes to be committed:
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
@ -1364,7 +1363,7 @@ cat > expect << EOF
|
|
|
|
; On branch main
|
|
|
|
; On branch main
|
|
|
|
; Your branch and 'upstream' have diverged,
|
|
|
|
; Your branch and 'upstream' have diverged,
|
|
|
|
; and have 2 and 2 different commits each, respectively.
|
|
|
|
; and have 2 and 2 different commits each, respectively.
|
|
|
|
; (use "git pull" to merge the remote branch into yours)
|
|
|
|
; (use "git pull" if you want to integrate the remote branch with yours)
|
|
|
|
;
|
|
|
|
;
|
|
|
|
; Changes to be committed:
|
|
|
|
; Changes to be committed:
|
|
|
|
; (use "git restore --staged <file>..." to unstage)
|
|
|
|
; (use "git restore --staged <file>..." to unstage)
|
|
|
@ -1412,7 +1411,7 @@ test_expect_success "--ignore-submodules=all suppresses submodule summary" '
|
|
|
|
On branch main
|
|
|
|
On branch main
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
and have 2 and 2 different commits each, respectively.
|
|
|
|
and have 2 and 2 different commits each, respectively.
|
|
|
|
(use "git pull" to merge the remote branch into yours)
|
|
|
|
(use "git pull" if you want to integrate the remote branch with yours)
|
|
|
|
|
|
|
|
|
|
|
|
Changes not staged for commit:
|
|
|
|
Changes not staged for commit:
|
|
|
|
(use "git add <file>..." to update what will be committed)
|
|
|
|
(use "git add <file>..." to update what will be committed)
|
|
|
@ -1438,7 +1437,7 @@ test_expect_success '.gitmodules ignore=all suppresses unstaged submodule summar
|
|
|
|
On branch main
|
|
|
|
On branch main
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
and have 2 and 2 different commits each, respectively.
|
|
|
|
and have 2 and 2 different commits each, respectively.
|
|
|
|
(use "git pull" to merge the remote branch into yours)
|
|
|
|
(use "git pull" if you want to integrate the remote branch with yours)
|
|
|
|
|
|
|
|
|
|
|
|
Changes to be committed:
|
|
|
|
Changes to be committed:
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
@ -1558,7 +1557,6 @@ test_expect_success 'git commit --dry-run will show a staged but ignored submodu
|
|
|
|
On branch main
|
|
|
|
On branch main
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
Your branch and '\''upstream'\'' have diverged,
|
|
|
|
and have 2 and 2 different commits each, respectively.
|
|
|
|
and have 2 and 2 different commits each, respectively.
|
|
|
|
(use "git pull" to merge the remote branch into yours)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Changes to be committed:
|
|
|
|
Changes to be committed:
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
|
(use "git restore --staged <file>..." to unstage)
|
|
|
|