Thread (16 messages) flat view 16 messages, 5 authors, 2017-06-19

Re: [PATCH] wt-status.c: Modified status message shown for a parent-less branch

From: Jeff King <hidden>
Date: 2017-06-16 10:50:40

Possibly related (same subject, not in this thread)

On Fri, Jun 16, 2017 at 04:06:48PM +0530, Kaartic Sivaraam wrote:
quoted hunk ↗ jump to hunk
From what I could get from this thread, I guess the current patch
stands something like the one below. I tried building it with the below
change, it seems to be having a little issue. I'm not sure why, it
seems to be working the other way round i.e., the message "No commits
yet on the branch" message is shown in the commit template and the
message "Initial commit" is shown when `git status` is invoked.

Also, let me know if any other change is required.
diff --git a/builtin/commit.c b/builtin/commit.c
index 1d805f5da..3ed8e40bc 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -1364,6 +1364,7 @@ int cmd_status(int argc, const char **argv, const
char *prefix)
                usage_with_options(builtin_status_usage,
builtin_status_options);
 
        status_init_config(&s, git_status_config);
+       s.commit_template = 1;
        argc = parse_options(argc, argv, prefix,
                             builtin_status_options,
                             builtin_status_usage, 0);
Wouldn't you want this in cmd_commit(), not cmd_status()?

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help