Re: [PATCH v3] git-clean: correct printing relative path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dmitry Potapov <dpotapov@xxxxxxxxx> writes:

> When the given path contains '..' then git-clean incorrectly printed names
> of files. This patch changes cmd_clean to use quote_path() from wt-status.

I think making quote_path() available from outside is fine, but as a
public function, quote_path() is grossly misnamed.  It was an Ok name in
the context of wt-status, where the sole kind of path quoting necessary
was to show themrelative to the current working directory.  As a general
library, it needs much better name, perhaps quote_path_relative(), and it
should move to quote.c, not staying in wt-status.c.

The implementation of quote_path() also needs to be fixed.  For one thing,
it does not seem to honor core.quotepath configuration, and it also passes
"\t" unquoted.  I think rewriting the handcrafted loop to treat \n and \r
specially should be yanked out and replaced with c_style_quote family of
functions in quote.c
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux