Re: [PATCH] Builtin-commit: show on which branch a commit was added

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Junio C Hamano <gitster@...>
Cc: Pieter de Bie <pdebie@...>, Git Mailinglist <git@...>
Date: Sunday, September 21, 2008 - 6:42 am

On Sat, Sep 06, 2008 at 10:27:44PM -0700, Junio C Hamano wrote:


OK, I have lived with it for a little while, and I am still annoyed. ;)

My complaints are:

  1. It wastes more horizontal screen real estate, making it more likely
     that the line will wrap.

  2. In almost all of my projects (including git), I use the subject
     line convention of "subsystem: one line summary". So you end up
     with the visually confusing:

       Created commit abcd1234 on master: subsystem: one line summary

     which is even worse on a topic branch which is meaningful to the
     project:

       Created commit abcd1234 on widget: subwidget: one line summary

     which has literally left me scratching my head wondering why I put
     "widget" into the commit message.

Maybe it is better to simply break the line, which solves both problems.
Something like:

  Created commit abcd1234 on master:
   subsystem: do some stuff
   1 files changes, 1 insertions(+), 0 deletions(-)

Trivial patch is below.

---
diff --git a/builtin-commit.c b/builtin-commit.c
index 917f638..53dcde6 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -899,7 +899,7 @@ static char *get_commit_format_string(void)
 				strbuf_addch(&buf, *cp);
 		}
 	}
-	strbuf_addstr(&buf, ": %s");
+	strbuf_addstr(&buf, ":%n %s");
 
 	return strbuf_detach(&buf, NULL);
 }


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] Builtin-commit: show on which branch a commit wa..., Jeff King, (Sun Sep 21, 6:42 am)
[PATCH] git commit: Reformat output somewhat, Andreas Ericsson, (Tue Sep 30, 5:52 am)
[PATCH 1/2] pretty.c: add %% format specifier, Pieter de Bie, (Sun Sep 7, 7:05 pm)