# (use "git pull" to merge the remote branch into yours)
#
# Changes to be committed:
-# (use "git reset HEAD <file>..." to unstage)
+# (use "git restore --staged <file>..." to unstage)
#
# new file: dir2/added
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
-# (use "git checkout -- <file>..." to discard changes in working directory)
+# (use "git restore <file>..." to discard changes in working directory)
#
# modified: dir1/modified
#
# (use "git pull" to merge the remote branch into yours)
#
# Changes to be committed:
-# (use "git reset HEAD <file>..." to unstage)
+# (use "git restore --staged <file>..." to unstage)
#
# new file: dir2/added
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
-# (use "git checkout -- <file>..." to discard changes in working directory)
+# (use "git restore <file>..." to discard changes in working directory)
#
# modified: dir1/modified
#
(use "git pull" to merge the remote branch into yours)
Changes to be committed:
- (use "git reset HEAD <file>..." to unstage)
+ (use "git restore --staged <file>..." to unstage)
new file: dir2/added
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
- (use "git checkout -- <file>..." to discard changes in working directory)
+ (use "git restore <file>..." to discard changes in working directory)
modified: dir1/modified
(use "git pull" to merge the remote branch into yours)
Changes to be committed:
- (use "git reset HEAD <file>..." to unstage)
+ (use "git restore --staged <file>..." to unstage)
new file: dir2/added
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
- (use "git checkout -- <file>..." to discard changes in working directory)
+ (use "git restore <file>..." to discard changes in working directory)
modified: dir1/modified
(use "git pull" to merge the remote branch into yours)
Changes to be committed:
- (use "git reset HEAD <file>..." to unstage)
+ (use "git restore --staged <file>..." to unstage)
new file: dir2/added
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
- (use "git checkout -- <file>..." to discard changes in working directory)
+ (use "git restore <file>..." to discard changes in working directory)
modified: dir1/modified
(use "git pull" to merge the remote branch into yours)
Changes to be committed:
- (use "git reset HEAD <file>..." to unstage)
+ (use "git restore --staged <file>..." to unstage)
new file: dir2/added
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
- (use "git checkout -- <file>..." to discard changes in working directory)
+ (use "git restore <file>..." to discard changes in working directory)
modified: dir1/modified
(use "git pull" to merge the remote branch into yours)
Changes to be committed:
- (use "git reset HEAD <file>..." to unstage)
+ (use "git restore --staged <file>..." to unstage)
new file: dir2/added
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
- (use "git checkout -- <file>..." to discard changes in working directory)
+ (use "git restore <file>..." to discard changes in working directory)
modified: dir1/modified
(use "git pull" to merge the remote branch into yours)
Changes to be committed:
- (use "git reset HEAD <file>..." to unstage)
+ (use "git restore --staged <file>..." to unstage)
new file: ../dir2/added
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
- (use "git checkout -- <file>..." to discard changes in working directory)
+ (use "git restore <file>..." to discard changes in working directory)
modified: modified
(use "git pull" to merge the remote branch into yours)
Changes to be committed:
- (use "git reset HEAD <file>..." to unstage)
+ (use "git restore --staged <file>..." to unstage)
<GREEN>new file: dir2/added<RESET>
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
- (use "git checkout -- <file>..." to discard changes in working directory)
+ (use "git restore <file>..." to discard changes in working directory)
<RED>modified: dir1/modified<RESET>
(use "git pull" to merge the remote branch into yours)
Changes to be committed:
- (use "git reset HEAD <file>..." to unstage)
+ (use "git restore --staged <file>..." to unstage)
new file: dir2/added
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
- (use "git checkout -- <file>..." to discard changes in working directory)
+ (use "git restore <file>..." to discard changes in working directory)
modified: dir1/modified
(use "git pull" to merge the remote branch into yours)
Changes to be committed:
- (use "git reset HEAD <file>..." to unstage)
+ (use "git restore --staged <file>..." to unstage)
modified: dir1/modified
(use "git pull" to merge the remote branch into yours)
Changes to be committed:
- (use "git reset HEAD <file>..." to unstage)
+ (use "git restore --staged <file>..." to unstage)
new file: dir2/added
new file: sm
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
- (use "git checkout -- <file>..." to discard changes in working directory)
+ (use "git restore <file>..." to discard changes in working directory)
modified: dir1/modified
(use "git pull" to merge the remote branch into yours)
Changes to be committed:
- (use "git reset HEAD <file>..." to unstage)
+ (use "git restore --staged <file>..." to unstage)
new file: dir2/added
new file: sm
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
- (use "git checkout -- <file>..." to discard changes in working directory)
+ (use "git restore <file>..." to discard changes in working directory)
modified: dir1/modified
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
- (use "git checkout -- <file>..." to discard changes in working directory)
+ (use "git restore <file>..." to discard changes in working directory)
modified: dir1/modified
(use "git pull" to merge the remote branch into yours)
Changes to be committed:
- (use "git reset HEAD^1 <file>..." to unstage)
+ (use "git restore --source=HEAD^1 --staged <file>..." to unstage)
new file: dir2/added
new file: sm
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
- (use "git checkout -- <file>..." to discard changes in working directory)
+ (use "git restore <file>..." to discard changes in working directory)
modified: dir1/modified
'
test_expect_success POSIXPERM,SANITY 'status succeeds in a read-only repository' '
+ test_when_finished "chmod 775 .git" &&
(
chmod a-w .git &&
# make dir1/tracked stat-dirty
# make sure "status" succeeded without writing index out
git diff-files | grep dir1/tracked
)
- status=$?
- chmod 775 .git
- (exit $status)
'
(cd sm && echo > bar && git add bar && git commit -q -m 'Add bar') && git add sm
(use "git pull" to merge the remote branch into yours)
Changes to be committed:
- (use "git reset HEAD <file>..." to unstage)
+ (use "git restore --staged <file>..." to unstage)
modified: sm
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
- (use "git checkout -- <file>..." to discard changes in working directory)
+ (use "git restore <file>..." to discard changes in working directory)
modified: dir1/modified
(use "git pull" to merge the remote branch into yours)
Changes to be committed:
- (use "git reset HEAD <file>..." to unstage)
+ (use "git restore --staged <file>..." to unstage)
modified: sm
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
- (use "git checkout -- <file>..." to discard changes in working directory)
+ (use "git restore <file>..." to discard changes in working directory)
(commit or discard the untracked or modified content in submodules)
modified: dir1/modified
(use "git pull" to merge the remote branch into yours)
Changes to be committed:
- (use "git reset HEAD <file>..." to unstage)
+ (use "git restore --staged <file>..." to unstage)
modified: sm
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
- (use "git checkout -- <file>..." to discard changes in working directory)
+ (use "git restore <file>..." to discard changes in working directory)
modified: dir1/modified
modified: sm (new commits)
; (use "git pull" to merge the remote branch into yours)
;
; Changes to be committed:
-; (use "git reset HEAD <file>..." to unstage)
+; (use "git restore --staged <file>..." to unstage)
;
; modified: sm
;
; Changes not staged for commit:
; (use "git add <file>..." to update what will be committed)
-; (use "git checkout -- <file>..." to discard changes in working directory)
+; (use "git restore <file>..." to discard changes in working directory)
;
; modified: dir1/modified
; modified: sm (new commits)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
- (use "git checkout -- <file>..." to discard changes in working directory)
+ (use "git restore <file>..." to discard changes in working directory)
modified: dir1/modified
(use "git pull" to merge the remote branch into yours)
Changes to be committed:
- (use "git reset HEAD <file>..." to unstage)
+ (use "git restore --staged <file>..." to unstage)
modified: sm
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
- (use "git checkout -- <file>..." to discard changes in working directory)
+ (use "git restore <file>..." to discard changes in working directory)
modified: dir1/modified
(use "git pull" to merge the remote branch into yours)
Changes to be committed:
- (use "git reset HEAD <file>..." to unstage)
+ (use "git restore --staged <file>..." to unstage)
modified: sm
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
- (use "git checkout -- <file>..." to discard changes in working directory)
+ (use "git restore <file>..." to discard changes in working directory)
modified: dir1/modified