[PATCH v5 0/1] support `--object-only` option for "git-ls-tree"
- From
Teng Long <dyroneteng@gmail.com>
- Date
- Dec 8, 2021, 02:08 UTC
- Message-ID
- <cover.1638891420.git.dyroneteng@gmail.com>
- In-Reply-To
- <cover.1637642029.git.dyroneteng@gmail.com>
Diffs from patch v4:
* Change `--oid-only` to `--object-only`. Word "oid" may not be easily understood for users.
* The commit message was modified in terms of Junio's advice.
* Use "OPT_CMDMODE()" to make `--name-only`, `--object-only` and `--long` mutually exclusive with each other.
* After options been parsed, translate options to bitmask, then use cleaner bitwise to determine which fields will be shown.
* Add tests for mutually exclusive options.
* Documentation modifications about the change of option name.
Thanks.
Teng Long (1): ls-tree.c: support `--object-only` option for "git-ls-tree"
Documentation/git-ls-tree.txt | 7 +- builtin/ls-tree.c | 125 ++++++++++++++++++++++++---------- t/t3103-ls-tree-misc.sh | 8 +++ t/t3104-ls-tree-oid.sh | 51 ++++++++++++++ 4 files changed, 154 insertions(+), 37 deletions(-) create mode 100755 t/t3104-ls-tree-oid.sh
Range-diff against v4: -: ---------- > 1: 38d55a878c ls-tree.c: support `--object-only` option for "git-ls-tree"
-- 2.33.1.10.gd2a07a0ec5.dirty