summaryrefslogtreecommitdiff
path: root/commit-reach.c
diff options
context:
space:
mode:
authorZheNing Hu <adlternative@gmail.com>2023-05-23 09:00:18 +0000
committerJunio C Hamano <gitster@pobox.com>2023-05-23 20:12:57 +0900
commit4d28c4f75fc12e7795fb2c1db2caedb6d9648af8 (patch)
treeca69b1cb46b4bf86b5c76b936e80c82902a7f3b5 /commit-reach.c
parent5bc069e383539824fd3a0d897100d44bbe1f8a24 (diff)
ls-files: align format atoms with ls-tree
"git ls-files --format" can be used to format the output of multiple file entries in the index, while "git ls-tree --format" can be used to format the contents of a tree object. However, the current set of %(objecttype), "(objectsize)", and "%(objectsize:padded)" atoms supported by "git ls-files --format" is a subset of what is available in "git ls-tree --format". Users sometimes need to establish a unified view between the index and tree, which can help with comparison or conversion between the two. Therefore, this patch adds the missing atoms to "git ls-files --format". "%(objecttype)" can be used to retrieve the object type corresponding to a file in the index, "(objectsize)" can be used to retrieve the object size corresponding to a file in the index, and "%(objectsize:padded)" is the same as "(objectsize)", except with padded format. Signed-off-by: ZheNing Hu <adlternative@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-reach.c')
0 files changed, 0 insertions, 0 deletions