@@ -162,7 +162,7 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,
162
162
if ((force_flag & REMOVE_DIR_KEEP_NESTED_GIT ) &&
163
163
is_nonbare_repository_dir (path )) {
164
164
if (!quiet ) {
165
- quote_path_relative (path -> buf , prefix , & quoted );
165
+ quote_path (path -> buf , prefix , & quoted );
166
166
printf (dry_run ? _ (msg_would_skip_git_dir ) : _ (msg_skip_git_dir ),
167
167
quoted .buf );
168
168
}
@@ -177,7 +177,7 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,
177
177
res = dry_run ? 0 : rmdir (path -> buf );
178
178
if (res ) {
179
179
int saved_errno = errno ;
180
- quote_path_relative (path -> buf , prefix , & quoted );
180
+ quote_path (path -> buf , prefix , & quoted );
181
181
errno = saved_errno ;
182
182
warning_errno (_ (msg_warn_remove_failed ), quoted .buf );
183
183
* dir_gone = 0 ;
@@ -202,19 +202,19 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,
202
202
if (remove_dirs (path , prefix , force_flag , dry_run , quiet , & gone ))
203
203
ret = 1 ;
204
204
if (gone ) {
205
- quote_path_relative (path -> buf , prefix , & quoted );
205
+ quote_path (path -> buf , prefix , & quoted );
206
206
string_list_append (& dels , quoted .buf );
207
207
} else
208
208
* dir_gone = 0 ;
209
209
continue ;
210
210
} else {
211
211
res = dry_run ? 0 : unlink (path -> buf );
212
212
if (!res ) {
213
- quote_path_relative (path -> buf , prefix , & quoted );
213
+ quote_path (path -> buf , prefix , & quoted );
214
214
string_list_append (& dels , quoted .buf );
215
215
} else {
216
216
int saved_errno = errno ;
217
- quote_path_relative (path -> buf , prefix , & quoted );
217
+ quote_path (path -> buf , prefix , & quoted );
218
218
errno = saved_errno ;
219
219
warning_errno (_ (msg_warn_remove_failed ), quoted .buf );
220
220
* dir_gone = 0 ;
@@ -238,7 +238,7 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,
238
238
* dir_gone = 1 ;
239
239
else {
240
240
int saved_errno = errno ;
241
- quote_path_relative (path -> buf , prefix , & quoted );
241
+ quote_path (path -> buf , prefix , & quoted );
242
242
errno = saved_errno ;
243
243
warning_errno (_ (msg_warn_remove_failed ), quoted .buf );
244
244
* dir_gone = 0 ;
@@ -266,7 +266,7 @@ static void pretty_print_dels(void)
266
266
struct column_options copts ;
267
267
268
268
for_each_string_list_item (item , & del_list ) {
269
- qname = quote_path_relative (item -> string , NULL , & buf );
269
+ qname = quote_path (item -> string , NULL , & buf );
270
270
string_list_append (& list , qname );
271
271
}
272
272
@@ -753,7 +753,7 @@ static int ask_each_cmd(void)
753
753
for_each_string_list_item (item , & del_list ) {
754
754
/* Ctrl-D should stop removing files */
755
755
if (!eof ) {
756
- qname = quote_path_relative (item -> string , NULL , & buf );
756
+ qname = quote_path (item -> string , NULL , & buf );
757
757
/* TRANSLATORS: Make sure to keep [y/N] as is */
758
758
printf (_ ("Remove %s [y/N]? " ), qname );
759
759
if (git_read_line_interactively (& confirm ) == EOF ) {
@@ -1047,19 +1047,19 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
1047
1047
if (remove_dirs (& abs_path , prefix , rm_flags , dry_run , quiet , & gone ))
1048
1048
errors ++ ;
1049
1049
if (gone && !quiet ) {
1050
- qname = quote_path_relative (item -> string , NULL , & buf );
1050
+ qname = quote_path (item -> string , NULL , & buf );
1051
1051
printf (dry_run ? _ (msg_would_remove ) : _ (msg_remove ), qname );
1052
1052
}
1053
1053
} else {
1054
1054
res = dry_run ? 0 : unlink (abs_path .buf );
1055
1055
if (res ) {
1056
1056
int saved_errno = errno ;
1057
- qname = quote_path_relative (item -> string , NULL , & buf );
1057
+ qname = quote_path (item -> string , NULL , & buf );
1058
1058
errno = saved_errno ;
1059
1059
warning_errno (_ (msg_warn_remove_failed ), qname );
1060
1060
errors ++ ;
1061
1061
} else if (!quiet ) {
1062
- qname = quote_path_relative (item -> string , NULL , & buf );
1062
+ qname = quote_path (item -> string , NULL , & buf );
1063
1063
printf (dry_run ? _ (msg_would_remove ) : _ (msg_remove ), qname );
1064
1064
}
1065
1065
}
0 commit comments