File tree Expand file tree Collapse file tree 2 files changed +9
-21
lines changed
tests/workspace/ref_info/with_workspace_commit Expand file tree Collapse file tree 2 files changed +9
-21
lines changed Original file line number Diff line number Diff line change @@ -483,22 +483,10 @@ pub(crate) mod function {
483
483
[ info. commit_index_of_managed_commit ]
484
484
. id ;
485
485
msg. push_str (
486
- "The current changes will be stashed and must be re-applied manually. Commit them otherwise .\n " ,
486
+ "Run the following command in your working directory to fix this while leaving your worktree unchanged .\n " ,
487
487
) ;
488
- msg. push_str (
489
- "Run the following command in your working directory to fix this and restore the committed changes.\n \n " ,
490
- ) ;
491
- msg. push_str ( & format ! (
492
- " git stash && git reset --hard {ws_commit_id}{checkout_clause}" ,
493
- checkout_clause = info
494
- . commits_outside
495
- . first( )
496
- . map( |c| format!(
497
- " && git checkout {user_commit_id} -- ." ,
498
- user_commit_id = c. id
499
- ) )
500
- . unwrap_or_default( )
501
- ) ) ;
488
+ msg. push_str ( "Worktree changes need to be re-committed manually for now.\n \n " ) ;
489
+ msg. push_str ( & format ! ( " git reset --soft {ws_commit_id}" ) ) ;
502
490
bail ! ( "{msg}" ) ;
503
491
}
504
492
info. compute_similarity ( graph, repo, opts. expensive_commit_info ) ?;
Original file line number Diff line number Diff line change @@ -3248,10 +3248,10 @@ fn advanced_workspace_multi_stack() -> anyhow::Result<()> {
3248
3248
insta:: assert_snapshot!( err. to_string( ) , @r"
3249
3249
Found 5 commit(s) on top of the workspace commit.
3250
3250
3251
- The current changes will be stashed and must be re-applied manually. Commit them otherwise .
3252
- Run the following command in your working directory to fix this and restore the committed changes .
3251
+ Run the following command in your working directory to fix this while leaving your worktree unchanged .
3252
+ Worktree changes need to be re-committed manually for now .
3253
3253
3254
- git stash && git reset --hard 619d5486e6f5ae7f5e4ecc4a6ea506d6c8433410 && git checkout a7131b181b20c699ecbe4f6145bbb8746716c18b -- .
3254
+ git reset --soft 619d5486e6f5ae7f5e4ecc4a6ea506d6c8433410
3255
3255
" ) ;
3256
3256
Ok ( ( ) )
3257
3257
}
@@ -3280,10 +3280,10 @@ fn advanced_workspace_single_stack() -> anyhow::Result<()> {
3280
3280
insta:: assert_snapshot!( err. to_string( ) , @r"
3281
3281
Found 5 commit(s) on top of the workspace commit.
3282
3282
3283
- The current changes will be stashed and must be re-applied manually. Commit them otherwise .
3284
- Run the following command in your working directory to fix this and restore the committed changes .
3283
+ Run the following command in your working directory to fix this while leaving your worktree unchanged .
3284
+ Worktree changes need to be re-committed manually for now .
3285
3285
3286
- git stash && git reset --hard c58f15768a8ba280fe773ffc4820b13ad882cd84 && git checkout da912a8a455bca9e94ed65cb42328177fa891081 -- .
3286
+ git reset --soft c58f15768a8ba280fe773ffc4820b13ad882cd84
3287
3287
" ) ;
3288
3288
Ok ( ( ) )
3289
3289
}
You can’t perform that action at this time.
0 commit comments