summaryrefslogtreecommitdiff
path: root/wrapper.c
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@datawire.io>2021-04-27 21:17:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-04-28 07:47:18 (GMT)
commite4f8baa88a0b294e1e2d91728e728e14574d1d87 (patch)
tree24bb784dd240dc7a3cc7b3625fe6f16f1ae6bb33 /wrapper.c
parentbbffb023830f9b68e2c461e47756579a5cd6ab7a (diff)
downloadgit-e4f8baa88a0b294e1e2d91728e728e14574d1d87.zip
git-e4f8baa88a0b294e1e2d91728e728e14574d1d87.tar.gz
git-e4f8baa88a0b294e1e2d91728e728e14574d1d87.tar.bz2
subtree: parse revs in individual cmd_ functions
The main argument parser goes ahead and tries to parse revs to make things simpler for the sub-command implementations. But, it includes enough special cases for different sub-commands. And it's difficult having having to think about "is this info coming from an argument, or a global variable?". So the main argument parser's effort to make things "simpler" ends up just making it more confusing and complicated. Begone with the 'revs' global variable; parse 'rev=$(...)' as needed in individual 'cmd_*' functions. Begone with the 'default' global variable. Its would-be value is knowable just from which function we're in. Begone with the 'ensure_single_rev' function. Its functionality can be achieved by passing '--verify' to 'git rev-parse'. Signed-off-by: Luke Shumaker <lukeshu@datawire.io> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'wrapper.c')
0 files changed, 0 insertions, 0 deletions