aboutsummaryrefslogtreecommitdiff
path: root/contrib/completion/git-completion.bash
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2026-03-26 15:14:24 -0400
committerJunio C Hamano <gitster@pobox.com>2026-03-26 12:47:17 -0700
commit213b2138770d820bc28fde839f3e4df90a5d5d81 (patch)
tree53cdf587b7713916b93741b22437f6988a4ce990 /contrib/completion/git-completion.bash
parent22b985ef193a18ec0e6602ea1838e3290a351dd6 (diff)
downloadgit-213b2138770d820bc28fde839f3e4df90a5d5d81.tar.xz
rev-parse: avoid writing to const string for parent marks
The previous commit cleared up some const confusion in handling parent marks in revision.c, but we have roughly the same code duplicated in rev-parse. This one is much easier to fix, because the handling of the shortened string is all done in one place, after detecting any marks (but without shortening the string between marks). As a side note, I suspect this means that it behaves differently than the revision.c parser for weird stuff like "foo^!^@^-", but that is outside the scope of this patch. While we are here, let's also rename the variable "dotdot", which is totally misleading (and which we already fixed in revision.c long ago via f632dedd8d (handle_revision_arg: stop using "dotdot" as a generic pointer, 2017-05-19)). Doing that here makes the diff a little messier, but it also lets the compiler help us make sure we did not miss any stray mentions of the variable while we are changing its semantics. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/completion/git-completion.bash')
0 files changed, 0 insertions, 0 deletions