[PATCH 0/9] magic pathspec updates

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

 



This is a series to update the magic pathspec topic, primarily the area
around the empty ':' pathspec.

The failing tests from Duy's are mostly due to the fact that this round is
not converting the codebase fully and still use char **pathspec in places.

As get_pathspec() gives only a munged string for pattern matching, while
losing the original pathspec information such as up to which point in the
resulting string came from the prefix (hence it must match literally even
under icase) or what the original string looked like, there is no way for
these tests, especially the ones to check failure mode and the information
in the error report, to pass.

As NEEDSWORK comment in prefix_pathspec() says, all the callers need to be
converted to use "struct pathspec" interface, so that they can preserve
the original information for error reporting purposes (and also to pass
to external subprocesses --- see how pathspec is used to spawn the "add -i"
helper for example).

Other than that, I think the current code is probably more or less safe to
dogfood with known rough edges.

Junio C Hamano (8):
  grep: use get_pathspec() correctly
  get_pathspec(): an empty ':' pathspec should stand alone
  count_pathspec(): return number of elements in pathspec
  add ":" is a pathspec that is too wide
  git rm ":" is like specifying nothing
  clean ":" is like specifying nothing
  mv ":" ":" is like moving nothing from nowhere to nowhere
  checkout ":" is not giving any pathspec

Nguyán ThÃi Ngác Duy (1):
  t3703, t4208: add test cases for magic pathspec

 Documentation/glossary-content.txt |    3 +
 builtin/add.c                      |    4 +-
 builtin/checkout.c                 |    9 +---
 builtin/clean.c                    |    1 +
 builtin/grep.c                     |    8 +---
 builtin/mv.c                       |    6 ++-
 builtin/rm.c                       |    4 +-
 cache.h                            |    3 +-
 setup.c                            |   18 ++++++++-
 t/t3703-add-magic-pathspec.sh      |   78 ++++++++++++++++++++++++++++++++++++
 t/t4208-log-magic-pathspec.sh      |   45 +++++++++++++++++++++
 11 files changed, 160 insertions(+), 19 deletions(-)
 create mode 100755 t/t3703-add-magic-pathspec.sh
 create mode 100755 t/t4208-log-magic-pathspec.sh

-- 
1.7.5.1.290.g1b565

--
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]