Re: [PATCH] fmt-merge-msg: detached HEAD

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] fmt-merge-msg: detached HEAD

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:51

"Santi Béjar" [off-list ref] writes:
quoted
quoted
diff --git a/builtin-fmt-merge-msg.c b/builtin-fmt-merge-msg.c
index 87d3d63..8cef425 100644
--- a/builtin-fmt-merge-msg.c
+++ b/builtin-fmt-merge-msg.c
@@ -331,7 +331,8 @@ int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix)
                      printf(" of %s", srcs.list[i]);
      }

-     if (!strcmp("master", current_branch))
+     if (!strcmp("master", current_branch) ||
+         !strcmp("HEAD", current_branch))
              putchar('\n');
      else
              printf(" into %s\n", current_branch);
Hmph.

The reason is?
For me, 'Merge ... into master' and 'Merge ... into HEAD' are equally
useful, so do not show them by default. And git always merges into
HEAD.
I was wondering if people might prefer rewording it to "into
detached HEAD".

Re: [PATCH] fmt-merge-msg: detached HEAD

From: Santi Béjar <hidden>
Date: 2016-06-15 22:42:51

On 1/26/07, Junio C Hamano [off-list ref] wrote:
"Santi Béjar" [off-list ref] writes:
quoted
quoted
quoted
diff --git a/builtin-fmt-merge-msg.c b/builtin-fmt-merge-msg.c
index 87d3d63..8cef425 100644
--- a/builtin-fmt-merge-msg.c
+++ b/builtin-fmt-merge-msg.c
@@ -331,7 +331,8 @@ int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix)
                      printf(" of %s", srcs.list[i]);
      }

-     if (!strcmp("master", current_branch))
+     if (!strcmp("master", current_branch) ||
+         !strcmp("HEAD", current_branch))
              putchar('\n');
      else
              printf(" into %s\n", current_branch);
Hmph.

The reason is?
For me, 'Merge ... into master' and 'Merge ... into HEAD' are equally
useful, so do not show them by default. And git always merges into
HEAD.
I was wondering if people might prefer rewording it to "into
detached HEAD".
I prefer my patch, but your rewording is OK also.

Santi

Re: [PATCH] fmt-merge-msg: detached HEAD

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:51

"Santi Béjar" [off-list ref] writes:
quoted
quoted
For me, 'Merge ... into master' and 'Merge ... into HEAD' are equally
useful, so do not show them by default. And git always merges into
HEAD.
I was wondering if people might prefer rewording it to "into
detached HEAD".
I prefer my patch, but your rewording is OK also.
I do not personally care either way -- the question is "is
merging while your head is detached a major deal, or is it just
one of the random insignificant merges and it does not matter
where it happened?"
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help