aboutsummaryrefslogtreecommitdiff
path: root/pathspec.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-04-26 15:39:03 +0900
committerJunio C Hamano <gitster@pobox.com>2017-04-26 15:39:03 +0900
commit44427a0c18c0179be72223650715f031a10a5e66 (patch)
tree09eac9c685901b249bef83acaa93e21e18dd366a /pathspec.c
parentda4c6007301ec92f835c2a174efa3168a1626301 (diff)
parentbe4dbbbed931a1683e351b872865ed8d90e9ac2b (diff)
downloadgit-44427a0c18c0179be72223650715f031a10a5e66.tar.gz
git-44427a0c18c0179be72223650715f031a10a5e66.tar.xz
Merge branch 'ps/pathspec-empty-prefix-origin'
A recent update broke "git add -p ../foo" from a subdirectory. * ps/pathspec-empty-prefix-origin: pathspec: honor `PATHSPEC_PREFIX_ORIGIN` with empty prefix
Diffstat (limited to 'pathspec.c')
-rw-r--r--pathspec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pathspec.c b/pathspec.c
index 69ef86b85..50f76fff4 100644
--- a/pathspec.c
+++ b/pathspec.c
@@ -505,7 +505,7 @@ static void init_pathspec_item(struct pathspec_item *item, unsigned flags,
* original. Useful for passing to another command.
*/
if ((flags & PATHSPEC_PREFIX_ORIGIN) &&
- prefixlen && !get_literal_global()) {
+ !get_literal_global()) {
struct strbuf sb = STRBUF_INIT;
/* Preserve the actual prefix length of each pattern */