@@ -162,7 +162,7 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,
162162 if ((force_flag & REMOVE_DIR_KEEP_NESTED_GIT ) &&
163163 is_nonbare_repository_dir (path )) {
164164 if (!quiet ) {
165- quote_path_relative (path -> buf , prefix , & quoted );
165+ quote_path (path -> buf , prefix , & quoted );
166166 printf (dry_run ? _ (msg_would_skip_git_dir ) : _ (msg_skip_git_dir ),
167167 quoted .buf );
168168 }
@@ -177,7 +177,7 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,
177177 res = dry_run ? 0 : rmdir (path -> buf );
178178 if (res ) {
179179 int saved_errno = errno ;
180- quote_path_relative (path -> buf , prefix , & quoted );
180+ quote_path (path -> buf , prefix , & quoted );
181181 errno = saved_errno ;
182182 warning_errno (_ (msg_warn_remove_failed ), quoted .buf );
183183 * dir_gone = 0 ;
@@ -202,19 +202,19 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,
202202 if (remove_dirs (path , prefix , force_flag , dry_run , quiet , & gone ))
203203 ret = 1 ;
204204 if (gone ) {
205- quote_path_relative (path -> buf , prefix , & quoted );
205+ quote_path (path -> buf , prefix , & quoted );
206206 string_list_append (& dels , quoted .buf );
207207 } else
208208 * dir_gone = 0 ;
209209 continue ;
210210 } else {
211211 res = dry_run ? 0 : unlink (path -> buf );
212212 if (!res ) {
213- quote_path_relative (path -> buf , prefix , & quoted );
213+ quote_path (path -> buf , prefix , & quoted );
214214 string_list_append (& dels , quoted .buf );
215215 } else {
216216 int saved_errno = errno ;
217- quote_path_relative (path -> buf , prefix , & quoted );
217+ quote_path (path -> buf , prefix , & quoted );
218218 errno = saved_errno ;
219219 warning_errno (_ (msg_warn_remove_failed ), quoted .buf );
220220 * dir_gone = 0 ;
@@ -238,7 +238,7 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,
238238 * dir_gone = 1 ;
239239 else {
240240 int saved_errno = errno ;
241- quote_path_relative (path -> buf , prefix , & quoted );
241+ quote_path (path -> buf , prefix , & quoted );
242242 errno = saved_errno ;
243243 warning_errno (_ (msg_warn_remove_failed ), quoted .buf );
244244 * dir_gone = 0 ;
@@ -266,7 +266,7 @@ static void pretty_print_dels(void)
266266 struct column_options copts ;
267267
268268 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 );
270270 string_list_append (& list , qname );
271271 }
272272
@@ -753,7 +753,7 @@ static int ask_each_cmd(void)
753753 for_each_string_list_item (item , & del_list ) {
754754 /* Ctrl-D should stop removing files */
755755 if (!eof ) {
756- qname = quote_path_relative (item -> string , NULL , & buf );
756+ qname = quote_path (item -> string , NULL , & buf );
757757 /* TRANSLATORS: Make sure to keep [y/N] as is */
758758 printf (_ ("Remove %s [y/N]? " ), qname );
759759 if (git_read_line_interactively (& confirm ) == EOF ) {
@@ -1047,19 +1047,19 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
10471047 if (remove_dirs (& abs_path , prefix , rm_flags , dry_run , quiet , & gone ))
10481048 errors ++ ;
10491049 if (gone && !quiet ) {
1050- qname = quote_path_relative (item -> string , NULL , & buf );
1050+ qname = quote_path (item -> string , NULL , & buf );
10511051 printf (dry_run ? _ (msg_would_remove ) : _ (msg_remove ), qname );
10521052 }
10531053 } else {
10541054 res = dry_run ? 0 : unlink (abs_path .buf );
10551055 if (res ) {
10561056 int saved_errno = errno ;
1057- qname = quote_path_relative (item -> string , NULL , & buf );
1057+ qname = quote_path (item -> string , NULL , & buf );
10581058 errno = saved_errno ;
10591059 warning_errno (_ (msg_warn_remove_failed ), qname );
10601060 errors ++ ;
10611061 } else if (!quiet ) {
1062- qname = quote_path_relative (item -> string , NULL , & buf );
1062+ qname = quote_path (item -> string , NULL , & buf );
10631063 printf (dry_run ? _ (msg_would_remove ) : _ (msg_remove ), qname );
10641064 }
10651065 }
0 commit comments