Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
pathspec: honor `PATHSPEC_PREFIX_ORIGIN` with empty prefix
[gitweb.git]
/
pathspec.c
diff --git
a/pathspec.c
b/pathspec.c
index 303efda837a10ec4e8798f9899c90cd511752cfe..3079a817a1a3dc5768e8d6a704a2bd3990b3cbcf 100644
(file)
--- 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 */