diff options
author | Luke Shumaker <lukeshu@datawire.io> | 2021-04-27 15:17:39 -0600 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-04-28 16:47:18 +0900 |
commit | e4f8baa88a0b294e1e2d91728e728e14574d1d87 (patch) | |
tree | 24bb784dd240dc7a3cc7b3625fe6f16f1ae6bb33 /t | |
parent | subtree: use "^{commit}" instead of "^0" (diff) | |
download | tgif-e4f8baa88a0b294e1e2d91728e728e14574d1d87.tar.xz |
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 't')
0 files changed, 0 insertions, 0 deletions