git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] cogito: cg-status option to show modified/uncommitted files

From
MPMatt Porter <mporter@kernel.crashing.org>
Date
Apr 28, 2005, 22:43 UTC
Message-ID
<20050428154320.D24498@cox.net>

Adds a -a option to show all status of the working tree. After hacking around I like to see what's new AND what's modified but uncommitted.

-Matt
Signed-off-by: Matt Porter <mporter@kernel.crashing.org>

=================================================================== --- c3aa1e6b53cc59d5fbe261f3f859584904ae3a63/cg-status (mode:100755 sha1:c9b69b9d54b6a6756f0ecad5324642eb66810b33) +++ uncommitted/cg-status (mode:100755)

@@ -3,7 +3,8 @@
 # Show status of entries in your working tree.
 # Copyright (c) Petr Baudis, 2005
 #
-# Takes no arguments.
+# Takes an optional -a argument which will cause all repository status
+# to be shown, including modified but uncommitted files
 
 . cg-Xlib
 
@@ -20,3 +21,18 @@
 	shift
 done
 ' padding
+
+
+if [ "$1" = "-a" ]; then
+	{
+		update-cache --refresh
+	} | xargs -0 sh -c '
+while [ "$1" ]; do
+tag="M";
+filename=${1%: *};
+echo "$tag $filename";
+shift
+done
+' padding
+fi
+
Message 1 of 1 in “cogito: cg-status option to show modified/uncommitted files”
  1. cogito: cg-status option to show modified/uncommitted filesMatt Porter, Apr 28, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.