summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-02-02 12:08:18 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2014-02-05 12:16:44 +0100
commitc74077d13c582ff46668f3ace4c54f20287cfed4 (patch)
treee62b2a3d6e9f0be1dc4699ac0666ecb63d28435b
parentd18209eef9a7fbbccb495b6e5450d14a76623847 (diff)
downloadlibgit2-c74077d13c582ff46668f3ace4c54f20287cfed4.tar.gz
revparse: do look at all refs when matching text
Now that we no longer fail to push non-commits on a glob, let's search on all refs when we rev-parse syntax asks us to match text.
-rw-r--r--src/revparse.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/revparse.c b/src/revparse.c
index 5cce3be63..60872e187 100644
--- a/src/revparse.c
+++ b/src/revparse.c
@@ -490,8 +490,7 @@ static int handle_grep_syntax(git_object **out, git_repository *repo, const git_
git_revwalk_sorting(walk, GIT_SORT_TIME);
if (spec_oid == NULL) {
- // TODO: @carlosmn: The glob should be refs/* but this makes git_revwalk_next() fails
- if ((error = git_revwalk_push_glob(walk, GIT_REFS_HEADS_DIR "*")) < 0)
+ if ((error = git_revwalk_push_glob(walk, "refs/*")) < 0)
goto cleanup;
} else if ((error = git_revwalk_push(walk, spec_oid)) < 0)
goto cleanup;