From 640ac16ab4bfee62a80953d82244cecd8f52c5b2 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sat, 25 Oct 2008 13:31:35 +0200 Subject: [PATCH] Show file status in zit list, and document it --- zit | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/zit b/zit index 06fc3b4..ca588bc 100755 --- a/zit +++ b/zit @@ -17,6 +17,16 @@ zit_help() { git) git help "$@" ;; + list|tracked) + echo "usage: zit list" + echo "Show tracked files, with a one-letter prefix indicating their status:" + echo " H cached" + echo " M unmerged" + echo " R removed/deleted" + echo " C modified/changed" + echo " K to be killed" + echo " ? other" + ;; *) echo $USAGE echo "" @@ -103,8 +113,7 @@ zit_list() { file="${file#.}" file="${file#zit/}" file="${file%.git}" - # TODO show actual file status - git ls-files -t $file + (git ls-files -m -d -t; git ls-files -t) | uniq -f 1 done; # if $GIT_DIR is empty, no files were found test "$GIT_DIR" || echo "(no files tracked by zit)" -- 2.32.0.93.g670b81a890