git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matt Porter <mporter@kernel.crashing.org>
To: pasky@ucw.cz
Cc: git@vger.kernel.org
Subject: [PATCH] cogito: cg-status option to show modified/uncommitted files
Date: Thu, 28 Apr 2005 15:43:20 -0700	[thread overview]
Message-ID: <20050428154320.D24498@cox.net> (raw)

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
+

                 reply	other threads:[~2005-04-28 22:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050428154320.D24498@cox.net \
    --to=mporter@kernel.crashing.org \
    --cc=git@vger.kernel.org \
    --cc=pasky@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).