summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/revparse.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/revparse.c b/src/revparse.c
index 1b466cde0..dd3886e2d 100644
--- a/src/revparse.c
+++ b/src/revparse.c
@@ -732,6 +732,10 @@ int git_revparse_single(git_object **out, git_repository *repo, const char *spec
if (retcode < 0) {
next_state = REVPARSE_STATE_DONE;
}
+ } else if (*spec_cur == ':') {
+ retcode = handle_caret_syntax(&next_obj, repo, cur_obj, git_buf_cstr(&stepbuffer));
+ git_buf_clear(&stepbuffer);
+ next_state = !retcode ? REVPARSE_STATE_COLON : REVPARSE_STATE_DONE;
} else {
git_buf_putc(&stepbuffer, *spec_cur);
}