mbox series

[v5,0/1] support `--object-only` option for "git-ls-tree"

Message ID cover.1638891420.git.dyroneteng@gmail.com (mailing list archive)
Headers show
Series support `--object-only` option for "git-ls-tree" | expand

Message

Teng Long Dec. 8, 2021, 2:08 a.m. UTC
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"