Signed-off-by: Jeff King <peff@peff.net> --- On Wed, Apr 04, 2007 at 09:02:13AM +0300, Michael S. Tsirkin wrote:Personally I think it's just clutter, but hey, it's off by default. Of course what is the chance that you've turned on status.showauthor in your ~/.gitconfig, but you don't have your identity set up properly? :) Junio, this is somewhat tongue in cheek, but if people like it, please take it. Documentation/config.txt | 5 +++++ wt-status.c | 10 ++++++++++ 2 files changed, 15 insertions(+), 0 deletions(-) diff --git a/Documentation/config.txt b/Documentation/config.txt index cf1e040..189e703 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -537,6 +537,11 @@ showbranch.default:: The default set of branches for gitlink:git-show-branch[1]. See gitlink:git-show-branch[1]. +status.showauthor:: + If set to true, the output of git-status and the template used + for git-commit will show the author's name and email address. + Defaults to false. + tar.umask:: By default, gitlink:git-tar-tree[1] sets file and directories modes to 0666 or 0777. While this is both useful and acceptable for projects diff --git a/wt-status.c b/wt-status.c index a055990..3c3510c 100644 --- a/wt-status.c +++ b/wt-status.c @@ -8,6 +8,7 @@ #include "revision.h" #include "diffcore.h" +int wt_status_show_author = 0; int wt_status_use_color = 0; static char wt_status_colors[][COLOR_MAXLEN] = { "", /* WT_STATUS_HEADER: normal */ @@ -317,6 +318,11 @@ void wt_status_print(struct wt_status *s) "# %s%s", on_what, branch_name); } + if (wt_status_show_author) + color_printf_ln(color(WT_STATUS_HEADER), + "# author: %s", + git_author_info(0)); + if (s->is_initial) { color_printf_ln(color(WT_STATUS_HEADER), "#"); color_printf_ln(color(WT_STATUS_HEADER), "# Initial commit"); @@ -356,5 +362,9 @@ int git_status_config(const char *k, const char *v) int slot = parse_status_slot(k, 13); color_parse(v, k, wt_status_colors[slot]); } + if (!strcmp(k, "status.showauthor")) { + wt_status_show_author = 1; + return 0; + } return git_default_config(k, v); } -- 1.5.1.rc3.671.gd125-dirty - 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
| Linus Torvalds | Linux 2.6.27-rc8 |
| Andi Kleen | [PATCH x86] [2/16] Add a counter for per cpu clocksource watchdog checks and repor... |
| David Miller | Slow DOWN, please!!! |
| Greg KH | Re: [Patch v2] Make PCI extended config space (MMCONFIG) a driver opt-in |
git: | |
| Jeff King | Re: [PATCH] Color support added to git-add--interactive. |
| Yann Dirson | Re: irc usage.. |
| Peter Stahlir | Git as a filesystem |
| Junio C Hamano | Re: [PATCH 3/3] Teach "git branch" about --new-workdir |
| new_guy | Code signing in OpenBSD |
| Jason Dixon | Wasting our Freedom |
| Nick Guenther | Re: Real men don't attack straw men |
| Daniel Ouellet | identifying sparse files and get ride of them trick available? |
| Wolfgang Walter | Re: Kernel oops with 2.6.26, padlock and ipsec: probably problem with fpu state ch... |
| KOSAKI Motohiro | [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Tomasz Grobelny | [PATCH 0/5] [DCCP]: Queuing policies |
| Arjan van de Ven | Re: [GIT]: Networking |
| high memory | 8 hours ago | Linux kernel |
| semaphore access speed | 11 hours ago | Applications and Utilities |
| the kernel how to power off the machine | 12 hours ago | Linux kernel |
| Easter Eggs in windows XP | 15 hours ago | Windows |
| Shared swap partition | 16 hours ago | Linux general |
| Root password | 16 hours ago | Linux general |
| Where/when DNOTIFY is used? | 18 hours ago | Linux kernel |
| How to convert Linux Kernel built-in module into a loadable module | 20 hours ago | Linux kernel |
| Linux 2.6.24 and I/O schedulers | 21 hours ago | Linux kernel |
| USB Driver -- Interrupt Polling -- A Little Help Please | 1 day ago | Linux general |
