git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Sorenson <frank@tuxrocks.com>
To: Markus Dahms <mad@automagically.de>
Cc: git@vger.kernel.org, Petr Baudis <pasky@ucw.cz>
Subject: Re: [Cogito] less verbose cg-clone/cg-update?
Date: Sun, 26 Jun 2005 00:19:40 -0600	[thread overview]
Message-ID: <42BE48FC.40504@tuxrocks.com> (raw)
In-Reply-To: <pan.2005.06.24.06.46.32.339572@automagically.de>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Markus Dahms wrote:
> Hi there,
> 
> as a person just following the development process of Linux/GIT/etc.
> I'm normally not interested in SHA-1 sums on updating my local tree.
> IMHO the default output should be less verbose (like in most VCSs),
> especially in file changes the type of change (N/M/...) and the
> file name may be enough.
> Given an option (e.g. "-v") there could be a lot more...
> 
> If there's no time, I'd do the patch...
> 
> Markus
> 
> P.S.: I didn't really look at the source, maybe it's a git not
>       a cg-* change...

Here is a patch that implements a cogito-based "quiet" output option
(-q) for cg-pull.  This could easily be inverted to default to quiet
and allow the verbose option instead.  Also, with the option in there,
it wouldn't be hard to quiet up other portions of cg-pull.

Signed-off-by: Frank Sorenson <frank@tuxrocks.com>

diff --git a/cg-pull b/cg-pull
- --- a/cg-pull
+++ b/cg-pull
@@ -11,15 +11,21 @@
 # -------
 # -f::
 #	Force the complete pull even if the heads are the same.
+#
+# -q::
+#	Display quieter output
 
- -USAGE="cg-pull [-f] [BRANCH_NAME]"
+USAGE="cg-pull [-f] [-q] [BRANCH_NAME]"
 
 . ${COGITO_LIB}cg-Xlib
 
 force=
+quiet=
 while optparse; do
 	if optparse -f; then
 		force=1
+	elif optparse -q; then
+		quiet=1
 	else
 		optfail
 	fi
@@ -309,8 +315,11 @@ if [ ! "$orig_head" ]; then
 
 elif [ "$orig_head" != "$new_head" ]; then
 	echo "Tree change: $orig_head:$new_head"
- -	git-diff-tree -r $(tree-id $orig_head) $(tree-id $new_head)
- -
+	if [ "$quiet" ] ; then
+		git-diff-tree -r $(tree-id $orig_head) $(tree-id $new_head) | awk '{ print $5"\t"$6 }'
+	else
+		git-diff-tree -r $(tree-id $orig_head) $(tree-id $new_head)
+	fi
 else
 	echo "Up to date."
 	exit


Frank
- -- 
Frank Sorenson - KD7TZK
Systems Manager, Computer Science Department
Brigham Young University
frank@tuxrocks.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCvkj8aI0dwg4A47wRAuOvAKCllJCjte1ITkPCtKOfAqd8zY1fzgCgscg2
EZ5jKuLBFF+0lb5ZoOd6bHE=
=YC02
-----END PGP SIGNATURE-----

      reply	other threads:[~2005-06-26  6:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-24  6:46 [Cogito] less verbose cg-clone/cg-update? Markus Dahms
2005-06-26  6:19 ` Frank Sorenson [this message]

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=42BE48FC.40504@tuxrocks.com \
    --to=frank@tuxrocks.com \
    --cc=git@vger.kernel.org \
    --cc=mad@automagically.de \
    --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).