All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Sorenson <frank@tuxrocks.com>
To: Git Mailing List <git@vger.kernel.org>, Petr Baudis <pasky@suse.cz>
Subject: [PATCH] Add commify function to cg-Xlib
Date: Wed, 06 Jul 2005 01:00:50 -0600	[thread overview]
Message-ID: <42CB81A2.7080405@tuxrocks.com> (raw)

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

Here is a patch to add a commify function to cg-Xlib.  I'll follow 
this up with a patch that uses the new function to commify the 
number and size of objects pulled in cg-pull.

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

Add a commify function to cg-Xlib

- ---
commit de4fd646c8307777137b9a4c1b5735f9573167f6
tree 1b9d3d0db498fde457d60f6658f616a1aa6b9fe3
parent b21855b8734ca76ea08c0c17e4a204191b6e3add
author Frank Sorenson <frank@tuxrocks.com> Wed, 06 Jul 2005 00:38:16 -0600
committer Frank Sorenson <frank@tuxrocks.com> Wed, 06 Jul 2005 00:38:16 -0600

 cg-Xlib |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/cg-Xlib b/cg-Xlib
- --- a/cg-Xlib
+++ b/cg-Xlib
@@ -128,6 +128,9 @@ update_index () {
 	git-update-cache --refresh | sed 's/needs update$/locally modified/'
 }
 
+commify() {
+	echo $1 | sed ':a;s/\B[0-9]\{3\}\>/,&/;ta'
+}
 
 print_help () {
 	which "cg-$1" >/dev/null 2>&1 || exit 1


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

iD8DBQFCy4GiaI0dwg4A47wRAg+vAJ9ZCn7ptBARMY+ELyS+uQ893/aDLgCgsk8b
dhfcgflxQRURowVFP2qiRe4=
=u7ap
-----END PGP SIGNATURE-----

             reply	other threads:[~2005-07-06  7:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-06  7:00 Frank Sorenson [this message]
2005-07-06  7:04 ` [PATCH] Commify numbers in cg-pull Frank Sorenson
2005-07-06  7:59 ` [PATCH] Add commify function to cg-Xlib Petr Baudis
2005-07-06 17:57   ` Frank Sorenson

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=42CB81A2.7080405@tuxrocks.com \
    --to=frank@tuxrocks.com \
    --cc=git@vger.kernel.org \
    --cc=pasky@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.