File tree Expand file tree Collapse file tree 5 files changed +20
-0
lines changed Expand file tree Collapse file tree 5 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,14 @@ pub fn cmd_git_clone(
162
162
tx. finish ( ui, "check out git remote's default branch" ) ?;
163
163
}
164
164
}
165
+
166
+ if args. colocate {
167
+ writeln ! (
168
+ ui. hint_default( ) ,
169
+ r"Running `git clean -xdf` will remove `.jj/`!" ,
170
+ ) ?;
171
+ }
172
+
165
173
Ok ( ( ) )
166
174
}
167
175
Original file line number Diff line number Diff line change @@ -112,6 +112,12 @@ pub fn cmd_git_init(
112
112
r#"Initialized repo in "{}""# ,
113
113
relative_wc_path. display( )
114
114
) ?;
115
+ if args. colocate {
116
+ writeln ! (
117
+ ui. hint_default( ) ,
118
+ r"Running `git clean -xdf` will remove `.jj/`!" ,
119
+ ) ?;
120
+ }
115
121
116
122
Ok ( ( ) )
117
123
}
Original file line number Diff line number Diff line change @@ -197,6 +197,7 @@ fn test_git_clone_colocate() {
197
197
------- stderr -------
198
198
Fetching into new repo in "$TEST_ENV/empty"
199
199
Nothing changed.
200
+ Hint: Running `git clean -xdf` will remove `.jj/`!
200
201
[EOF]
201
202
"# ) ;
202
203
@@ -220,6 +221,7 @@ fn test_git_clone_colocate() {
220
221
Working copy (@) now at: uuqppmxq 3711b3b5 (empty) (no description set)
221
222
Parent commit (@-) : qomsplrm ebeb70d8 main | message
222
223
Added 1 files, modified 0 files, removed 0 files
224
+ Hint: Running `git clean -xdf` will remove `.jj/`!
223
225
[EOF]
224
226
"# ) ;
225
227
let clone_dir = test_env. work_dir ( "clone" ) ;
@@ -365,6 +367,7 @@ fn test_git_clone_colocate() {
365
367
Working copy (@) now at: vzqnnsmr fea36bca (empty) (no description set)
366
368
Parent commit (@-) : qomsplrm ebeb70d8 main | message
367
369
Added 1 files, modified 0 files, removed 0 files
370
+ Hint: Running `git clean -xdf` will remove `.jj/`!
368
371
[EOF]
369
372
"# ) ;
370
373
}
Original file line number Diff line number Diff line change @@ -1539,6 +1539,7 @@ fn test_git_colocated_operation_cleanup() {
1539
1539
insta:: assert_snapshot!( output, @r#"
1540
1540
------- stderr -------
1541
1541
Initialized repo in "repo"
1542
+ Hint: Running `git clean -xdf` will remove `.jj/`!
1542
1543
[EOF]
1543
1544
"# ) ;
1544
1545
Original file line number Diff line number Diff line change @@ -776,6 +776,7 @@ fn test_git_init_colocated_via_flag_git_dir_exists() {
776
776
------- stderr -------
777
777
Done importing changes from the underlying Git repo.
778
778
Initialized repo in "repo"
779
+ Hint: Running `git clean -xdf` will remove `.jj/`!
779
780
[EOF]
780
781
"# ) ;
781
782
@@ -806,6 +807,7 @@ fn test_git_init_colocated_via_flag_git_dir_not_exists() {
806
807
insta:: assert_snapshot!( output, @r#"
807
808
------- stderr -------
808
809
Initialized repo in "repo"
810
+ Hint: Running `git clean -xdf` will remove `.jj/`!
809
811
[EOF]
810
812
"# ) ;
811
813
// No HEAD ref is available yet
You can’t perform that action at this time.
0 commit comments