3 # List contents of a particular tree in the repository
4 # Copyright (c) Petr Baudis, 2005
6 # Optionally takes a commit or tree ID as a parameter, defaulting to
11 # -t TREE_ID:: List content of the given TREE_ID
12 # List the content of the given TREE_ID.
16 # Each line in the output has the following format:
18 # <mode> <type> <sha1> <name>
23 # The file permission information in octal format.
26 # The type can be the following: `blob` refers to files
27 # and `tree` refers to directories.
33 # The file or directory name.
37 # 100644 blob c7dacd0ea28994e3c754ca4eadb2e08c011ee3d3 README
41 USAGE
="cg-admin-ls [-t TREE_ID] [PATH]"
44 .
"${COGITO_LIB}"cg-Xlib ||
exit 1
55 id
="$(cg-object-id -t "$tree_id")" ||
exit 1
57 git-ls-tree
"$id" "${ARGS[@]}"