All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cg-log: add --no-merges option to be passed to git-rev-list
@ 2005-11-10 20:46 Frank Sorenson
  2005-11-10 21:03 ` [PATCH] cg-log: ignore merges by default, and add --show-merges option Frank Sorenson
  0 siblings, 1 reply; 2+ messages in thread
From: Frank Sorenson @ 2005-11-10 20:46 UTC (permalink / raw)
  To: Petr Baudis, Git Mailing List

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

This patch allows cg-log to ignore merges.

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

 cg-log |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/cg-log b/cg-log
index 7d955e3..2cebf04 100755
- --- a/cg-log
+++ b/cg-log
@@ -58,6 +58,9 @@
 #	by their author. This is also known as a "shortlog", suitable
 #	e.g. for contribution summaries of announcements.
 #
+# --no-merges::
+#	Don't display merges in the log.
+#
 # -uUSERNAME::
 #	List only commits where author or committer contains 'USERNAME'.
 #	The search for 'USERNAME' is case-insensitive.
@@ -255,6 +258,7 @@ user=
 mergebase=
 date_from=
 date_to=
+no_merges=

 while optparse; do
 	if optparse -c; then
@@ -300,6 +304,8 @@ while optparse; do
 		summary=1
 	elif optparse --summary; then
 		shortlog=1
+	elif optparse --no-merges; then
+		no_merges="--no-merges"
 	else
 		optfail
 	fi
@@ -315,9 +321,9 @@ if [ "$mergebase" ]; then
 fi

 if [ "$shortlog" ]; then
- -	revls="git-rev-list --pretty=short $date_from $date_to"
+	revls="git-rev-list --pretty=short $no_merges $date_from $date_to"
 else
- -	revls="git-rev-list --pretty=raw $date_from $date_to"
+	revls="git-rev-list --pretty=raw $no_merges $date_from $date_to"
 fi
 revls="$revls $date_from $date_to"


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

iD8DBQFDc7GmaI0dwg4A47wRAosOAJ4k7ObTH9dc0me1SEGZFib0KsceqQCdHxX8
w7WXZzCR5dLKgyA0LV49YFU=
=6kA3
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] cg-log: ignore merges by default, and add --show-merges option
  2005-11-10 20:46 [PATCH] cg-log: add --no-merges option to be passed to git-rev-list Frank Sorenson
@ 2005-11-10 21:03 ` Frank Sorenson
  0 siblings, 0 replies; 2+ messages in thread
From: Frank Sorenson @ 2005-11-10 21:03 UTC (permalink / raw)
  To: Petr Baudis, Git Mailing List

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

This patch allows cg-log to ignore merges by default,but will display
them if requested (with "--show-merges").

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

 cg-log |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/cg-log b/cg-log
index 7d955e3..ed2278e 100755
- --- a/cg-log
+++ b/cg-log
@@ -58,6 +58,9 @@
 #	by their author. This is also known as a "shortlog", suitable
 #	e.g. for contribution summaries of announcements.
 #
+# --show-merges::
+#	Display merges in the log as well (ignored by default).
+#
 # -uUSERNAME::
 #	List only commits where author or committer contains 'USERNAME'.
 #	The search for 'USERNAME' is case-insensitive.
@@ -255,6 +258,7 @@ user=
 mergebase=
 date_from=
 date_to=
+no_merges="--no-merges"

 while optparse; do
 	if optparse -c; then
@@ -300,6 +304,8 @@ while optparse; do
 		summary=1
 	elif optparse --summary; then
 		shortlog=1
+	elif optparse --show-merges; then
+		no_merges=""
 	else
 		optfail
 	fi
@@ -315,9 +321,9 @@ if [ "$mergebase" ]; then
 fi

 if [ "$shortlog" ]; then
- -	revls="git-rev-list --pretty=short $date_from $date_to"
+	revls="git-rev-list --pretty=short $no_merges $date_from $date_to"
 else
- -	revls="git-rev-list --pretty=raw $date_from $date_to"
+	revls="git-rev-list --pretty=raw $no_merges $date_from $date_to"
 fi
 revls="$revls $date_from $date_to"



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

iD8DBQFDc7WOaI0dwg4A47wRAsPuAJ0W0s82jfxu+c/oHRPULaa5l9ITagCdEkhz
NZAE2w8SnNbHl3/8MDtFT3w=
=4cRS
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-11-10 21:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-10 20:46 [PATCH] cg-log: add --no-merges option to be passed to git-rev-list Frank Sorenson
2005-11-10 21:03 ` [PATCH] cg-log: ignore merges by default, and add --show-merges option Frank Sorenson

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.