@@ -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 ) {
@@ -1051,19 +1051,19 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
1051
1051
if (remove_dirs (& abs_path , prefix , rm_flags , dry_run , quiet , & gone ))
1052
1052
errors ++ ;
1053
1053
if (gone && !quiet ) {
1054
- qname = quote_path_relative (item -> string , NULL , & buf );
1054
+ qname = quote_path (item -> string , NULL , & buf );
1055
1055
printf (dry_run ? _ (msg_would_remove ) : _ (msg_remove ), qname );
1056
1056
}
1057
1057
} else {
1058
1058
res = dry_run ? 0 : unlink (abs_path .buf );
1059
1059
if (res ) {
1060
1060
int saved_errno = errno ;
1061
- qname = quote_path_relative (item -> string , NULL , & buf );
1061
+ qname = quote_path (item -> string , NULL , & buf );
1062
1062
errno = saved_errno ;
1063
1063
warning_errno (_ (msg_warn_remove_failed ), qname );
1064
1064
errors ++ ;
1065
1065
} else if (!quiet ) {
1066
- qname = quote_path_relative (item -> string , NULL , & buf );
1066
+ qname = quote_path (item -> string , NULL , & buf );
1067
1067
printf (dry_run ? _ (msg_would_remove ) : _ (msg_remove ), qname );
1068
1068
}
1069
1069
}
0 commit comments