threads / patch / 4768

patchBeautifulise git-show output

Subject: [PATCH] Beautifulise git-show output

## tl;dr

3 messages between Jul 4, 2006 and Jul 4, 2006. Diffs are folded; open one to read it.

replies: 2people: 2as markdown or json

beber.mailing@gmail.com· Jul 4, 2006, 22:34 UTC · lore
From: Bertrand Jacquin (Beber) <beber.mailing@gmail.com>
Show changes to log-tree.c +1 −1
diff --git a/log-tree.c b/log-tree.c
index ebb49f2..55f77ad 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -164,7 +164,7 @@ int log_tree_diff_flush(struct rev_info 
 	}
 
 	if (opt->loginfo && !opt->no_commit_id)
-		show_log(opt, opt->loginfo, opt->diffopt.with_stat ? "---\n" : "\n");
+		show_log(opt, opt->loginfo, opt->diffopt.with_stat ? "\n---\n" : "\n");
 	diff_flush(&opt->diffopt);
 	return 1;
 }
-- 
1.4.1
Junio C Hamano· Jul 4, 2006, 22:51 UTC · re: beber.mailing@gmail.com · lore

Re: [PATCH] Beautifulise git-show output

Why?

A patch like this needs to be justified with a bit more explanation; the word "beautiful" is subjective.

(current)
	Change this and that file
        Signed-off-by: A U Thor <a.u.thor@example.com>
	---
         this-file |   20 +++++++----
	 that-file |    4 ++++
	 2 files changed, 20 insertions(+), 4 deletions(-)
        diff --git a/this-file b/this-file
	...
 
(yours -- and I think 1.3.0 did it like this)
	Change this and that file
        Signed-off-by: A U Thor <a.u.thor@example.com>
	---
         this-file |   20 +++++++----
	 that-file |    4 ++++
	 2 files changed, 20 insertions(+), 4 deletions(-)
        diff --git a/this-file b/this-file
	...
 
It _might_ be easier to read if it were like this, though:
 
	Change this and that file
        Signed-off-by: A U Thor <a.u.thor@example.com>
	---
         this-file |   20 +++++++----
	 that-file |    4 ++++
	 2 files changed, 20 insertions(+), 4 deletions(-)
        diff --git a/this-file b/this-file
	...

However, the screen real estate, especially in the vertical direction, is a scarce resource; I do not think the three-dash is a too weak visual separator that needs to be helped by an extra newline.

Bertrand Jacquin· Jul 4, 2006, 22:59 UTC · re: Junio C Hamano · lore

Re: [PATCH] Beautifulise git-show output

On 7/5/06, Junio C Hamano <junkio@cox.net> wrote:
> Why?
>
> A patch like this needs to be justified with a bit more
> explanation; the word "beautiful" is subjective.
Arg, git-send-email seems to made a bad job after git-format-patch, sorry.

So explanation don't go here. So here it is : Git-show actually show (for example) :

    Makefile: Create Makefile for Beamer theme
    rules are : install & uninstall (be careful on this one)
    Also, I hacked presentation oral's Makefile to check them presence or not
---
 docs/presentation_oral/Makefile        |    5 +-
 docs/presentation_oral/themes/Makefile |   91 ++++++++++++++++++++++++++++++++
 2 files changed, 95 insertions(+), 1 deletions(-)
 create mode 100644 docs/presentation_oral/themes/Makefile

I would like to have a newline after commit mesage too as there is one before diff-stat.

-- 
# Beber : beber@gna.org
# IM : beber@jabber.fr
# http://guybrush.ath.cx, irc://irc.freenode.net/#{e.fr,gentoofr}

← back to recent threads