[PATCH 0/6] quote_path() clean-ups

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

 



So, this is an alternative approach to tackle the same issue
<xmqq4ko8yxp9.fsf@xxxxxxxxxxxxxxxxxxxxxx> tried to address.  It
ended up to be more involved than I would have liked, but it was
primarily because it needed some function signature changes.
 
The overall structure of the series is:

 (1) rename quote_path_relative() to quote_path().

 (2) allow quote_path() to take a flags parameter and update all the
     callers to pass 0 (all bits false)

 (3) move the "always quote a path with SP in it, even if there is
     no byte that needs quoting" logic out of wt-status.c that is
     used to show "git status --short" for tracked paths to
     quote_path() and give it the QUOTE_PATH_QUOTE_SP bit in the
     flags parameter.

 (4) using QUOTE_PATH_QUOTE_SP bit, apply the "always quote a path
     with SP" to "git status --short" output for untracked, ignored
     and unmerged paths.

Patches (5) and (6) are not strictly necessary.  They are what I
found while reading the existing code and thought it might, or might
not, be worth cleaning up and couldn't decide ;-)

Junio C Hamano (6):
  quote_path: rename quote_path_relative() to quote_path()
  quote_path: give flags parameter to quote_path()
  quote_path: optionally allow quoting a path with SP in it
  wt-status: consistently quote paths in "status --short" output
  quote: rename misnamed sq_lookup[] to cq_lookup[]
  quote: turn 'nodq' parameter into a set of flags

 builtin/clean.c   | 22 +++++++++++-----------
 builtin/grep.c    |  2 +-
 diff.c            |  8 ++++----
 quote.c           | 39 ++++++++++++++++++++++++---------------
 quote.h           | 11 +++++++----
 t/t7508-status.sh | 21 +++++++++++++++++++++
 wt-status.c       | 37 +++++++++++++------------------------
 7 files changed, 81 insertions(+), 59 deletions(-)

-- 
2.28.0-539-g66371d8995




[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