{"thread":{"id":"28845","subject":"[PATCH 01/10] Split GPG interface into its own helper library","startedAt":"2011-11-05T06:01:30Z","lastAt":"2011-11-08T21:45:31Z","messageCount":32,"participants":["Junio C Hamano","Johannes Sixt","Nguyen Thai Ngoc Duy","Linus Torvalds"],"isPatch":true,"patchVersion":1,"patchTotal":10},"messages":[{"id":"178874","messageId":"1320472900-6601-1-git-send-email-gitster@pobox.com","threadId":"28845","inReplyTo":null,"subject":"[PATCH 00/10] Pulling signed tag","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-05T06:01:30Z","receivedAt":"2011-11-05T06:01:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This is my fourth iteration to solve the \"how can we allow authenticity of\nwork by contributors to be validated by the integrator and leave enough\ninformation for later audit by third parties\" topic. What is unusual is\nthat this is not a fourth re-roll of one approach re-re-re-polished, but\nthese four are all based on different design.\n\nThis round is based on Linus's \"let the integrator pull signed tag from\nthe contributor\" design.\n\nThe first patch is the same as the one at the bottom of the third\niteration which was jc/signed-commit topic. The rest are new.\n\n 1. Split GPG interface into its own helper library\n\n 2. fetch: do not store peeled tag object names in FETCH_HEAD\n 3. merge: notice local merging of tags and keep it unwrapped\n 4. fetch: allow \"git fetch $there v1.0\" to fetch a tag\n 5. tests: distinguish merges of tags and commits\n\n\"git fetch\" used to peel tags too early when storing in FETCH_HEAD (the\ninput to fmt-merge-msg), and \"git merge\" did the same when internally\npreparing the list of what are merged to feed the internal fmt-merge-msg.\n\nThe above four stops doing so, whose effect can be seen in the changes to\nthe test vector in the fifth patch.\n\n 6. refs DWIMmery: use the same rule for both \"git fetch\" and others\n\nYou can pull a tag with \"git pull $there tags/for-linus\", but this allows\nyou to say \"git pull $there for-linus\".\n\n 7. fmt-merge-msg: avoid early returns\n 8. fmt-merge-msg: package options into a structure\n 9. fmt-merge-msg: Add contents of merged tag in the merge message\n\nThe first two of this segment are small clean-ups to make the third one\npossible. When merging signed tag(s), the merge message is prepared with\nthe contents of the tag object for later independent audit at the end, and\nalso contains the output from the GPG verification process as the comment\nto help the integrator verify it.\n\n10. merge: force edit mode when merging a tag object\n\nAnd in order to _show_ that comment, we would need to show it in the\neditor before the commit happens, hence this conclusion patch.\n\n Makefile                                           |    2 +\n builtin.h                                          |    8 +-\n builtin/fetch.c                                    |    3 +-\n builtin/fmt-merge-msg.c                            |  126 +++++++++++++++----\n builtin/merge.c                                    |   28 +++-\n builtin/tag.c                                      |   76 +----------\n builtin/verify-tag.c                               |   35 +-----\n cache.h                                            |    2 +-\n gpg-interface.c                                    |  138 ++++++++++++++++++++\n gpg-interface.h                                    |   10 ++\n refs.c                                             |    7 -\n t/t4202-log.sh                                     |    4 +-\n t/t5510-fetch.sh                                   |    5 +-\n t/t5515/fetch.br-branches-default                  |    6 +-\n t/t5515/fetch.br-branches-default-merge            |    6 +-\n ...etch.br-branches-default-merge_branches-default |    6 +-\n t/t5515/fetch.br-branches-default-octopus          |    6 +-\n ...ch.br-branches-default-octopus_branches-default |    6 +-\n t/t5515/fetch.br-branches-default_branches-default |    6 +-\n t/t5515/fetch.br-branches-one                      |    6 +-\n t/t5515/fetch.br-branches-one-merge                |    6 +-\n t/t5515/fetch.br-branches-one-merge_branches-one   |    6 +-\n t/t5515/fetch.br-branches-one-octopus              |    6 +-\n t/t5515/fetch.br-branches-one-octopus_branches-one |    6 +-\n t/t5515/fetch.br-branches-one_branches-one         |    6 +-\n t/t5515/fetch.br-config-explicit                   |    6 +-\n t/t5515/fetch.br-config-explicit-merge             |    6 +-\n .../fetch.br-config-explicit-merge_config-explicit |    6 +-\n t/t5515/fetch.br-config-explicit-octopus           |    6 +-\n ...etch.br-config-explicit-octopus_config-explicit |    6 +-\n t/t5515/fetch.br-config-explicit_config-explicit   |    6 +-\n t/t5515/fetch.br-config-glob                       |    6 +-\n t/t5515/fetch.br-config-glob-merge                 |    6 +-\n t/t5515/fetch.br-config-glob-merge_config-glob     |    6 +-\n t/t5515/fetch.br-config-glob-octopus               |    6 +-\n t/t5515/fetch.br-config-glob-octopus_config-glob   |    6 +-\n t/t5515/fetch.br-config-glob_config-glob           |    6 +-\n t/t5515/fetch.br-remote-explicit                   |    6 +-\n t/t5515/fetch.br-remote-explicit-merge             |    6 +-\n .../fetch.br-remote-explicit-merge_remote-explicit |    6 +-\n t/t5515/fetch.br-remote-explicit-octopus           |    6 +-\n ...etch.br-remote-explicit-octopus_remote-explicit |    6 +-\n t/t5515/fetch.br-remote-explicit_remote-explicit   |    6 +-\n t/t5515/fetch.br-remote-glob                       |    6 +-\n t/t5515/fetch.br-remote-glob-merge                 |    6 +-\n t/t5515/fetch.br-remote-glob-merge_remote-glob     |    6 +-\n t/t5515/fetch.br-remote-glob-octopus               |    6 +-\n t/t5515/fetch.br-remote-glob-octopus_remote-glob   |    6 +-\n t/t5515/fetch.br-remote-glob_remote-glob           |    6 +-\n t/t5515/fetch.br-unconfig                          |    6 +-\n t/t5515/fetch.br-unconfig_--tags_.._.git           |    6 +-\n ...nfig_.._.git_one_tag_tag-one_tag_tag-three-file |    6 +-\n ...fig_.._.git_tag_tag-one-tree_tag_tag-three-file |    6 +-\n ...h.br-unconfig_.._.git_tag_tag-one_tag_tag-three |    6 +-\n t/t5515/fetch.br-unconfig_branches-default         |    6 +-\n t/t5515/fetch.br-unconfig_branches-one             |    6 +-\n t/t5515/fetch.br-unconfig_config-explicit          |    6 +-\n t/t5515/fetch.br-unconfig_config-glob              |    6 +-\n t/t5515/fetch.br-unconfig_remote-explicit          |    6 +-\n t/t5515/fetch.br-unconfig_remote-glob              |    6 +-\n t/t5515/fetch.master                               |    6 +-\n t/t5515/fetch.master_--tags_.._.git                |    6 +-\n ...ster_.._.git_one_tag_tag-one_tag_tag-three-file |    6 +-\n ...ter_.._.git_tag_tag-one-tree_tag_tag-three-file |    6 +-\n .../fetch.master_.._.git_tag_tag-one_tag_tag-three |    6 +-\n t/t5515/fetch.master_branches-default              |    6 +-\n t/t5515/fetch.master_branches-one                  |    6 +-\n t/t5515/fetch.master_config-explicit               |    6 +-\n t/t5515/fetch.master_config-glob                   |    6 +-\n t/t5515/fetch.master_remote-explicit               |    6 +-\n t/t5515/fetch.master_remote-glob                   |    6 +-\n t/t7600-merge.sh                                   |    6 +-\n t/t7604-merge-custom-message.sh                    |    2 +-\n t/t7608-merge-messages.sh                          |    4 +-\n tag.c                                              |    5 +\n 75 files changed, 482 insertions(+), 327 deletions(-)\n create mode 100644 gpg-interface.c\n create mode 100644 gpg-interface.h\n\n-- \n1.7.8.rc0.108.g71b5ec\n"},{"id":"178872","messageId":"1320472900-6601-2-git-send-email-gitster@pobox.com","threadId":"28845","inReplyTo":"1320472900-6601-1-git-send-email-gitster@pobox.com","subject":"[PATCH 01/10] Split GPG interface into its own helper library","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-05T06:01:31Z","receivedAt":"2011-11-05T06:01:31Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This mostly moves existing code from builtin/tag.c (for signing)\nand builtin/verify-tag.c (for verifying) to a new gpg-interface.c\nfile to provide a more generic library interface.\n\n - sign_buffer() takes a payload strbuf, a signature strbuf, and a signing\n   key, runs \"gpg\" to produce a detached signature for the payload, and\n   appends it to the signature strbuf. The contents of a signed tag that\n   concatenates the payload and the detached signature can be produced by\n   giving the same strbuf as payload and signature strbuf.\n\n - verify_signed_buffer() takes a payload and a detached signature as\n   <ptr, len> pairs, and runs \"gpg --verify\" to see if the payload matches\n   the signature. It can optionally capture the output from GPG to allow\n   the callers to pretty-print it in a way more suitable for their\n   contexts.\n\n\"verify-tag\" (aka \"tag -v\") used to save the whole tag contents as if it\nis a detached signature, and fed gpg the payload part of the tag. It\nrelied on gpg to fail when the given tag is not signed but just is\nannotated.  The updated run_gpg_verify() function detects the lack of\ndetached signature in the input, and errors out without bothering \"gpg\".\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * Unchanged from jc/signed-commit\n\n Makefile             |    2 +\n builtin/tag.c        |   76 ++-------------------------\n builtin/verify-tag.c |   35 ++-----------\n gpg-interface.c      |  138 ++++++++++++++++++++++++++++++++++++++++++++++++++\n gpg-interface.h      |   10 ++++\n tag.c                |    5 ++\n 6 files changed, 166 insertions(+), 100 deletions(-)\n create mode 100644 gpg-interface.c\n create mode 100644 gpg-interface.h\n\ndiff --git a/Makefile b/Makefile\nindex 17404c4..e4b14af 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -528,6 +528,7 @@ LIB_H += exec_cmd.h\n LIB_H += fsck.h\n LIB_H += gettext.h\n LIB_H += git-compat-util.h\n+LIB_H += gpg-interface.h\n LIB_H += graph.h\n LIB_H += grep.h\n LIB_H += hash.h\n@@ -621,6 +622,7 @@ LIB_OBJS += entry.o\n LIB_OBJS += environment.o\n LIB_OBJS += exec_cmd.o\n LIB_OBJS += fsck.o\n+LIB_OBJS += gpg-interface.o\n LIB_OBJS += graph.o\n LIB_OBJS += grep.o\n LIB_OBJS += hash.o\ndiff --git a/builtin/tag.c b/builtin/tag.c\nindex 9b6fd95..cca1205 100644\n--- a/builtin/tag.c\n+++ b/builtin/tag.c\n@@ -14,6 +14,7 @@\n #include \"parse-options.h\"\n #include \"diff.h\"\n #include \"revision.h\"\n+#include \"gpg-interface.h\"\n \n static const char * const git_tag_usage[] = {\n \t\"git tag [-a|-s|-u <key-id>] [-f] [-m <msg>|-F <file>] <tagname> [<head>]\",\n@@ -23,8 +24,6 @@ static const char * const git_tag_usage[] = {\n \tNULL\n };\n \n-static char signingkey[1000];\n-\n struct tag_filter {\n \tconst char **patterns;\n \tint lines;\n@@ -208,60 +207,7 @@ static int verify_tag(const char *name, const char *ref,\n \n static int do_sign(struct strbuf *buffer)\n {\n-\tstruct child_process gpg;\n-\tconst char *args[4];\n-\tchar *bracket;\n-\tint len;\n-\tint i, j;\n-\n-\tif (!*signingkey) {\n-\t\tif (strlcpy(signingkey, git_committer_info(IDENT_ERROR_ON_NO_NAME),\n-\t\t\t\tsizeof(signingkey)) > sizeof(signingkey) - 1)\n-\t\t\treturn error(_(\"committer info too long.\"));\n-\t\tbracket = strchr(signingkey, '>');\n-\t\tif (bracket)\n-\t\t\tbracket[1] = '\\0';\n-\t}\n-\n-\t/* When the username signingkey is bad, program could be terminated\n-\t * because gpg exits without reading and then write gets SIGPIPE. */\n-\tsignal(SIGPIPE, SIG_IGN);\n-\n-\tmemset(&gpg, 0, sizeof(gpg));\n-\tgpg.argv = args;\n-\tgpg.in = -1;\n-\tgpg.out = -1;\n-\targs[0] = \"gpg\";\n-\targs[1] = \"-bsau\";\n-\targs[2] = signingkey;\n-\targs[3] = NULL;\n-\n-\tif (start_command(&gpg))\n-\t\treturn error(_(\"could not run gpg.\"));\n-\n-\tif (write_in_full(gpg.in, buffer->buf, buffer->len) != buffer->len) {\n-\t\tclose(gpg.in);\n-\t\tclose(gpg.out);\n-\t\tfinish_command(&gpg);\n-\t\treturn error(_(\"gpg did not accept the tag data\"));\n-\t}\n-\tclose(gpg.in);\n-\tlen = strbuf_read(buffer, gpg.out, 1024);\n-\tclose(gpg.out);\n-\n-\tif (finish_command(&gpg) || !len || len < 0)\n-\t\treturn error(_(\"gpg failed to sign the tag\"));\n-\n-\t/* Strip CR from the line endings, in case we are on Windows. */\n-\tfor (i = j = 0; i < buffer->len; i++)\n-\t\tif (buffer->buf[i] != '\\r') {\n-\t\t\tif (i != j)\n-\t\t\t\tbuffer->buf[j] = buffer->buf[i];\n-\t\t\tj++;\n-\t\t}\n-\tstrbuf_setlen(buffer, j);\n-\n-\treturn 0;\n+\treturn sign_buffer(buffer, buffer, get_signing_key());\n }\n \n static const char tag_template[] =\n@@ -270,21 +216,11 @@ static const char tag_template[] =\n \t\"# Write a tag message\\n\"\n \t\"#\\n\");\n \n-static void set_signingkey(const char *value)\n-{\n-\tif (strlcpy(signingkey, value, sizeof(signingkey)) >= sizeof(signingkey))\n-\t\tdie(_(\"signing key value too long (%.10s...)\"), value);\n-}\n-\n static int git_tag_config(const char *var, const char *value, void *cb)\n {\n-\tif (!strcmp(var, \"user.signingkey\")) {\n-\t\tif (!value)\n-\t\t\treturn config_error_nonbool(var);\n-\t\tset_signingkey(value);\n-\t\treturn 0;\n-\t}\n-\n+\tint status = git_gpg_config(var, value, cb);\n+\tif (status)\n+\t\treturn status;\n \treturn git_default_config(var, value, cb);\n }\n \n@@ -463,7 +399,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)\n \n \tif (keyid) {\n \t\tsign = 1;\n-\t\tset_signingkey(keyid);\n+\t\tset_signing_key(keyid);\n \t}\n \tif (sign)\n \t\tannotate = 1;\ndiff --git a/builtin/verify-tag.c b/builtin/verify-tag.c\nindex 3134766..28c2174 100644\n--- a/builtin/verify-tag.c\n+++ b/builtin/verify-tag.c\n@@ -11,6 +11,7 @@\n #include \"run-command.h\"\n #include <signal.h>\n #include \"parse-options.h\"\n+#include \"gpg-interface.h\"\n \n static const char * const verify_tag_usage[] = {\n \t\t\"git verify-tag [-v|--verbose] <tag>...\",\n@@ -19,42 +20,16 @@ static const char * const verify_tag_usage[] = {\n \n static int run_gpg_verify(const char *buf, unsigned long size, int verbose)\n {\n-\tstruct child_process gpg;\n-\tconst char *args_gpg[] = {\"gpg\", \"--verify\", \"FILE\", \"-\", NULL};\n-\tchar path[PATH_MAX];\n-\tsize_t len;\n-\tint fd, ret;\n+\tint len;\n \n-\tfd = git_mkstemp(path, PATH_MAX, \".git_vtag_tmpXXXXXX\");\n-\tif (fd < 0)\n-\t\treturn error(\"could not create temporary file '%s': %s\",\n-\t\t\t\t\t\tpath, strerror(errno));\n-\tif (write_in_full(fd, buf, size) < 0)\n-\t\treturn error(\"failed writing temporary file '%s': %s\",\n-\t\t\t\t\t\tpath, strerror(errno));\n-\tclose(fd);\n-\n-\t/* find the length without signature */\n \tlen = parse_signature(buf, size);\n \tif (verbose)\n \t\twrite_in_full(1, buf, len);\n \n-\tmemset(&gpg, 0, sizeof(gpg));\n-\tgpg.argv = args_gpg;\n-\tgpg.in = -1;\n-\targs_gpg[2] = path;\n-\tif (start_command(&gpg)) {\n-\t\tunlink(path);\n-\t\treturn error(\"could not run gpg.\");\n-\t}\n-\n-\twrite_in_full(gpg.in, buf, len);\n-\tclose(gpg.in);\n-\tret = finish_command(&gpg);\n+\tif (size == len)\n+\t\treturn error(\"no signature found\");\n \n-\tunlink_or_warn(path);\n-\n-\treturn ret;\n+\treturn verify_signed_buffer(buf, len, buf + len, size - len, NULL);\n }\n \n static int verify_tag(const char *name, int verbose)\ndiff --git a/gpg-interface.c b/gpg-interface.c\nnew file mode 100644\nindex 0000000..ff232c8\n--- /dev/null\n+++ b/gpg-interface.c\n@@ -0,0 +1,138 @@\n+#include \"cache.h\"\n+#include \"run-command.h\"\n+#include \"strbuf.h\"\n+#include \"gpg-interface.h\"\n+#include \"sigchain.h\"\n+\n+static char *configured_signing_key;\n+\n+void set_signing_key(const char *key)\n+{\n+\tfree(configured_signing_key);\n+\tconfigured_signing_key = xstrdup(key);\n+}\n+\n+int git_gpg_config(const char *var, const char *value, void *cb)\n+{\n+\tif (!strcmp(var, \"user.signingkey\")) {\n+\t\tif (!value)\n+\t\t\treturn config_error_nonbool(var);\n+\t\tset_signing_key(value);\n+\t}\n+\treturn 0;\n+}\n+\n+const char *get_signing_key(void)\n+{\n+\tif (configured_signing_key)\n+\t\treturn configured_signing_key;\n+\treturn git_committer_info(IDENT_ERROR_ON_NO_NAME|IDENT_NO_DATE);\n+}\n+\n+/*\n+ * Create a detached signature for the contents of \"buffer\" and append\n+ * it after \"signature\"; \"buffer\" and \"signature\" can be the same\n+ * strbuf instance, which would cause the detached signature appended\n+ * at the end.\n+ */\n+int sign_buffer(struct strbuf *buffer, struct strbuf *signature, const char *signing_key)\n+{\n+\tstruct child_process gpg;\n+\tconst char *args[4];\n+\tssize_t len;\n+\tsize_t i, j, bottom;\n+\n+\tmemset(&gpg, 0, sizeof(gpg));\n+\tgpg.argv = args;\n+\tgpg.in = -1;\n+\tgpg.out = -1;\n+\targs[0] = \"gpg\";\n+\targs[1] = \"-bsau\";\n+\targs[2] = signing_key;\n+\targs[3] = NULL;\n+\n+\tif (start_command(&gpg))\n+\t\treturn error(_(\"could not run gpg.\"));\n+\n+\t/*\n+\t * When the username signingkey is bad, program could be terminated\n+\t * because gpg exits without reading and then write gets SIGPIPE.\n+\t */\n+\tsigchain_push(SIGPIPE, SIG_IGN);\n+\n+\tif (write_in_full(gpg.in, buffer->buf, buffer->len) != buffer->len) {\n+\t\tclose(gpg.in);\n+\t\tclose(gpg.out);\n+\t\tfinish_command(&gpg);\n+\t\treturn error(_(\"gpg did not accept the data\"));\n+\t}\n+\tclose(gpg.in);\n+\n+\tbottom = signature->len;\n+\tlen = strbuf_read(signature, gpg.out, 1024);\n+\tclose(gpg.out);\n+\n+\tsigchain_pop(SIGPIPE);\n+\n+\tif (finish_command(&gpg) || !len || len < 0)\n+\t\treturn error(_(\"gpg failed to sign the data\"));\n+\n+\t/* Strip CR from the line endings, in case we are on Windows. */\n+\tfor (i = j = bottom; i < signature->len; i++)\n+\t\tif (signature->buf[i] != '\\r') {\n+\t\t\tif (i != j)\n+\t\t\t\tsignature->buf[j] = signature->buf[i];\n+\t\t\tj++;\n+\t\t}\n+\tstrbuf_setlen(signature, j);\n+\n+\treturn 0;\n+}\n+\n+/*\n+ * Run \"gpg\" to see if the payload matches the detached signature.\n+ * gpg_output_to tells where the output from \"gpg\" should go:\n+ *   < 0: /dev/null\n+ *   = 0: standard error of the calling process\n+ *   > 0: the specified file descriptor\n+ */\n+int verify_signed_buffer(const char *payload, size_t payload_size,\n+\t\t\t const char *signature, size_t signature_size,\n+\t\t\t struct strbuf *gpg_output)\n+{\n+\tstruct child_process gpg;\n+\tconst char *args_gpg[] = {\"gpg\", \"--verify\", \"FILE\", \"-\", NULL};\n+\tchar path[PATH_MAX];\n+\tint fd, ret;\n+\n+\tfd = git_mkstemp(path, PATH_MAX, \".git_vtag_tmpXXXXXX\");\n+\tif (fd < 0)\n+\t\treturn error(\"could not create temporary file '%s': %s\",\n+\t\t\t     path, strerror(errno));\n+\tif (write_in_full(fd, signature, signature_size) < 0)\n+\t\treturn error(\"failed writing detached signature to '%s': %s\",\n+\t\t\t     path, strerror(errno));\n+\tclose(fd);\n+\n+\tmemset(&gpg, 0, sizeof(gpg));\n+\tgpg.argv = args_gpg;\n+\tgpg.in = -1;\n+\tif (gpg_output)\n+\t\tgpg.err = -1;\n+\targs_gpg[2] = path;\n+\tif (start_command(&gpg)) {\n+\t\tunlink(path);\n+\t\treturn error(\"could not run gpg.\");\n+\t}\n+\n+\twrite_in_full(gpg.in, payload, payload_size);\n+\tclose(gpg.in);\n+\n+\tif (gpg_output)\n+\t\tstrbuf_read(gpg_output, gpg.err, 0);\n+\tret = finish_command(&gpg);\n+\n+\tunlink_or_warn(path);\n+\n+\treturn ret;\n+}\ndiff --git a/gpg-interface.h b/gpg-interface.h\nnew file mode 100644\nindex 0000000..b9c3608\n--- /dev/null\n+++ b/gpg-interface.h\n@@ -0,0 +1,10 @@\n+#ifndef GPG_INTERFACE_H\n+#define GPG_INTERFACE_H\n+\n+extern int sign_buffer(struct strbuf *buffer, struct strbuf *signature, const char *signing_key);\n+extern int verify_signed_buffer(const char *payload, size_t payload_size, const char *signature, size_t signature_size, struct strbuf *gpg_output);\n+extern int git_gpg_config(const char *, const char *, void *);\n+extern void set_signing_key(const char *);\n+extern const char *get_signing_key(void);\n+\n+#endif\ndiff --git a/tag.c b/tag.c\nindex 7d38cc0..3aa186d 100644\n--- a/tag.c\n+++ b/tag.c\n@@ -139,6 +139,11 @@ int parse_tag(struct tag *item)\n \treturn ret;\n }\n \n+/*\n+ * Look at a signed tag object, and return the offset where\n+ * the embedded detached signature begins, or the end of the\n+ * data when there is no such signature.\n+ */\n size_t parse_signature(const char *buf, unsigned long size)\n {\n \tchar *eol;\n-- \n1.7.8.rc0.108.g71b5ec\n"},{"id":"178878","messageId":"1320472900-6601-3-git-send-email-gitster@pobox.com","threadId":"28845","inReplyTo":"1320472900-6601-1-git-send-email-gitster@pobox.com","subject":"[PATCH 02/10] fetch: do not store peeled tag object names in FETCH_HEAD","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-05T06:01:32Z","receivedAt":"2011-11-05T06:01:32Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"From: Linus Torvalds <torvalds@linux-foundation.org>\n\nFrom: Linus Torvalds <torvalds@linux-foundation.org>\n\nWe do not want to record tags as parents of a merge when the user does\n\"git pull $there tag v1.0\" to merge tagged commit, but that is not a good\nenough excuse to peel the tag down to commit when storing in FETCH_HEAD.\nThe caller of underlying \"git fetch $there tag v1.0\" may have other uses\nof information contained in v1.0 tag in mind.\n\n[jc: the test adjustment is to update for the new expectation]\n\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin/fetch.c                                    |    3 +--\n t/t5515/fetch.br-branches-default                  |    6 +++---\n t/t5515/fetch.br-branches-default-merge            |    6 +++---\n ...etch.br-branches-default-merge_branches-default |    6 +++---\n t/t5515/fetch.br-branches-default-octopus          |    6 +++---\n ...ch.br-branches-default-octopus_branches-default |    6 +++---\n t/t5515/fetch.br-branches-default_branches-default |    6 +++---\n t/t5515/fetch.br-branches-one                      |    6 +++---\n t/t5515/fetch.br-branches-one-merge                |    6 +++---\n t/t5515/fetch.br-branches-one-merge_branches-one   |    6 +++---\n t/t5515/fetch.br-branches-one-octopus              |    6 +++---\n t/t5515/fetch.br-branches-one-octopus_branches-one |    6 +++---\n t/t5515/fetch.br-branches-one_branches-one         |    6 +++---\n t/t5515/fetch.br-config-explicit                   |    6 +++---\n t/t5515/fetch.br-config-explicit-merge             |    6 +++---\n .../fetch.br-config-explicit-merge_config-explicit |    6 +++---\n t/t5515/fetch.br-config-explicit-octopus           |    6 +++---\n ...etch.br-config-explicit-octopus_config-explicit |    6 +++---\n t/t5515/fetch.br-config-explicit_config-explicit   |    6 +++---\n t/t5515/fetch.br-config-glob                       |    6 +++---\n t/t5515/fetch.br-config-glob-merge                 |    6 +++---\n t/t5515/fetch.br-config-glob-merge_config-glob     |    6 +++---\n t/t5515/fetch.br-config-glob-octopus               |    6 +++---\n t/t5515/fetch.br-config-glob-octopus_config-glob   |    6 +++---\n t/t5515/fetch.br-config-glob_config-glob           |    6 +++---\n t/t5515/fetch.br-remote-explicit                   |    6 +++---\n t/t5515/fetch.br-remote-explicit-merge             |    6 +++---\n .../fetch.br-remote-explicit-merge_remote-explicit |    6 +++---\n t/t5515/fetch.br-remote-explicit-octopus           |    6 +++---\n ...etch.br-remote-explicit-octopus_remote-explicit |    6 +++---\n t/t5515/fetch.br-remote-explicit_remote-explicit   |    6 +++---\n t/t5515/fetch.br-remote-glob                       |    6 +++---\n t/t5515/fetch.br-remote-glob-merge                 |    6 +++---\n t/t5515/fetch.br-remote-glob-merge_remote-glob     |    6 +++---\n t/t5515/fetch.br-remote-glob-octopus               |    6 +++---\n t/t5515/fetch.br-remote-glob-octopus_remote-glob   |    6 +++---\n t/t5515/fetch.br-remote-glob_remote-glob           |    6 +++---\n t/t5515/fetch.br-unconfig                          |    6 +++---\n t/t5515/fetch.br-unconfig_--tags_.._.git           |    6 +++---\n ...nfig_.._.git_one_tag_tag-one_tag_tag-three-file |    6 +++---\n ...fig_.._.git_tag_tag-one-tree_tag_tag-three-file |    6 +++---\n ...h.br-unconfig_.._.git_tag_tag-one_tag_tag-three |    6 +++---\n t/t5515/fetch.br-unconfig_branches-default         |    6 +++---\n t/t5515/fetch.br-unconfig_branches-one             |    6 +++---\n t/t5515/fetch.br-unconfig_config-explicit          |    6 +++---\n t/t5515/fetch.br-unconfig_config-glob              |    6 +++---\n t/t5515/fetch.br-unconfig_remote-explicit          |    6 +++---\n t/t5515/fetch.br-unconfig_remote-glob              |    6 +++---\n t/t5515/fetch.master                               |    6 +++---\n t/t5515/fetch.master_--tags_.._.git                |    6 +++---\n ...ster_.._.git_one_tag_tag-one_tag_tag-three-file |    6 +++---\n ...ter_.._.git_tag_tag-one-tree_tag_tag-three-file |    6 +++---\n .../fetch.master_.._.git_tag_tag-one_tag_tag-three |    6 +++---\n t/t5515/fetch.master_branches-default              |    6 +++---\n t/t5515/fetch.master_branches-one                  |    6 +++---\n t/t5515/fetch.master_config-explicit               |    6 +++---\n t/t5515/fetch.master_config-glob                   |    6 +++---\n t/t5515/fetch.master_remote-explicit               |    6 +++---\n t/t5515/fetch.master_remote-glob                   |    6 +++---\n 59 files changed, 175 insertions(+), 176 deletions(-)\n\ndiff --git a/builtin/fetch.c b/builtin/fetch.c\nindex 1adf6c1..d061e2c 100644\n--- a/builtin/fetch.c\n+++ b/builtin/fetch.c\n@@ -436,8 +436,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,\n \t\t}\n \t\tnote[note_len] = '\\0';\n \t\tfprintf(fp, \"%s\\t%s\\t%s\",\n-\t\t\tsha1_to_hex(commit ? commit->object.sha1 :\n-\t\t\t\t    rm->old_sha1),\n+\t\t\tsha1_to_hex(rm->old_sha1),\n \t\t\trm->merge ? \"\" : \"not-for-merge\",\n \t\t\tnote);\n \t\tfor (i = 0; i < url_len; ++i)\ndiff --git a/t/t5515/fetch.br-branches-default b/t/t5515/fetch.br-branches-default\nindex 2e0414f..a1bc3d5 100644\n--- a/t/t5515/fetch.br-branches-default\n+++ b/t/t5515/fetch.br-branches-default\n@@ -1,8 +1,8 @@\n # br-branches-default\n 754b754407bf032e9a2f9d5a9ad05ca79a6b228f\t\tbranch 'master' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-branches-default-merge b/t/t5515/fetch.br-branches-default-merge\nindex ca2cc1d..e3a41ae 100644\n--- a/t/t5515/fetch.br-branches-default-merge\n+++ b/t/t5515/fetch.br-branches-default-merge\n@@ -1,9 +1,9 @@\n # br-branches-default-merge\n 754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\tbranch 'master' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-branches-default-merge_branches-default b/t/t5515/fetch.br-branches-default-merge_branches-default\nindex 7d947cd..1f60561 100644\n--- a/t/t5515/fetch.br-branches-default-merge_branches-default\n+++ b/t/t5515/fetch.br-branches-default-merge_branches-default\n@@ -1,9 +1,9 @@\n # br-branches-default-merge branches-default\n 754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\tbranch 'master' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-branches-default-octopus b/t/t5515/fetch.br-branches-default-octopus\nindex ec39c54..f31e1b3 100644\n--- a/t/t5515/fetch.br-branches-default-octopus\n+++ b/t/t5515/fetch.br-branches-default-octopus\n@@ -2,9 +2,9 @@\n 754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\tbranch 'master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\t\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-branches-default-octopus_branches-default b/t/t5515/fetch.br-branches-default-octopus_branches-default\nindex 6bf42e2..7060bd9 100644\n--- a/t/t5515/fetch.br-branches-default-octopus_branches-default\n+++ b/t/t5515/fetch.br-branches-default-octopus_branches-default\n@@ -2,9 +2,9 @@\n 754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\tbranch 'master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\t\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-branches-default_branches-default b/t/t5515/fetch.br-branches-default_branches-default\nindex 4a2bf3c..8cbd718 100644\n--- a/t/t5515/fetch.br-branches-default_branches-default\n+++ b/t/t5515/fetch.br-branches-default_branches-default\n@@ -1,8 +1,8 @@\n # br-branches-default branches-default\n 754b754407bf032e9a2f9d5a9ad05ca79a6b228f\t\tbranch 'master' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-branches-one b/t/t5515/fetch.br-branches-one\nindex 12ac8d2..c98f670 100644\n--- a/t/t5515/fetch.br-branches-one\n+++ b/t/t5515/fetch.br-branches-one\n@@ -1,8 +1,8 @@\n # br-branches-one\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-branches-one-merge b/t/t5515/fetch.br-branches-one-merge\nindex b4b3b35..aa1c8a9 100644\n--- a/t/t5515/fetch.br-branches-one-merge\n+++ b/t/t5515/fetch.br-branches-one-merge\n@@ -1,9 +1,9 @@\n # br-branches-one-merge\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-branches-one-merge_branches-one b/t/t5515/fetch.br-branches-one-merge_branches-one\nindex 2ecef38..c93310a 100644\n--- a/t/t5515/fetch.br-branches-one-merge_branches-one\n+++ b/t/t5515/fetch.br-branches-one-merge_branches-one\n@@ -1,9 +1,9 @@\n # br-branches-one-merge branches-one\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-branches-one-octopus b/t/t5515/fetch.br-branches-one-octopus\nindex 96e3029..97c4b54 100644\n--- a/t/t5515/fetch.br-branches-one-octopus\n+++ b/t/t5515/fetch.br-branches-one-octopus\n@@ -1,9 +1,9 @@\n # br-branches-one-octopus\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\t\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-branches-one-octopus_branches-one b/t/t5515/fetch.br-branches-one-octopus_branches-one\nindex 55e0bad..df705f7 100644\n--- a/t/t5515/fetch.br-branches-one-octopus_branches-one\n+++ b/t/t5515/fetch.br-branches-one-octopus_branches-one\n@@ -1,9 +1,9 @@\n # br-branches-one-octopus branches-one\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\t\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-branches-one_branches-one b/t/t5515/fetch.br-branches-one_branches-one\nindex 281fa09..96890e5 100644\n--- a/t/t5515/fetch.br-branches-one_branches-one\n+++ b/t/t5515/fetch.br-branches-one_branches-one\n@@ -1,8 +1,8 @@\n # br-branches-one branches-one\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-config-explicit b/t/t5515/fetch.br-config-explicit\nindex e2fa9c8..68fc927 100644\n--- a/t/t5515/fetch.br-config-explicit\n+++ b/t/t5515/fetch.br-config-explicit\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-config-explicit-merge b/t/t5515/fetch.br-config-explicit-merge\nindex ec1a723..f6475b7 100644\n--- a/t/t5515/fetch.br-config-explicit-merge\n+++ b/t/t5515/fetch.br-config-explicit-merge\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-config-explicit-merge_config-explicit b/t/t5515/fetch.br-config-explicit-merge_config-explicit\nindex 54f6891..018bdd7 100644\n--- a/t/t5515/fetch.br-config-explicit-merge_config-explicit\n+++ b/t/t5515/fetch.br-config-explicit-merge_config-explicit\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-config-explicit-octopus b/t/t5515/fetch.br-config-explicit-octopus\nindex 7011dfc..36d0270 100644\n--- a/t/t5515/fetch.br-config-explicit-octopus\n+++ b/t/t5515/fetch.br-config-explicit-octopus\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\t\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-config-explicit-octopus_config-explicit b/t/t5515/fetch.br-config-explicit-octopus_config-explicit\nindex bdad51f..6654ad0 100644\n--- a/t/t5515/fetch.br-config-explicit-octopus_config-explicit\n+++ b/t/t5515/fetch.br-config-explicit-octopus_config-explicit\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\t\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-config-explicit_config-explicit b/t/t5515/fetch.br-config-explicit_config-explicit\nindex 1b237dd..b19b016 100644\n--- a/t/t5515/fetch.br-config-explicit_config-explicit\n+++ b/t/t5515/fetch.br-config-explicit_config-explicit\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-config-glob b/t/t5515/fetch.br-config-glob\nindex e75ec2f..946d70c 100644\n--- a/t/t5515/fetch.br-config-glob\n+++ b/t/t5515/fetch.br-config-glob\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-config-glob-merge b/t/t5515/fetch.br-config-glob-merge\nindex ce8f739..8bb5e8b 100644\n--- a/t/t5515/fetch.br-config-glob-merge\n+++ b/t/t5515/fetch.br-config-glob-merge\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-config-glob-merge_config-glob b/t/t5515/fetch.br-config-glob-merge_config-glob\nindex 5817bed..113c08d 100644\n--- a/t/t5515/fetch.br-config-glob-merge_config-glob\n+++ b/t/t5515/fetch.br-config-glob-merge_config-glob\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-config-glob-octopus b/t/t5515/fetch.br-config-glob-octopus\nindex 938e532..9bbd537 100644\n--- a/t/t5515/fetch.br-config-glob-octopus\n+++ b/t/t5515/fetch.br-config-glob-octopus\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\t\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-config-glob-octopus_config-glob b/t/t5515/fetch.br-config-glob-octopus_config-glob\nindex c9225bf..4e51043 100644\n--- a/t/t5515/fetch.br-config-glob-octopus_config-glob\n+++ b/t/t5515/fetch.br-config-glob-octopus_config-glob\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\t\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-config-glob_config-glob b/t/t5515/fetch.br-config-glob_config-glob\nindex a6c20f9..19daf0c 100644\n--- a/t/t5515/fetch.br-config-glob_config-glob\n+++ b/t/t5515/fetch.br-config-glob_config-glob\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-remote-explicit b/t/t5515/fetch.br-remote-explicit\nindex 83534d2..ab44bc5 100644\n--- a/t/t5515/fetch.br-remote-explicit\n+++ b/t/t5515/fetch.br-remote-explicit\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-remote-explicit-merge b/t/t5515/fetch.br-remote-explicit-merge\nindex a9064dd..7421b2c 100644\n--- a/t/t5515/fetch.br-remote-explicit-merge\n+++ b/t/t5515/fetch.br-remote-explicit-merge\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-remote-explicit-merge_remote-explicit b/t/t5515/fetch.br-remote-explicit-merge_remote-explicit\nindex 732a37e..b6975d3 100644\n--- a/t/t5515/fetch.br-remote-explicit-merge_remote-explicit\n+++ b/t/t5515/fetch.br-remote-explicit-merge_remote-explicit\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-remote-explicit-octopus b/t/t5515/fetch.br-remote-explicit-octopus\nindex ecf020d..7681281 100644\n--- a/t/t5515/fetch.br-remote-explicit-octopus\n+++ b/t/t5515/fetch.br-remote-explicit-octopus\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\t\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-remote-explicit-octopus_remote-explicit b/t/t5515/fetch.br-remote-explicit-octopus_remote-explicit\nindex af77531..4c896cf 100644\n--- a/t/t5515/fetch.br-remote-explicit-octopus_remote-explicit\n+++ b/t/t5515/fetch.br-remote-explicit-octopus_remote-explicit\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\t\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-remote-explicit_remote-explicit b/t/t5515/fetch.br-remote-explicit_remote-explicit\nindex 51fae56..01e014e 100644\n--- a/t/t5515/fetch.br-remote-explicit_remote-explicit\n+++ b/t/t5515/fetch.br-remote-explicit_remote-explicit\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-remote-glob b/t/t5515/fetch.br-remote-glob\nindex 94e6ad3..09bfcee 100644\n--- a/t/t5515/fetch.br-remote-glob\n+++ b/t/t5515/fetch.br-remote-glob\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-remote-glob-merge b/t/t5515/fetch.br-remote-glob-merge\nindex 09362e2..4b62b01 100644\n--- a/t/t5515/fetch.br-remote-glob-merge\n+++ b/t/t5515/fetch.br-remote-glob-merge\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-remote-glob-merge_remote-glob b/t/t5515/fetch.br-remote-glob-merge_remote-glob\nindex e2eabec..7478f1f 100644\n--- a/t/t5515/fetch.br-remote-glob-merge_remote-glob\n+++ b/t/t5515/fetch.br-remote-glob-merge_remote-glob\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-remote-glob-octopus b/t/t5515/fetch.br-remote-glob-octopus\nindex b08e046..2543420 100644\n--- a/t/t5515/fetch.br-remote-glob-octopus\n+++ b/t/t5515/fetch.br-remote-glob-octopus\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\t\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-remote-glob-octopus_remote-glob b/t/t5515/fetch.br-remote-glob-octopus_remote-glob\nindex d4d547c..5ffde9c 100644\n--- a/t/t5515/fetch.br-remote-glob-octopus_remote-glob\n+++ b/t/t5515/fetch.br-remote-glob-octopus_remote-glob\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\t\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-remote-glob_remote-glob b/t/t5515/fetch.br-remote-glob_remote-glob\nindex 646dbc8..20ba5cb 100644\n--- a/t/t5515/fetch.br-remote-glob_remote-glob\n+++ b/t/t5515/fetch.br-remote-glob_remote-glob\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-unconfig b/t/t5515/fetch.br-unconfig\nindex 65ce6d9..887ccfc 100644\n--- a/t/t5515/fetch.br-unconfig\n+++ b/t/t5515/fetch.br-unconfig\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-unconfig_--tags_.._.git b/t/t5515/fetch.br-unconfig_--tags_.._.git\nindex 8258c80..1669cc4 100644\n--- a/t/t5515/fetch.br-unconfig_--tags_.._.git\n+++ b/t/t5515/fetch.br-unconfig_--tags_.._.git\n@@ -1,7 +1,7 @@\n # br-unconfig --tags ../.git\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-unconfig_.._.git_one_tag_tag-one_tag_tag-three-file b/t/t5515/fetch.br-unconfig_.._.git_one_tag_tag-one_tag_tag-three-file\nindex f02bab2..7411536 100644\n--- a/t/t5515/fetch.br-unconfig_.._.git_one_tag_tag-one_tag_tag-three-file\n+++ b/t/t5515/fetch.br-unconfig_.._.git_one_tag_tag-one_tag_tag-three-file\n@@ -2,7 +2,7 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\ttag 'tag-one' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-unconfig_.._.git_tag_tag-one-tree_tag_tag-three-file b/t/t5515/fetch.br-unconfig_.._.git_tag_tag-one-tree_tag_tag-three-file\nindex 85de411..7726983 100644\n--- a/t/t5515/fetch.br-unconfig_.._.git_tag_tag-one-tree_tag_tag-three-file\n+++ b/t/t5515/fetch.br-unconfig_.._.git_tag_tag-one-tree_tag_tag-three-file\n@@ -1,7 +1,7 @@\n # br-unconfig ../.git tag tag-one-tree tag tag-three-file\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-unconfig_.._.git_tag_tag-one_tag_tag-three b/t/t5515/fetch.br-unconfig_.._.git_tag_tag-one_tag_tag-three\nindex 0da2337..7b3750c 100644\n--- a/t/t5515/fetch.br-unconfig_.._.git_tag_tag-one_tag_tag-three\n+++ b/t/t5515/fetch.br-unconfig_.._.git_tag_tag-one_tag_tag-three\n@@ -1,7 +1,7 @@\n # br-unconfig ../.git tag tag-one tag tag-three\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\ttag 'tag-one' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\ttag 'tag-three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\t\ttag 'tag-three' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-unconfig_branches-default b/t/t5515/fetch.br-unconfig_branches-default\nindex fc7041e..da30e3c 100644\n--- a/t/t5515/fetch.br-unconfig_branches-default\n+++ b/t/t5515/fetch.br-unconfig_branches-default\n@@ -1,8 +1,8 @@\n # br-unconfig branches-default\n 754b754407bf032e9a2f9d5a9ad05ca79a6b228f\t\tbranch 'master' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-unconfig_branches-one b/t/t5515/fetch.br-unconfig_branches-one\nindex e94cde7..e461431 100644\n--- a/t/t5515/fetch.br-unconfig_branches-one\n+++ b/t/t5515/fetch.br-unconfig_branches-one\n@@ -1,8 +1,8 @@\n # br-unconfig branches-one\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-unconfig_config-explicit b/t/t5515/fetch.br-unconfig_config-explicit\nindex 01a283e..ed323c9 100644\n--- a/t/t5515/fetch.br-unconfig_config-explicit\n+++ b/t/t5515/fetch.br-unconfig_config-explicit\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-unconfig_config-glob b/t/t5515/fetch.br-unconfig_config-glob\nindex 3a556c5..2372ed0 100644\n--- a/t/t5515/fetch.br-unconfig_config-glob\n+++ b/t/t5515/fetch.br-unconfig_config-glob\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-unconfig_remote-explicit b/t/t5515/fetch.br-unconfig_remote-explicit\nindex db216df..6318dd1 100644\n--- a/t/t5515/fetch.br-unconfig_remote-explicit\n+++ b/t/t5515/fetch.br-unconfig_remote-explicit\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-unconfig_remote-glob b/t/t5515/fetch.br-unconfig_remote-glob\nindex aee65c2..1d9afad 100644\n--- a/t/t5515/fetch.br-unconfig_remote-glob\n+++ b/t/t5515/fetch.br-unconfig_remote-glob\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.master b/t/t5515/fetch.master\nindex 950fd07..9b29d67 100644\n--- a/t/t5515/fetch.master\n+++ b/t/t5515/fetch.master\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.master_--tags_.._.git b/t/t5515/fetch.master_--tags_.._.git\nindex 0e59950..8a74935 100644\n--- a/t/t5515/fetch.master_--tags_.._.git\n+++ b/t/t5515/fetch.master_--tags_.._.git\n@@ -1,7 +1,7 @@\n # master --tags ../.git\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.master_.._.git_one_tag_tag-one_tag_tag-three-file b/t/t5515/fetch.master_.._.git_one_tag_tag-one_tag_tag-three-file\nindex 8286852..0672d12 100644\n--- a/t/t5515/fetch.master_.._.git_one_tag_tag-one_tag_tag-three-file\n+++ b/t/t5515/fetch.master_.._.git_one_tag_tag-one_tag_tag-three-file\n@@ -2,7 +2,7 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\ttag 'tag-one' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.master_.._.git_tag_tag-one-tree_tag_tag-three-file b/t/t5515/fetch.master_.._.git_tag_tag-one-tree_tag_tag-three-file\nindex 2e133ef..0fd737c 100644\n--- a/t/t5515/fetch.master_.._.git_tag_tag-one-tree_tag_tag-three-file\n+++ b/t/t5515/fetch.master_.._.git_tag_tag-one-tree_tag_tag-three-file\n@@ -1,7 +1,7 @@\n # master ../.git tag tag-one-tree tag tag-three-file\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.master_.._.git_tag_tag-one_tag_tag-three b/t/t5515/fetch.master_.._.git_tag_tag-one_tag_tag-three\nindex 92b18b4..e488986 100644\n--- a/t/t5515/fetch.master_.._.git_tag_tag-one_tag_tag-three\n+++ b/t/t5515/fetch.master_.._.git_tag_tag-one_tag_tag-three\n@@ -1,7 +1,7 @@\n # master ../.git tag tag-one tag tag-three\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\ttag 'tag-one' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\ttag 'tag-three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\t\ttag 'tag-three' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.master_branches-default b/t/t5515/fetch.master_branches-default\nindex 603d6d2..2eedd3b 100644\n--- a/t/t5515/fetch.master_branches-default\n+++ b/t/t5515/fetch.master_branches-default\n@@ -1,8 +1,8 @@\n # master branches-default\n 754b754407bf032e9a2f9d5a9ad05ca79a6b228f\t\tbranch 'master' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.master_branches-one b/t/t5515/fetch.master_branches-one\nindex fe9bb0b..901ce21 100644\n--- a/t/t5515/fetch.master_branches-one\n+++ b/t/t5515/fetch.master_branches-one\n@@ -1,8 +1,8 @@\n # master branches-one\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.master_config-explicit b/t/t5515/fetch.master_config-explicit\nindex 4be97c7..251c826 100644\n--- a/t/t5515/fetch.master_config-explicit\n+++ b/t/t5515/fetch.master_config-explicit\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.master_config-glob b/t/t5515/fetch.master_config-glob\nindex cb0726f..27c158e 100644\n--- a/t/t5515/fetch.master_config-glob\n+++ b/t/t5515/fetch.master_config-glob\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.master_remote-explicit b/t/t5515/fetch.master_remote-explicit\nindex 44a1ca8..b3cfe6b 100644\n--- a/t/t5515/fetch.master_remote-explicit\n+++ b/t/t5515/fetch.master_remote-explicit\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.master_remote-glob b/t/t5515/fetch.master_remote-glob\nindex 724e8db..118befd 100644\n--- a/t/t5515/fetch.master_remote-glob\n+++ b/t/t5515/fetch.master_remote-glob\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\n-- \n1.7.8.rc0.108.g71b5ec\n"},{"id":"178875","messageId":"1320472900-6601-4-git-send-email-gitster@pobox.com","threadId":"28845","inReplyTo":"1320472900-6601-1-git-send-email-gitster@pobox.com","subject":"[PATCH 03/10] merge: notice local merging of tags and keep it unwrapped","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-05T06:01:33Z","receivedAt":"2011-11-05T06:01:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Signed-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * I notice that Peff came up with the same patch independently.\n\n builtin/merge.c |    5 +++++\n 1 files changed, 5 insertions(+), 0 deletions(-)\n\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex dffd5ec..6a44b6d 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -441,6 +441,11 @@ static void merge_name(const char *remote, struct strbuf *msg)\n \t\t\t\t    sha1_to_hex(branch_head), remote);\n \t\t\tgoto cleanup;\n \t\t}\n+\t\tif (!prefixcmp(found_ref, \"refs/tags/\")) {\n+\t\t\tstrbuf_addf(msg, \"%s\\t\\ttag '%s' of .\\n\",\n+\t\t\t\t    sha1_to_hex(branch_head), remote);\n+\t\t\tgoto cleanup;\n+\t\t}\n \t\tif (!prefixcmp(found_ref, \"refs/remotes/\")) {\n \t\t\tstrbuf_addf(msg, \"%s\\t\\tremote-tracking branch '%s' of .\\n\",\n \t\t\t\t    sha1_to_hex(branch_head), remote);\n-- \n1.7.8.rc0.108.g71b5ec\n"},{"id":"178877","messageId":"1320472900-6601-5-git-send-email-gitster@pobox.com","threadId":"28845","inReplyTo":"1320472900-6601-1-git-send-email-gitster@pobox.com","subject":"[PATCH 04/10] fetch: allow \"git fetch $there v1.0\" to fetch a tag","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-05T06:01:34Z","receivedAt":"2011-11-05T06:01:34Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"You can already do so with \"git fetch $there tags/v1.0\" but if it is not\nambiguous there is no reason to force users to type more.\n\nAcked-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n refs.c |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/refs.c b/refs.c\nindex cab4394..ff20eeb 100644\n--- a/refs.c\n+++ b/refs.c\n@@ -998,6 +998,7 @@ const char *ref_rev_parse_rules[] = {\n const char *ref_fetch_rules[] = {\n \t\"%.*s\",\n \t\"refs/%.*s\",\n+\t\"refs/tags/%.*s\",\n \t\"refs/heads/%.*s\",\n \tNULL\n };\n-- \n1.7.8.rc0.108.g71b5ec\n"},{"id":"178879","messageId":"1320472900-6601-6-git-send-email-gitster@pobox.com","threadId":"28845","inReplyTo":"1320472900-6601-1-git-send-email-gitster@pobox.com","subject":"[PATCH 05/10] tests: distinguish merges of tags and commits","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-05T06:01:35Z","receivedAt":"2011-11-05T06:01:35Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Recent merge can distinguish merging of local tags from commits,\nso the tests need to be adjusted to the updated behaviour.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n * Strictly speaking, these should probably be part of the earlier two\n   patches, but I am not motivated enough to do that to clutter them.\n\n t/t4202-log.sh                  |    4 ++--\n t/t7600-merge.sh                |    6 +++---\n t/t7604-merge-custom-message.sh |    2 +-\n t/t7608-merge-messages.sh       |    4 ++--\n 4 files changed, 8 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t4202-log.sh b/t/t4202-log.sh\nindex 983e34b..222f755 100755\n--- a/t/t4202-log.sh\n+++ b/t/t4202-log.sh\n@@ -346,11 +346,11 @@ test_expect_success 'set up more tangled history' '\n '\n \n cat > expect <<\\EOF\n-*   Merge commit 'reach'\n+*   Merge tag 'reach'\n |\\\n | \\\n |  \\\n-*-. \\   Merge commit 'octopus-a'; commit 'octopus-b'\n+*-. \\   Merge tags 'octopus-a' and 'octopus-b'\n |\\ \\ \\\n * | | | seventh\n | | * | octopus-b\ndiff --git a/t/t7600-merge.sh b/t/t7600-merge.sh\nindex 3008e4e..b91d022 100755\n--- a/t/t7600-merge.sh\n+++ b/t/t7600-merge.sh\n@@ -38,8 +38,8 @@ printf '%s\\n' '1 X' 2 3 4 '5 X' 6 7 8 '9 X' >result.1-5-9\n >empty\n \n create_merge_msgs () {\n-\techo \"Merge commit 'c2'\" >msg.1-5 &&\n-\techo \"Merge commit 'c2'; commit 'c3'\" >msg.1-5-9 &&\n+\techo \"Merge tag 'c2'\" >msg.1-5 &&\n+\techo \"Merge tags 'c2' and 'c3'\" >msg.1-5-9 &&\n \t{\n \t\techo \"Squashed commit of the following:\" &&\n \t\techo &&\n@@ -57,7 +57,7 @@ create_merge_msgs () {\n \t} >squash.1-5-9 &&\n \techo >msg.nolog &&\n \t{\n-\t\techo \"* commit 'c3':\" &&\n+\t\techo \"* tag 'c3':\" &&\n \t\techo \"  commit 3\" &&\n \t\techo\n \t} >msg.log\ndiff --git a/t/t7604-merge-custom-message.sh b/t/t7604-merge-custom-message.sh\nindex 9114785..89619cf 100755\n--- a/t/t7604-merge-custom-message.sh\n+++ b/t/t7604-merge-custom-message.sh\n@@ -11,7 +11,7 @@ create_merge_msgs() {\n \n \tcp exp.subject exp.log &&\n \techo >>exp.log \"\" &&\n-\techo >>exp.log \"* commit 'c2':\" &&\n+\techo >>exp.log \"* tag 'c2':\" &&\n \techo >>exp.log \"  c2\"\n }\n \ndiff --git a/t/t7608-merge-messages.sh b/t/t7608-merge-messages.sh\nindex 9225fa6..8e7e0a5 100755\n--- a/t/t7608-merge-messages.sh\n+++ b/t/t7608-merge-messages.sh\n@@ -35,7 +35,7 @@ test_expect_success 'merge tag' '\n \tgit checkout master &&\n \ttest_commit master-3 &&\n \tgit merge tag-1 &&\n-\tcheck_oneline \"Merge commit Qtag-1Q\"\n+\tcheck_oneline \"Merge tag Qtag-1Q\"\n '\n \n test_expect_success 'ambiguous tag' '\n@@ -44,7 +44,7 @@ test_expect_success 'ambiguous tag' '\n \tgit checkout master &&\n \ttest_commit master-4 &&\n \tgit merge ambiguous &&\n-\tcheck_oneline \"Merge commit QambiguousQ\"\n+\tcheck_oneline \"Merge tag QambiguousQ\"\n '\n \n test_expect_success 'remote-tracking branch' '\n-- \n1.7.8.rc0.108.g71b5ec\n"},{"id":"178882","messageId":"1320472900-6601-7-git-send-email-gitster@pobox.com","threadId":"28845","inReplyTo":"1320472900-6601-1-git-send-email-gitster@pobox.com","subject":"[PATCH 06/10] refs DWIMmery: use the same rule for both \"git fetch\" and others","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-05T06:01:36Z","receivedAt":"2011-11-05T06:01:36Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"git log frotz\" can DWIM to \"refs/remotes/frotz/HEAD\", but in the remote\naccess context, \"git fetch frotz\" to fetch what the other side happened to\nhave fetched from what it calls 'frotz' (which may not have any relation\nto what we consider is 'frotz') the last time would not make much sense,\nso the fetch rules table did not include \"refs/remotes/%.*s/HEAD\".\n\nWhen the user really wants to, \"git fetch $there remotes/frotz/HEAD\" would\nlet her do so anyway, so this is not about safety or security; it merely\nis about confusion avoidance and discouraging meaningless usage.\n\nSpecifically, it is _not_ about ambiguity avoidance. A name that would\nbecome ambiguous if we use the same rules table for both fetch and local\nrev-parse would be ambiguous locally at the remote side.\n\nSo for the same reason as we added rule to allow \"git fetch $there v1.0\"\ninstead of \"git fetch $there tags/v1.0\" in the previous commit, here is a\nbit longer rope for the users, which incidentally simplifies our code.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * This is a stronger version of [4/10]\n\n cache.h          |    2 +-\n refs.c           |    8 --------\n t/t5510-fetch.sh |    5 ++---\n 3 files changed, 3 insertions(+), 12 deletions(-)\n\ndiff --git a/cache.h b/cache.h\nindex be07ec7..26322dd 100644\n--- a/cache.h\n+++ b/cache.h\n@@ -873,7 +873,7 @@ extern int get_sha1_mb(const char *str, unsigned char *sha1);\n \n extern int refname_match(const char *abbrev_name, const char *full_name, const char **rules);\n extern const char *ref_rev_parse_rules[];\n-extern const char *ref_fetch_rules[];\n+#define ref_fetch_rules ref_rev_parse_rules\n \n extern int create_symref(const char *ref, const char *refs_heads_master, const char *logmsg);\n extern int validate_headref(const char *ref);\ndiff --git a/refs.c b/refs.c\nindex ff20eeb..026c7ea 100644\n--- a/refs.c\n+++ b/refs.c\n@@ -995,14 +995,6 @@ const char *ref_rev_parse_rules[] = {\n \tNULL\n };\n \n-const char *ref_fetch_rules[] = {\n-\t\"%.*s\",\n-\t\"refs/%.*s\",\n-\t\"refs/tags/%.*s\",\n-\t\"refs/heads/%.*s\",\n-\tNULL\n-};\n-\n int refname_match(const char *abbrev_name, const char *full_name, const char **rules)\n {\n \tconst char **p;\ndiff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh\nindex 7e433b1..251d138 100755\n--- a/t/t5510-fetch.sh\n+++ b/t/t5510-fetch.sh\n@@ -116,7 +116,7 @@ test_expect_success 'fetch must not resolve short tag name' '\n \n '\n \n-test_expect_success 'fetch must not resolve short remote name' '\n+test_expect_success 'fetch can now resolve short remote name' '\n \n \tcd \"$D\" &&\n \tgit update-ref refs/remotes/six/HEAD HEAD &&\n@@ -125,8 +125,7 @@ test_expect_success 'fetch must not resolve short remote name' '\n \tcd six &&\n \tgit init &&\n \n-\ttest_must_fail git fetch .. six:six\n-\n+\tgit fetch .. six:six\n '\n \n test_expect_success 'create bundle 1' '\n-- \n1.7.8.rc0.108.g71b5ec\n"},{"id":"178873","messageId":"1320472900-6601-8-git-send-email-gitster@pobox.com","threadId":"28845","inReplyTo":"1320472900-6601-1-git-send-email-gitster@pobox.com","subject":"[PATCH 07/10] fmt-merge-msg: avoid early returns","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-05T06:01:37Z","receivedAt":"2011-11-05T06:01:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"In various places in the codepath, the program tries to return early\nassuming there is no more work needed. That is generally untrue when\nover time new features are added.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin/fmt-merge-msg.c |   20 ++++++++++----------\n 1 files changed, 10 insertions(+), 10 deletions(-)\n\ndiff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c\nindex 7e2f225..7b492f9 100644\n--- a/builtin/fmt-merge-msg.c\n+++ b/builtin/fmt-merge-msg.c\n@@ -26,6 +26,7 @@ static int fmt_merge_msg_config(const char *key, const char *value, void *cb)\n \treturn 0;\n }\n \n+/* merge data per repository where the merged tips came from */\n struct src_data {\n \tstruct string_list branch, tag, r_branch, generic;\n \tint head_status;\n@@ -71,6 +72,11 @@ static int handle_line(char *line)\n \t\tline[len - 1] = 0;\n \tline += 42;\n \n+\t/*\n+\t * At this point, line points at the beginning of comment e.g.\n+\t * \"branch 'frotz' of git://that/repository.git\".\n+\t * Find the repository name and point it with src.\n+\t */\n \tsrc = strstr(line, \" of \");\n \tif (src) {\n \t\t*src = 0;\n@@ -283,10 +289,7 @@ static int do_fmt_merge_msg(int merge_title, struct strbuf *in,\n \t\t\tdie (\"Error in line %d: %.*s\", i, len, p);\n \t}\n \n-\tif (!srcs.nr)\n-\t\treturn 0;\n-\n-\tif (merge_title)\n+\tif (merge_title && srcs.nr)\n \t\tdo_fmt_merge_msg_title(out, current_branch);\n \n \tif (shortlog_len) {\n@@ -306,6 +309,8 @@ static int do_fmt_merge_msg(int merge_title, struct strbuf *in,\n \t\t\tshortlog(origins.items[i].string, origins.items[i].util,\n \t\t\t\t\thead, &rev, shortlog_len, out);\n \t}\n+\tif (out->len && out->buf[out->len-1] != '\\n')\n+\t\tstrbuf_addch(out, '\\n');\n \treturn 0;\n }\n \n@@ -341,12 +346,7 @@ int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix)\n \t\t\t     0);\n \tif (argc > 0)\n \t\tusage_with_options(fmt_merge_msg_usage, options);\n-\tif (message && !shortlog_len) {\n-\t\tchar nl = '\\n';\n-\t\twrite_in_full(STDOUT_FILENO, message, strlen(message));\n-\t\twrite_in_full(STDOUT_FILENO, &nl, 1);\n-\t\treturn 0;\n-\t}\n+\n \tif (shortlog_len < 0)\n \t\tdie(\"Negative --log=%d\", shortlog_len);\n \n-- \n1.7.8.rc0.108.g71b5ec\n"},{"id":"178876","messageId":"1320472900-6601-9-git-send-email-gitster@pobox.com","threadId":"28845","inReplyTo":"1320472900-6601-1-git-send-email-gitster@pobox.com","subject":"[PATCH 08/10] fmt-merge-msg: package options into a structure","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-05T06:01:38Z","receivedAt":"2011-11-05T06:01:38Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This way new features can be added more easily.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * I originally envisioned that we might need an option to trigger a new\n   behaviour in the next patch, but it turns out that it is overkill, so\n   this is not strictly necessary right now, but is kept to help future\n   changes.\n\n builtin.h               |    8 +++++++-\n builtin/fmt-merge-msg.c |   29 ++++++++++++++---------------\n builtin/merge.c         |    8 ++++++--\n 3 files changed, 27 insertions(+), 18 deletions(-)\n\ndiff --git a/builtin.h b/builtin.h\nindex 0e9da90..e94a5dc 100644\n--- a/builtin.h\n+++ b/builtin.h\n@@ -14,8 +14,14 @@ extern const char git_usage_string[];\n extern const char git_more_info_string[];\n \n extern void prune_packed_objects(int);\n+\n+struct fmt_merge_msg_opts {\n+\tunsigned add_title:1;\n+\tint shortlog_len;\n+};\n+\n extern int fmt_merge_msg(struct strbuf *in, struct strbuf *out,\n-\t\t\t int merge_title, int shortlog_len);\n+\t\t\t struct fmt_merge_msg_opts *);\n extern void commit_notes(struct notes_tree *t, const char *msg);\n \n struct notes_rewrite_cfg {\ndiff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c\nindex 7b492f9..3ff9564 100644\n--- a/builtin/fmt-merge-msg.c\n+++ b/builtin/fmt-merge-msg.c\n@@ -209,7 +209,7 @@ static void shortlog(const char *name, unsigned char *sha1,\n \tstring_list_clear(&subjects, 0);\n }\n \n-static void do_fmt_merge_msg_title(struct strbuf *out,\n+static void fmt_merge_msg_title(struct strbuf *out,\n \tconst char *current_branch) {\n \tint i = 0;\n \tchar *sep = \"\";\n@@ -262,8 +262,9 @@ static void do_fmt_merge_msg_title(struct strbuf *out,\n \t\tstrbuf_addf(out, \" into %s\\n\", current_branch);\n }\n \n-static int do_fmt_merge_msg(int merge_title, struct strbuf *in,\n-\tstruct strbuf *out, int shortlog_len) {\n+int fmt_merge_msg(struct strbuf *in, struct strbuf *out,\n+\t\t  struct fmt_merge_msg_opts *opts)\n+{\n \tint i = 0, pos = 0;\n \tunsigned char head_sha1[20];\n \tconst char *current_branch;\n@@ -289,10 +290,10 @@ static int do_fmt_merge_msg(int merge_title, struct strbuf *in,\n \t\t\tdie (\"Error in line %d: %.*s\", i, len, p);\n \t}\n \n-\tif (merge_title && srcs.nr)\n-\t\tdo_fmt_merge_msg_title(out, current_branch);\n+\tif (opts->add_title && srcs.nr)\n+\t\tfmt_merge_msg_title(out, current_branch);\n \n-\tif (shortlog_len) {\n+\tif (opts->shortlog_len) {\n \t\tstruct commit *head;\n \t\tstruct rev_info rev;\n \n@@ -307,18 +308,13 @@ static int do_fmt_merge_msg(int merge_title, struct strbuf *in,\n \n \t\tfor (i = 0; i < origins.nr; i++)\n \t\t\tshortlog(origins.items[i].string, origins.items[i].util,\n-\t\t\t\t\thead, &rev, shortlog_len, out);\n+\t\t\t\t head, &rev, opts->shortlog_len, out);\n \t}\n \tif (out->len && out->buf[out->len-1] != '\\n')\n \t\tstrbuf_addch(out, '\\n');\n \treturn 0;\n }\n \n-int fmt_merge_msg(struct strbuf *in, struct strbuf *out,\n-\t\t  int merge_title, int shortlog_len) {\n-\treturn do_fmt_merge_msg(merge_title, in, out, shortlog_len);\n-}\n-\n int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix)\n {\n \tconst char *inpath = NULL;\n@@ -340,6 +336,7 @@ int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix)\n \tFILE *in = stdin;\n \tstruct strbuf input = STRBUF_INIT, output = STRBUF_INIT;\n \tint ret;\n+\tstruct fmt_merge_msg_opts opts;\n \n \tgit_config(fmt_merge_msg_config, NULL);\n \targc = parse_options(argc, argv, prefix, options, fmt_merge_msg_usage,\n@@ -361,10 +358,12 @@ int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix)\n \n \tif (message)\n \t\tstrbuf_addstr(&output, message);\n-\tret = fmt_merge_msg(&input, &output,\n-\t\t\t    message ? 0 : 1,\n-\t\t\t    shortlog_len);\n \n+\tmemset(&opts, 0, sizeof(opts));\n+\topts.add_title = !message;\n+\topts.shortlog_len = shortlog_len;\n+\n+\tret = fmt_merge_msg(&input, &output, &opts);\n \tif (ret)\n \t\treturn ret;\n \twrite_in_full(STDOUT_FILENO, output.buf, output.len);\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex 6a44b6d..48e7f00 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -1229,8 +1229,12 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\t\tmerge_name(argv[i], &merge_names);\n \n \t\tif (!have_message || shortlog_len) {\n-\t\t\tfmt_merge_msg(&merge_names, &merge_msg, !have_message,\n-\t\t\t\t      shortlog_len);\n+\t\t\tstruct fmt_merge_msg_opts opts;\n+\t\t\tmemset(&opts, 0, sizeof(opts));\n+\t\t\topts.add_title = !have_message;\n+\t\t\topts.shortlog_len = shortlog_len;\n+\n+\t\t\tfmt_merge_msg(&merge_names, &merge_msg, &opts);\n \t\t\tif (merge_msg.len)\n \t\t\t\tstrbuf_setlen(&merge_msg, merge_msg.len - 1);\n \t\t}\n-- \n1.7.8.rc0.108.g71b5ec\n"},{"id":"178880","messageId":"1320472900-6601-10-git-send-email-gitster@pobox.com","threadId":"28845","inReplyTo":"1320472900-6601-1-git-send-email-gitster@pobox.com","subject":"[PATCH 09/10] fmt-merge-msg: Add contents of merged tag in the merge message","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-05T06:01:39Z","receivedAt":"2011-11-05T06:01:39Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"When a contributor asks the integrator to merge her history, a signed tag\ncan be a good vehicle to communicate the authenticity of the request while\nconveying other information such as the purpose of the topic.\n\nE.g. a signed tag \"for-linus\" can be created, and the integrator can run:\n\n   $ git pull git://example.com/work.git/ for-linus\n\nThis would allow the integrator to run \"git verify-tag FETCH_HEAD\" to\nvalidate the signed tag.\n\nWhile we do not necessarily want to clutter the global tag namespace of\nthe project, we would want to leave enough information in the repository\nto allow third party to later validate the resulting history.\n\nUpdate fmt-merge-msg that prepares the merge message template, and store\nthe contents of the signed tag object and the message that comes from GPG\nsignature validation at the end of it. The integrator can choose to leave\nthe contents of the tag in the resulting merge commit, or can choose to\nremove it. The GPG validation message is inserted as a comment only to\nhelp the integrator to review the validation result but otherwise will not\nbe recorded in the resulting merge commit, because later validation by\nthird parties does not need it.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * And this is the most interesting one.\n\n builtin/fmt-merge-msg.c |   79 +++++++++++++++++++++++++++++++++++++++++++++++\n 1 files changed, 79 insertions(+), 0 deletions(-)\n\ndiff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c\nindex 3ff9564..f615fa5 100644\n--- a/builtin/fmt-merge-msg.c\n+++ b/builtin/fmt-merge-msg.c\n@@ -5,6 +5,7 @@\n #include \"revision.h\"\n #include \"tag.h\"\n #include \"string-list.h\"\n+#include \"gpg-interface.h\"\n \n static const char * const fmt_merge_msg_usage[] = {\n \t\"git fmt-merge-msg [-m <message>] [--log[=<n>]|--no-log] [--file <file>]\",\n@@ -262,6 +263,80 @@ static void fmt_merge_msg_title(struct strbuf *out,\n \t\tstrbuf_addf(out, \" into %s\\n\", current_branch);\n }\n \n+static void add_lines_with_prefix(struct strbuf *out, const char *prefix,\n+\t\t\t\t  const char *buf, size_t size)\n+{\n+\twhile (size) {\n+\t\tconst char *next = memchr(buf, '\\n', size);\n+\t\tnext = next ? (next + 1) : (buf + size);\n+\t\tstrbuf_addstr(out, prefix);\n+\t\tstrbuf_add(out, buf, next - buf);\n+\t\tsize -= next - buf;\n+\t\tbuf = next;\n+\t}\n+}\n+\n+static void fmt_tag_signature(struct strbuf *tagbuf,\n+\t\t\t      struct strbuf *sig,\n+\t\t\t      const char *buf,\n+\t\t\t      unsigned long size)\n+{\n+\tadd_lines_with_prefix(tagbuf, \"tag:\", buf, size);\n+\tadd_lines_with_prefix(tagbuf, \"# \", sig->buf, sig->len);\n+\tif (tagbuf->len && tagbuf->buf[tagbuf->len-1] != '\\n')\n+\t\tstrbuf_addch(tagbuf, '\\n');\n+}\n+\n+\n+static void fmt_merge_msg_sigs(struct strbuf *out)\n+{\n+\tint i, tag_number;\n+\tstruct strbuf tagbuf = STRBUF_INIT;\n+\n+\tfor (i = tag_number = 0; i < origins.nr; i++) {\n+\t\tunsigned char *sha1 = origins.items[i].util;\n+\t\tenum object_type type;\n+\t\tunsigned long size, len;\n+\t\tchar *buf = read_sha1_file(sha1, &type, &size);\n+\t\tstruct strbuf sig = STRBUF_INIT;\n+\n+\t\tif (!buf || type != OBJ_TAG)\n+\t\t\tgoto next;\n+\t\tlen = parse_signature(buf, size);\n+\t\tif (size == len)\n+\t\t\tgoto next; /* not a signed tag */\n+\t\tif (verify_signed_buffer(buf, len, buf + len, size - len,\n+\t\t\t\t\t &sig) ||\n+\t\t    !sig.len)\n+\t\t\tgoto next;\n+\n+\t\tif (!tag_number++)\n+\t\t\tfmt_tag_signature(&tagbuf, &sig, buf, size);\n+\t\telse {\n+\t\t\tif (tag_number == 2) {\n+\t\t\t\tstatic const char first_tag[] = \"[Tag 1]\\n\";\n+\t\t\t\tstrbuf_insert(&tagbuf, 0, first_tag,\n+\t\t\t\t\t      sizeof(first_tag) - 1);\n+\t\t\t}\n+\t\t\tstrbuf_addf(&tagbuf, \"\\n[Tag %d]\\n\", tag_number);\n+\t\t\tfmt_tag_signature(&tagbuf, &sig, buf, size);\n+\t\t}\n+\t\tstrbuf_release(&sig);\n+\tnext:\n+\t\tfree(buf);\n+\t}\n+\tif (tagbuf.len) {\n+\t\tstrbuf_addch(out, '\\n');\n+\t\tif (tag_number == 1)\n+\t\t\tstrbuf_addstr(out, \"Signature in merged tag\\n\");\n+\t\telse\n+\t\t\tstrbuf_addstr(out, \"Signatures in merged tags\\n\");\n+\t\tstrbuf_addch(out, '\\n');\n+\t\tstrbuf_addbuf(out, &tagbuf);\n+\t}\n+\tstrbuf_release(&tagbuf);\n+}\n+\n int fmt_merge_msg(struct strbuf *in, struct strbuf *out,\n \t\t  struct fmt_merge_msg_opts *opts)\n {\n@@ -310,6 +385,10 @@ int fmt_merge_msg(struct strbuf *in, struct strbuf *out,\n \t\t\tshortlog(origins.items[i].string, origins.items[i].util,\n \t\t\t\t head, &rev, opts->shortlog_len, out);\n \t}\n+\n+\tif (origins.nr)\n+\t\tfmt_merge_msg_sigs(out);\n+\n \tif (out->len && out->buf[out->len-1] != '\\n')\n \t\tstrbuf_addch(out, '\\n');\n \treturn 0;\n-- \n1.7.8.rc0.108.g71b5ec\n"},{"id":"178881","messageId":"1320472900-6601-11-git-send-email-gitster@pobox.com","threadId":"28845","inReplyTo":"1320472900-6601-1-git-send-email-gitster@pobox.com","subject":"[PATCH 10/10] merge: force edit mode when merging a tag object","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-05T06:01:40Z","receivedAt":"2011-11-05T06:01:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Now that we allow pulling a tag from the remote site to validate the\nauthenticity, we should give the user the final chance to verify and\nedit the merge message.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * ... and finally.  Obviously this makes it necessary for the series to\n   be applied on 3dfbe68 (Merge branch 'js/merge-edit-option', 2011-10-19)\n   or newer.\n\n builtin/merge.c |   15 ++++++++++-----\n 1 files changed, 10 insertions(+), 5 deletions(-)\n\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex 48e7f00..6b63bbd 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -406,13 +406,15 @@ static void finish(struct commit *head_commit,\n \tstrbuf_release(&reflog_message);\n }\n \n-static struct object *want_commit(const char *name)\n+static struct object *want_commit(const char *name, enum object_type *real_type)\n {\n \tstruct object *obj;\n \tunsigned char sha1[20];\n \tif (get_sha1(name, sha1))\n \t\treturn NULL;\n \tobj = parse_object(sha1);\n+\tif (real_type)\n+\t\t*real_type = obj->type;\n \treturn peel_to_type(name, 0, obj, OBJ_COMMIT);\n }\n \n@@ -431,7 +433,7 @@ static void merge_name(const char *remote, struct strbuf *msg)\n \tremote = bname.buf;\n \n \tmemset(branch_head, 0, sizeof(branch_head));\n-\tremote_head = want_commit(remote);\n+\tremote_head = want_commit(remote, NULL);\n \tif (!remote_head)\n \t\tdie(_(\"'%s' does not point to a commit\"), remote);\n \n@@ -1204,7 +1206,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\tif (!allow_fast_forward)\n \t\t\tdie(_(\"Non-fast-forward commit does not make sense into \"\n \t\t\t    \"an empty head\"));\n-\t\tremote_head = want_commit(argv[0]);\n+\t\tremote_head = want_commit(argv[0], NULL);\n \t\tif (!remote_head)\n \t\t\tdie(_(\"%s - not something we can merge\"), argv[0]);\n \t\tread_empty(remote_head->sha1, 0);\n@@ -1253,8 +1255,9 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \tfor (i = 0; i < argc; i++) {\n \t\tstruct object *o;\n \t\tstruct commit *commit;\n+\t\tenum object_type real_type;\n \n-\t\to = want_commit(argv[i]);\n+\t\to = want_commit(argv[i], &real_type);\n \t\tif (!o)\n \t\t\tdie(_(\"%s - not something we can merge\"), argv[i]);\n \t\tcommit = lookup_commit(o->sha1);\n@@ -1264,6 +1267,8 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\tstrbuf_addf(&buf, \"GITHEAD_%s\", sha1_to_hex(o->sha1));\n \t\tsetenv(buf.buf, argv[i], 1);\n \t\tstrbuf_reset(&buf);\n+\t\tif (real_type == OBJ_TAG)\n+\t\t\toption_edit = 1;\n \t}\n \n \tif (!use_strategies) {\n@@ -1321,7 +1326,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\tif (have_message)\n \t\t\tstrbuf_addstr(&msg,\n \t\t\t\t\" (no commit created; -m option ignored)\");\n-\t\to = want_commit(sha1_to_hex(remoteheads->item->object.sha1));\n+\t\to = want_commit(sha1_to_hex(remoteheads->item->object.sha1), NULL);\n \t\tif (!o)\n \t\t\treturn 1;\n \n-- \n1.7.8.rc0.108.g71b5ec\n"},{"id":"178888","messageId":"4EB4F74D.7090004@kdbg.org","threadId":"28845","inReplyTo":"1320472900-6601-10-git-send-email-gitster@pobox.com","subject":"Re: [PATCH 09/10] fmt-merge-msg: Add contents of merged tag in the merge message","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2011-11-05T08:43:57Z","receivedAt":"2011-11-05T08:43:57Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 05.11.2011 07:01, schrieb Junio C Hamano:\n> When a contributor asks the integrator to merge her history, a signed tag\n> can be a good vehicle to communicate the authenticity of the request while\n> conveying other information such as the purpose of the topic.\n> \n> E.g. a signed tag \"for-linus\" can be created, and the integrator can run:\n> \n>    $ git pull git://example.com/work.git/ for-linus\n> \n> This would allow the integrator to run \"git verify-tag FETCH_HEAD\" to\n> validate the signed tag.\n> \n> While we do not necessarily want to clutter the global tag namespace of\n> the project, we would want to leave enough information in the repository\n> to allow third party to later validate the resulting history.\n> \n> Update fmt-merge-msg that prepares the merge message template, and store\n> the contents of the signed tag object and the message that comes from GPG\n> signature validation at the end of it. The integrator can choose to leave\n> the contents of the tag in the resulting merge commit, or can choose to\n> remove it. The GPG validation message is inserted as a comment only to\n> help the integrator to review the validation result but otherwise will not\n> be recorded in the resulting merge commit, because later validation by\n> third parties does not need it.\n\nSince the tag signature depends on the tag message, including all spelin\nerrors, the integrator must not change the text so that third parties\ncan repeat the verification. (Correct?) I assume this is the reason that\nyou put 'tag:' in front of the tag message, to discourage any changes.\n\nWhat if the tag is not signed? Does this code path trigger at all? In\nthis case, I would prefer that the discouraging 'tag:' prefix were not\npresent. The resulting text would fit more naturally in a commit message\nas a description of the commit/merge/topic. What do you think?\n\n-- Hannes\n"},{"id":"178893","messageId":"CACsJy8D8PGbJyTZ-_0quc9s=8B=DxAJyfzuj5F9tu0Oyhy+CvQ@mail.gmail.com","threadId":"28845","inReplyTo":"1320472900-6601-1-git-send-email-gitster@pobox.com","subject":"Re: [PATCH 00/10] Pulling signed tag","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2011-11-05T09:27:35Z","receivedAt":"2011-11-05T09:27:35Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Sat, Nov 5, 2011 at 1:01 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> This is my fourth iteration to solve the \"how can we allow authenticity of\n> work by contributors to be validated by the integrator and leave enough\n> information for later audit by third parties\" topic. What is unusual is\n> that this is not a fourth re-roll of one approach re-re-re-polished, but\n> these four are all based on different design.\n>\n> This round is based on Linus's \"let the integrator pull signed tag from\n> the contributor\" design.\n\nThat thread is really long and I may have missed pieces here and\nthere. My understanding is that this topic now, while supports kernel\ndevelopment model, would not address the problem gentoo has, which is\ndescribed by Robbin in the same thread [1]. Is that correct?\n\n[1] http://thread.gmane.org/gmane.linux.ide/50518/focus=1210629\n-- \nDuy\n"},{"id":"178952","messageId":"7vty6h7poe.fsf@alter.siamese.dyndns.org","threadId":"28845","inReplyTo":"4EB4F74D.7090004@kdbg.org","subject":"Re: [PATCH 09/10] fmt-merge-msg: Add contents of merged tag in the merge message","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-06T06:03:45Z","receivedAt":"2011-11-06T06:03:45Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Sixt <j6t@kdbg.org> writes:\n\n> Since the tag signature depends on the tag message, including all spelin\n> errors, the integrator must not change the text so that third parties\n> can repeat the verification. (Correct?) I assume this is the reason that\n> you put 'tag:' in front of the tag message, to discourage any changes.\n\nYes, but after reading response from Linus in the other thread, I think we\ncame up with even a better plan.\n\n> What if the tag is not signed?\n\nThanks for raising a good point. See \n\n    http://thread.gmane.org/gmane.linux.ide/50518/focus=1211568\n\nfor the revised plan.\n"},{"id":"179101","messageId":"1320721245-13223-1-git-send-email-gitster@pobox.com","threadId":"28845","inReplyTo":"1320472900-6601-1-git-send-email-gitster@pobox.com","subject":"[PATCH v2 00/12] Pulling signed/annotated tags","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-08T03:00:33Z","receivedAt":"2011-11-08T03:00:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This is a re-roll of the fourth iteration.\n\n  Split GPG interface into its own helper library\n  fetch: do not store peeled tag object names in FETCH_HEAD\n  merge: notice local merging of tags and keep it unwrapped\n  fetch: allow \"git fetch $there v1.0\" to fetch a tag\n  refs DWIMmery: use the same rule for both \"git fetch\" and others\n  fmt-merge-msg: avoid early returns\n  fmt-merge-msg: package options into a structure\n\nThe above are unchanged from v1, except for the test patch that is\ngone. It has been merged into the patch that changes the behaviour to\nrequire the adjustment to the test.\n\n  fmt-merge-msg: Add contents of merged tag in the merge message\n\nThis is updated to not show the ugly tag contents with \"tag:\" prefix in\nthe merge log editor. Instead, the body of the tag (excluding the\nsignature if it is a signed tag) is given without any prefix to help the\nintegrator write a better log message. This happens even when merging an\nannotated (not signed) tag.\n\n  merge: make usage of commit->util more extensible\n  merge: record tag objects without peeling in MERGE_HEAD\n  commit: copy merged signed tags to headers of merge commit\n\nThese three are new and are necessary to copy \"cat-file tag\" of a signed\ntag to the header of resulting merge commit.\n\n  merge: force edit mode when merging a tag object\n\nThe implementation of this one has changed, but the spirit hasn't.\n\n Makefile                                           |    2 +\n builtin.h                                          |    8 +-\n builtin/commit.c                                   |   10 +-\n builtin/fetch.c                                    |    3 +-\n builtin/fmt-merge-msg.c                            |  113 +++++++++++++----\n builtin/merge.c                                    |   93 +++++++-------\n builtin/tag.c                                      |   76 +----------\n builtin/verify-tag.c                               |   35 +-----\n cache.h                                            |    2 +-\n commit.c                                           |   65 +++++++++-\n commit.h                                           |   13 ++\n gpg-interface.c                                    |  138 ++++++++++++++++++++\n gpg-interface.h                                    |   10 ++\n merge-recursive.c                                  |   13 +-\n refs.c                                             |    7 -\n strbuf.c                                           |   15 ++\n strbuf.h                                           |    8 +\n t/t4202-log.sh                                     |    4 +-\n t/t5510-fetch.sh                                   |    5 +-\n t/t5515/fetch.br-branches-default                  |    6 +-\n t/t5515/fetch.br-branches-default-merge            |    6 +-\n ...etch.br-branches-default-merge_branches-default |    6 +-\n t/t5515/fetch.br-branches-default-octopus          |    6 +-\n ...ch.br-branches-default-octopus_branches-default |    6 +-\n t/t5515/fetch.br-branches-default_branches-default |    6 +-\n t/t5515/fetch.br-branches-one                      |    6 +-\n t/t5515/fetch.br-branches-one-merge                |    6 +-\n t/t5515/fetch.br-branches-one-merge_branches-one   |    6 +-\n t/t5515/fetch.br-branches-one-octopus              |    6 +-\n t/t5515/fetch.br-branches-one-octopus_branches-one |    6 +-\n t/t5515/fetch.br-branches-one_branches-one         |    6 +-\n t/t5515/fetch.br-config-explicit                   |    6 +-\n t/t5515/fetch.br-config-explicit-merge             |    6 +-\n .../fetch.br-config-explicit-merge_config-explicit |    6 +-\n t/t5515/fetch.br-config-explicit-octopus           |    6 +-\n ...etch.br-config-explicit-octopus_config-explicit |    6 +-\n t/t5515/fetch.br-config-explicit_config-explicit   |    6 +-\n t/t5515/fetch.br-config-glob                       |    6 +-\n t/t5515/fetch.br-config-glob-merge                 |    6 +-\n t/t5515/fetch.br-config-glob-merge_config-glob     |    6 +-\n t/t5515/fetch.br-config-glob-octopus               |    6 +-\n t/t5515/fetch.br-config-glob-octopus_config-glob   |    6 +-\n t/t5515/fetch.br-config-glob_config-glob           |    6 +-\n t/t5515/fetch.br-remote-explicit                   |    6 +-\n t/t5515/fetch.br-remote-explicit-merge             |    6 +-\n .../fetch.br-remote-explicit-merge_remote-explicit |    6 +-\n t/t5515/fetch.br-remote-explicit-octopus           |    6 +-\n ...etch.br-remote-explicit-octopus_remote-explicit |    6 +-\n t/t5515/fetch.br-remote-explicit_remote-explicit   |    6 +-\n t/t5515/fetch.br-remote-glob                       |    6 +-\n t/t5515/fetch.br-remote-glob-merge                 |    6 +-\n t/t5515/fetch.br-remote-glob-merge_remote-glob     |    6 +-\n t/t5515/fetch.br-remote-glob-octopus               |    6 +-\n t/t5515/fetch.br-remote-glob-octopus_remote-glob   |    6 +-\n t/t5515/fetch.br-remote-glob_remote-glob           |    6 +-\n t/t5515/fetch.br-unconfig                          |    6 +-\n t/t5515/fetch.br-unconfig_--tags_.._.git           |    6 +-\n ...nfig_.._.git_one_tag_tag-one_tag_tag-three-file |    6 +-\n ...fig_.._.git_tag_tag-one-tree_tag_tag-three-file |    6 +-\n ...h.br-unconfig_.._.git_tag_tag-one_tag_tag-three |    6 +-\n t/t5515/fetch.br-unconfig_branches-default         |    6 +-\n t/t5515/fetch.br-unconfig_branches-one             |    6 +-\n t/t5515/fetch.br-unconfig_config-explicit          |    6 +-\n t/t5515/fetch.br-unconfig_config-glob              |    6 +-\n t/t5515/fetch.br-unconfig_remote-explicit          |    6 +-\n t/t5515/fetch.br-unconfig_remote-glob              |    6 +-\n t/t5515/fetch.master                               |    6 +-\n t/t5515/fetch.master_--tags_.._.git                |    6 +-\n ...ster_.._.git_one_tag_tag-one_tag_tag-three-file |    6 +-\n ...ter_.._.git_tag_tag-one-tree_tag_tag-three-file |    6 +-\n .../fetch.master_.._.git_tag_tag-one_tag_tag-three |    6 +-\n t/t5515/fetch.master_branches-default              |    6 +-\n t/t5515/fetch.master_branches-one                  |    6 +-\n t/t5515/fetch.master_config-explicit               |    6 +-\n t/t5515/fetch.master_config-glob                   |    6 +-\n t/t5515/fetch.master_remote-explicit               |    6 +-\n t/t5515/fetch.master_remote-glob                   |    6 +-\n t/t7600-merge.sh                                   |   12 +-\n t/t7604-merge-custom-message.sh                    |    2 +-\n t/t7608-merge-messages.sh                          |    4 +-\n tag.c                                              |    5 +\n 81 files changed, 613 insertions(+), 378 deletions(-)\n create mode 100644 gpg-interface.c\n create mode 100644 gpg-interface.h\n\n-- \n1.7.8.rc0.128.g31aa4\n"},{"id":"179102","messageId":"1320721245-13223-2-git-send-email-gitster@pobox.com","threadId":"28845","inReplyTo":"1320721245-13223-1-git-send-email-gitster@pobox.com","subject":"[PATCH v2 01/12] Split GPG interface into its own helper library","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-08T03:00:34Z","receivedAt":"2011-11-08T03:00:34Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This mostly moves existing code from builtin/tag.c (for signing)\nand builtin/verify-tag.c (for verifying) to a new gpg-interface.c\nfile to provide a more generic library interface.\n\n - sign_buffer() takes a payload strbuf, a signature strbuf, and a signing\n   key, runs \"gpg\" to produce a detached signature for the payload, and\n   appends it to the signature strbuf. The contents of a signed tag that\n   concatenates the payload and the detached signature can be produced by\n   giving the same strbuf as payload and signature strbuf.\n\n - verify_signed_buffer() takes a payload and a detached signature as\n   <ptr, len> pairs, and runs \"gpg --verify\" to see if the payload matches\n   the signature. It can optionally capture the output from GPG to allow\n   the callers to pretty-print it in a way more suitable for their\n   contexts.\n\n\"verify-tag\" (aka \"tag -v\") used to save the whole tag contents as if it\nis a detached signature, and fed gpg the payload part of the tag. It\nrelied on gpg to fail when the given tag is not signed but just is\nannotated.  The updated run_gpg_verify() function detects the lack of\ndetached signature in the input, and errors out without bothering \"gpg\".\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Makefile             |    2 +\n builtin/tag.c        |   76 ++-------------------------\n builtin/verify-tag.c |   35 ++-----------\n gpg-interface.c      |  138 ++++++++++++++++++++++++++++++++++++++++++++++++++\n gpg-interface.h      |   10 ++++\n tag.c                |    5 ++\n 6 files changed, 166 insertions(+), 100 deletions(-)\n create mode 100644 gpg-interface.c\n create mode 100644 gpg-interface.h\n\ndiff --git a/Makefile b/Makefile\nindex 17404c4..e4b14af 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -528,6 +528,7 @@ LIB_H += exec_cmd.h\n LIB_H += fsck.h\n LIB_H += gettext.h\n LIB_H += git-compat-util.h\n+LIB_H += gpg-interface.h\n LIB_H += graph.h\n LIB_H += grep.h\n LIB_H += hash.h\n@@ -621,6 +622,7 @@ LIB_OBJS += entry.o\n LIB_OBJS += environment.o\n LIB_OBJS += exec_cmd.o\n LIB_OBJS += fsck.o\n+LIB_OBJS += gpg-interface.o\n LIB_OBJS += graph.o\n LIB_OBJS += grep.o\n LIB_OBJS += hash.o\ndiff --git a/builtin/tag.c b/builtin/tag.c\nindex 9b6fd95..cca1205 100644\n--- a/builtin/tag.c\n+++ b/builtin/tag.c\n@@ -14,6 +14,7 @@\n #include \"parse-options.h\"\n #include \"diff.h\"\n #include \"revision.h\"\n+#include \"gpg-interface.h\"\n \n static const char * const git_tag_usage[] = {\n \t\"git tag [-a|-s|-u <key-id>] [-f] [-m <msg>|-F <file>] <tagname> [<head>]\",\n@@ -23,8 +24,6 @@ static const char * const git_tag_usage[] = {\n \tNULL\n };\n \n-static char signingkey[1000];\n-\n struct tag_filter {\n \tconst char **patterns;\n \tint lines;\n@@ -208,60 +207,7 @@ static int verify_tag(const char *name, const char *ref,\n \n static int do_sign(struct strbuf *buffer)\n {\n-\tstruct child_process gpg;\n-\tconst char *args[4];\n-\tchar *bracket;\n-\tint len;\n-\tint i, j;\n-\n-\tif (!*signingkey) {\n-\t\tif (strlcpy(signingkey, git_committer_info(IDENT_ERROR_ON_NO_NAME),\n-\t\t\t\tsizeof(signingkey)) > sizeof(signingkey) - 1)\n-\t\t\treturn error(_(\"committer info too long.\"));\n-\t\tbracket = strchr(signingkey, '>');\n-\t\tif (bracket)\n-\t\t\tbracket[1] = '\\0';\n-\t}\n-\n-\t/* When the username signingkey is bad, program could be terminated\n-\t * because gpg exits without reading and then write gets SIGPIPE. */\n-\tsignal(SIGPIPE, SIG_IGN);\n-\n-\tmemset(&gpg, 0, sizeof(gpg));\n-\tgpg.argv = args;\n-\tgpg.in = -1;\n-\tgpg.out = -1;\n-\targs[0] = \"gpg\";\n-\targs[1] = \"-bsau\";\n-\targs[2] = signingkey;\n-\targs[3] = NULL;\n-\n-\tif (start_command(&gpg))\n-\t\treturn error(_(\"could not run gpg.\"));\n-\n-\tif (write_in_full(gpg.in, buffer->buf, buffer->len) != buffer->len) {\n-\t\tclose(gpg.in);\n-\t\tclose(gpg.out);\n-\t\tfinish_command(&gpg);\n-\t\treturn error(_(\"gpg did not accept the tag data\"));\n-\t}\n-\tclose(gpg.in);\n-\tlen = strbuf_read(buffer, gpg.out, 1024);\n-\tclose(gpg.out);\n-\n-\tif (finish_command(&gpg) || !len || len < 0)\n-\t\treturn error(_(\"gpg failed to sign the tag\"));\n-\n-\t/* Strip CR from the line endings, in case we are on Windows. */\n-\tfor (i = j = 0; i < buffer->len; i++)\n-\t\tif (buffer->buf[i] != '\\r') {\n-\t\t\tif (i != j)\n-\t\t\t\tbuffer->buf[j] = buffer->buf[i];\n-\t\t\tj++;\n-\t\t}\n-\tstrbuf_setlen(buffer, j);\n-\n-\treturn 0;\n+\treturn sign_buffer(buffer, buffer, get_signing_key());\n }\n \n static const char tag_template[] =\n@@ -270,21 +216,11 @@ static const char tag_template[] =\n \t\"# Write a tag message\\n\"\n \t\"#\\n\");\n \n-static void set_signingkey(const char *value)\n-{\n-\tif (strlcpy(signingkey, value, sizeof(signingkey)) >= sizeof(signingkey))\n-\t\tdie(_(\"signing key value too long (%.10s...)\"), value);\n-}\n-\n static int git_tag_config(const char *var, const char *value, void *cb)\n {\n-\tif (!strcmp(var, \"user.signingkey\")) {\n-\t\tif (!value)\n-\t\t\treturn config_error_nonbool(var);\n-\t\tset_signingkey(value);\n-\t\treturn 0;\n-\t}\n-\n+\tint status = git_gpg_config(var, value, cb);\n+\tif (status)\n+\t\treturn status;\n \treturn git_default_config(var, value, cb);\n }\n \n@@ -463,7 +399,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)\n \n \tif (keyid) {\n \t\tsign = 1;\n-\t\tset_signingkey(keyid);\n+\t\tset_signing_key(keyid);\n \t}\n \tif (sign)\n \t\tannotate = 1;\ndiff --git a/builtin/verify-tag.c b/builtin/verify-tag.c\nindex 3134766..28c2174 100644\n--- a/builtin/verify-tag.c\n+++ b/builtin/verify-tag.c\n@@ -11,6 +11,7 @@\n #include \"run-command.h\"\n #include <signal.h>\n #include \"parse-options.h\"\n+#include \"gpg-interface.h\"\n \n static const char * const verify_tag_usage[] = {\n \t\t\"git verify-tag [-v|--verbose] <tag>...\",\n@@ -19,42 +20,16 @@ static const char * const verify_tag_usage[] = {\n \n static int run_gpg_verify(const char *buf, unsigned long size, int verbose)\n {\n-\tstruct child_process gpg;\n-\tconst char *args_gpg[] = {\"gpg\", \"--verify\", \"FILE\", \"-\", NULL};\n-\tchar path[PATH_MAX];\n-\tsize_t len;\n-\tint fd, ret;\n+\tint len;\n \n-\tfd = git_mkstemp(path, PATH_MAX, \".git_vtag_tmpXXXXXX\");\n-\tif (fd < 0)\n-\t\treturn error(\"could not create temporary file '%s': %s\",\n-\t\t\t\t\t\tpath, strerror(errno));\n-\tif (write_in_full(fd, buf, size) < 0)\n-\t\treturn error(\"failed writing temporary file '%s': %s\",\n-\t\t\t\t\t\tpath, strerror(errno));\n-\tclose(fd);\n-\n-\t/* find the length without signature */\n \tlen = parse_signature(buf, size);\n \tif (verbose)\n \t\twrite_in_full(1, buf, len);\n \n-\tmemset(&gpg, 0, sizeof(gpg));\n-\tgpg.argv = args_gpg;\n-\tgpg.in = -1;\n-\targs_gpg[2] = path;\n-\tif (start_command(&gpg)) {\n-\t\tunlink(path);\n-\t\treturn error(\"could not run gpg.\");\n-\t}\n-\n-\twrite_in_full(gpg.in, buf, len);\n-\tclose(gpg.in);\n-\tret = finish_command(&gpg);\n+\tif (size == len)\n+\t\treturn error(\"no signature found\");\n \n-\tunlink_or_warn(path);\n-\n-\treturn ret;\n+\treturn verify_signed_buffer(buf, len, buf + len, size - len, NULL);\n }\n \n static int verify_tag(const char *name, int verbose)\ndiff --git a/gpg-interface.c b/gpg-interface.c\nnew file mode 100644\nindex 0000000..ff232c8\n--- /dev/null\n+++ b/gpg-interface.c\n@@ -0,0 +1,138 @@\n+#include \"cache.h\"\n+#include \"run-command.h\"\n+#include \"strbuf.h\"\n+#include \"gpg-interface.h\"\n+#include \"sigchain.h\"\n+\n+static char *configured_signing_key;\n+\n+void set_signing_key(const char *key)\n+{\n+\tfree(configured_signing_key);\n+\tconfigured_signing_key = xstrdup(key);\n+}\n+\n+int git_gpg_config(const char *var, const char *value, void *cb)\n+{\n+\tif (!strcmp(var, \"user.signingkey\")) {\n+\t\tif (!value)\n+\t\t\treturn config_error_nonbool(var);\n+\t\tset_signing_key(value);\n+\t}\n+\treturn 0;\n+}\n+\n+const char *get_signing_key(void)\n+{\n+\tif (configured_signing_key)\n+\t\treturn configured_signing_key;\n+\treturn git_committer_info(IDENT_ERROR_ON_NO_NAME|IDENT_NO_DATE);\n+}\n+\n+/*\n+ * Create a detached signature for the contents of \"buffer\" and append\n+ * it after \"signature\"; \"buffer\" and \"signature\" can be the same\n+ * strbuf instance, which would cause the detached signature appended\n+ * at the end.\n+ */\n+int sign_buffer(struct strbuf *buffer, struct strbuf *signature, const char *signing_key)\n+{\n+\tstruct child_process gpg;\n+\tconst char *args[4];\n+\tssize_t len;\n+\tsize_t i, j, bottom;\n+\n+\tmemset(&gpg, 0, sizeof(gpg));\n+\tgpg.argv = args;\n+\tgpg.in = -1;\n+\tgpg.out = -1;\n+\targs[0] = \"gpg\";\n+\targs[1] = \"-bsau\";\n+\targs[2] = signing_key;\n+\targs[3] = NULL;\n+\n+\tif (start_command(&gpg))\n+\t\treturn error(_(\"could not run gpg.\"));\n+\n+\t/*\n+\t * When the username signingkey is bad, program could be terminated\n+\t * because gpg exits without reading and then write gets SIGPIPE.\n+\t */\n+\tsigchain_push(SIGPIPE, SIG_IGN);\n+\n+\tif (write_in_full(gpg.in, buffer->buf, buffer->len) != buffer->len) {\n+\t\tclose(gpg.in);\n+\t\tclose(gpg.out);\n+\t\tfinish_command(&gpg);\n+\t\treturn error(_(\"gpg did not accept the data\"));\n+\t}\n+\tclose(gpg.in);\n+\n+\tbottom = signature->len;\n+\tlen = strbuf_read(signature, gpg.out, 1024);\n+\tclose(gpg.out);\n+\n+\tsigchain_pop(SIGPIPE);\n+\n+\tif (finish_command(&gpg) || !len || len < 0)\n+\t\treturn error(_(\"gpg failed to sign the data\"));\n+\n+\t/* Strip CR from the line endings, in case we are on Windows. */\n+\tfor (i = j = bottom; i < signature->len; i++)\n+\t\tif (signature->buf[i] != '\\r') {\n+\t\t\tif (i != j)\n+\t\t\t\tsignature->buf[j] = signature->buf[i];\n+\t\t\tj++;\n+\t\t}\n+\tstrbuf_setlen(signature, j);\n+\n+\treturn 0;\n+}\n+\n+/*\n+ * Run \"gpg\" to see if the payload matches the detached signature.\n+ * gpg_output_to tells where the output from \"gpg\" should go:\n+ *   < 0: /dev/null\n+ *   = 0: standard error of the calling process\n+ *   > 0: the specified file descriptor\n+ */\n+int verify_signed_buffer(const char *payload, size_t payload_size,\n+\t\t\t const char *signature, size_t signature_size,\n+\t\t\t struct strbuf *gpg_output)\n+{\n+\tstruct child_process gpg;\n+\tconst char *args_gpg[] = {\"gpg\", \"--verify\", \"FILE\", \"-\", NULL};\n+\tchar path[PATH_MAX];\n+\tint fd, ret;\n+\n+\tfd = git_mkstemp(path, PATH_MAX, \".git_vtag_tmpXXXXXX\");\n+\tif (fd < 0)\n+\t\treturn error(\"could not create temporary file '%s': %s\",\n+\t\t\t     path, strerror(errno));\n+\tif (write_in_full(fd, signature, signature_size) < 0)\n+\t\treturn error(\"failed writing detached signature to '%s': %s\",\n+\t\t\t     path, strerror(errno));\n+\tclose(fd);\n+\n+\tmemset(&gpg, 0, sizeof(gpg));\n+\tgpg.argv = args_gpg;\n+\tgpg.in = -1;\n+\tif (gpg_output)\n+\t\tgpg.err = -1;\n+\targs_gpg[2] = path;\n+\tif (start_command(&gpg)) {\n+\t\tunlink(path);\n+\t\treturn error(\"could not run gpg.\");\n+\t}\n+\n+\twrite_in_full(gpg.in, payload, payload_size);\n+\tclose(gpg.in);\n+\n+\tif (gpg_output)\n+\t\tstrbuf_read(gpg_output, gpg.err, 0);\n+\tret = finish_command(&gpg);\n+\n+\tunlink_or_warn(path);\n+\n+\treturn ret;\n+}\ndiff --git a/gpg-interface.h b/gpg-interface.h\nnew file mode 100644\nindex 0000000..b9c3608\n--- /dev/null\n+++ b/gpg-interface.h\n@@ -0,0 +1,10 @@\n+#ifndef GPG_INTERFACE_H\n+#define GPG_INTERFACE_H\n+\n+extern int sign_buffer(struct strbuf *buffer, struct strbuf *signature, const char *signing_key);\n+extern int verify_signed_buffer(const char *payload, size_t payload_size, const char *signature, size_t signature_size, struct strbuf *gpg_output);\n+extern int git_gpg_config(const char *, const char *, void *);\n+extern void set_signing_key(const char *);\n+extern const char *get_signing_key(void);\n+\n+#endif\ndiff --git a/tag.c b/tag.c\nindex 7d38cc0..3aa186d 100644\n--- a/tag.c\n+++ b/tag.c\n@@ -139,6 +139,11 @@ int parse_tag(struct tag *item)\n \treturn ret;\n }\n \n+/*\n+ * Look at a signed tag object, and return the offset where\n+ * the embedded detached signature begins, or the end of the\n+ * data when there is no such signature.\n+ */\n size_t parse_signature(const char *buf, unsigned long size)\n {\n \tchar *eol;\n-- \n1.7.8.rc0.128.g31aa4\n"},{"id":"179106","messageId":"1320721245-13223-3-git-send-email-gitster@pobox.com","threadId":"28845","inReplyTo":"1320721245-13223-1-git-send-email-gitster@pobox.com","subject":"[PATCH v2 02/12] fetch: do not store peeled tag object names in FETCH_HEAD","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-08T03:00:35Z","receivedAt":"2011-11-08T03:00:35Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"From: Linus Torvalds <torvalds@linux-foundation.org>\n\nWe do not want to record tags as parents of a merge when the user does\n\"git pull $there tag v1.0\" to merge tagged commit, but that is not a good\nenough excuse to peel the tag down to commit when storing in FETCH_HEAD.\nThe caller of underlying \"git fetch $there tag v1.0\" may have other uses\nof information contained in v1.0 tag in mind.\n\n[jc: the test adjustment is to update for the new expectation]\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin/fetch.c                                    |    3 +--\n t/t5515/fetch.br-branches-default                  |    6 +++---\n t/t5515/fetch.br-branches-default-merge            |    6 +++---\n ...etch.br-branches-default-merge_branches-default |    6 +++---\n t/t5515/fetch.br-branches-default-octopus          |    6 +++---\n ...ch.br-branches-default-octopus_branches-default |    6 +++---\n t/t5515/fetch.br-branches-default_branches-default |    6 +++---\n t/t5515/fetch.br-branches-one                      |    6 +++---\n t/t5515/fetch.br-branches-one-merge                |    6 +++---\n t/t5515/fetch.br-branches-one-merge_branches-one   |    6 +++---\n t/t5515/fetch.br-branches-one-octopus              |    6 +++---\n t/t5515/fetch.br-branches-one-octopus_branches-one |    6 +++---\n t/t5515/fetch.br-branches-one_branches-one         |    6 +++---\n t/t5515/fetch.br-config-explicit                   |    6 +++---\n t/t5515/fetch.br-config-explicit-merge             |    6 +++---\n .../fetch.br-config-explicit-merge_config-explicit |    6 +++---\n t/t5515/fetch.br-config-explicit-octopus           |    6 +++---\n ...etch.br-config-explicit-octopus_config-explicit |    6 +++---\n t/t5515/fetch.br-config-explicit_config-explicit   |    6 +++---\n t/t5515/fetch.br-config-glob                       |    6 +++---\n t/t5515/fetch.br-config-glob-merge                 |    6 +++---\n t/t5515/fetch.br-config-glob-merge_config-glob     |    6 +++---\n t/t5515/fetch.br-config-glob-octopus               |    6 +++---\n t/t5515/fetch.br-config-glob-octopus_config-glob   |    6 +++---\n t/t5515/fetch.br-config-glob_config-glob           |    6 +++---\n t/t5515/fetch.br-remote-explicit                   |    6 +++---\n t/t5515/fetch.br-remote-explicit-merge             |    6 +++---\n .../fetch.br-remote-explicit-merge_remote-explicit |    6 +++---\n t/t5515/fetch.br-remote-explicit-octopus           |    6 +++---\n ...etch.br-remote-explicit-octopus_remote-explicit |    6 +++---\n t/t5515/fetch.br-remote-explicit_remote-explicit   |    6 +++---\n t/t5515/fetch.br-remote-glob                       |    6 +++---\n t/t5515/fetch.br-remote-glob-merge                 |    6 +++---\n t/t5515/fetch.br-remote-glob-merge_remote-glob     |    6 +++---\n t/t5515/fetch.br-remote-glob-octopus               |    6 +++---\n t/t5515/fetch.br-remote-glob-octopus_remote-glob   |    6 +++---\n t/t5515/fetch.br-remote-glob_remote-glob           |    6 +++---\n t/t5515/fetch.br-unconfig                          |    6 +++---\n t/t5515/fetch.br-unconfig_--tags_.._.git           |    6 +++---\n ...nfig_.._.git_one_tag_tag-one_tag_tag-three-file |    6 +++---\n ...fig_.._.git_tag_tag-one-tree_tag_tag-three-file |    6 +++---\n ...h.br-unconfig_.._.git_tag_tag-one_tag_tag-three |    6 +++---\n t/t5515/fetch.br-unconfig_branches-default         |    6 +++---\n t/t5515/fetch.br-unconfig_branches-one             |    6 +++---\n t/t5515/fetch.br-unconfig_config-explicit          |    6 +++---\n t/t5515/fetch.br-unconfig_config-glob              |    6 +++---\n t/t5515/fetch.br-unconfig_remote-explicit          |    6 +++---\n t/t5515/fetch.br-unconfig_remote-glob              |    6 +++---\n t/t5515/fetch.master                               |    6 +++---\n t/t5515/fetch.master_--tags_.._.git                |    6 +++---\n ...ster_.._.git_one_tag_tag-one_tag_tag-three-file |    6 +++---\n ...ter_.._.git_tag_tag-one-tree_tag_tag-three-file |    6 +++---\n .../fetch.master_.._.git_tag_tag-one_tag_tag-three |    6 +++---\n t/t5515/fetch.master_branches-default              |    6 +++---\n t/t5515/fetch.master_branches-one                  |    6 +++---\n t/t5515/fetch.master_config-explicit               |    6 +++---\n t/t5515/fetch.master_config-glob                   |    6 +++---\n t/t5515/fetch.master_remote-explicit               |    6 +++---\n t/t5515/fetch.master_remote-glob                   |    6 +++---\n 59 files changed, 175 insertions(+), 176 deletions(-)\n\ndiff --git a/builtin/fetch.c b/builtin/fetch.c\nindex 1adf6c1..d061e2c 100644\n--- a/builtin/fetch.c\n+++ b/builtin/fetch.c\n@@ -436,8 +436,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,\n \t\t}\n \t\tnote[note_len] = '\\0';\n \t\tfprintf(fp, \"%s\\t%s\\t%s\",\n-\t\t\tsha1_to_hex(commit ? commit->object.sha1 :\n-\t\t\t\t    rm->old_sha1),\n+\t\t\tsha1_to_hex(rm->old_sha1),\n \t\t\trm->merge ? \"\" : \"not-for-merge\",\n \t\t\tnote);\n \t\tfor (i = 0; i < url_len; ++i)\ndiff --git a/t/t5515/fetch.br-branches-default b/t/t5515/fetch.br-branches-default\nindex 2e0414f..a1bc3d5 100644\n--- a/t/t5515/fetch.br-branches-default\n+++ b/t/t5515/fetch.br-branches-default\n@@ -1,8 +1,8 @@\n # br-branches-default\n 754b754407bf032e9a2f9d5a9ad05ca79a6b228f\t\tbranch 'master' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-branches-default-merge b/t/t5515/fetch.br-branches-default-merge\nindex ca2cc1d..e3a41ae 100644\n--- a/t/t5515/fetch.br-branches-default-merge\n+++ b/t/t5515/fetch.br-branches-default-merge\n@@ -1,9 +1,9 @@\n # br-branches-default-merge\n 754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\tbranch 'master' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-branches-default-merge_branches-default b/t/t5515/fetch.br-branches-default-merge_branches-default\nindex 7d947cd..1f60561 100644\n--- a/t/t5515/fetch.br-branches-default-merge_branches-default\n+++ b/t/t5515/fetch.br-branches-default-merge_branches-default\n@@ -1,9 +1,9 @@\n # br-branches-default-merge branches-default\n 754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\tbranch 'master' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-branches-default-octopus b/t/t5515/fetch.br-branches-default-octopus\nindex ec39c54..f31e1b3 100644\n--- a/t/t5515/fetch.br-branches-default-octopus\n+++ b/t/t5515/fetch.br-branches-default-octopus\n@@ -2,9 +2,9 @@\n 754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\tbranch 'master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\t\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-branches-default-octopus_branches-default b/t/t5515/fetch.br-branches-default-octopus_branches-default\nindex 6bf42e2..7060bd9 100644\n--- a/t/t5515/fetch.br-branches-default-octopus_branches-default\n+++ b/t/t5515/fetch.br-branches-default-octopus_branches-default\n@@ -2,9 +2,9 @@\n 754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\tbranch 'master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\t\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-branches-default_branches-default b/t/t5515/fetch.br-branches-default_branches-default\nindex 4a2bf3c..8cbd718 100644\n--- a/t/t5515/fetch.br-branches-default_branches-default\n+++ b/t/t5515/fetch.br-branches-default_branches-default\n@@ -1,8 +1,8 @@\n # br-branches-default branches-default\n 754b754407bf032e9a2f9d5a9ad05ca79a6b228f\t\tbranch 'master' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-branches-one b/t/t5515/fetch.br-branches-one\nindex 12ac8d2..c98f670 100644\n--- a/t/t5515/fetch.br-branches-one\n+++ b/t/t5515/fetch.br-branches-one\n@@ -1,8 +1,8 @@\n # br-branches-one\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-branches-one-merge b/t/t5515/fetch.br-branches-one-merge\nindex b4b3b35..aa1c8a9 100644\n--- a/t/t5515/fetch.br-branches-one-merge\n+++ b/t/t5515/fetch.br-branches-one-merge\n@@ -1,9 +1,9 @@\n # br-branches-one-merge\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-branches-one-merge_branches-one b/t/t5515/fetch.br-branches-one-merge_branches-one\nindex 2ecef38..c93310a 100644\n--- a/t/t5515/fetch.br-branches-one-merge_branches-one\n+++ b/t/t5515/fetch.br-branches-one-merge_branches-one\n@@ -1,9 +1,9 @@\n # br-branches-one-merge branches-one\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-branches-one-octopus b/t/t5515/fetch.br-branches-one-octopus\nindex 96e3029..97c4b54 100644\n--- a/t/t5515/fetch.br-branches-one-octopus\n+++ b/t/t5515/fetch.br-branches-one-octopus\n@@ -1,9 +1,9 @@\n # br-branches-one-octopus\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\t\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-branches-one-octopus_branches-one b/t/t5515/fetch.br-branches-one-octopus_branches-one\nindex 55e0bad..df705f7 100644\n--- a/t/t5515/fetch.br-branches-one-octopus_branches-one\n+++ b/t/t5515/fetch.br-branches-one-octopus_branches-one\n@@ -1,9 +1,9 @@\n # br-branches-one-octopus branches-one\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\t\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-branches-one_branches-one b/t/t5515/fetch.br-branches-one_branches-one\nindex 281fa09..96890e5 100644\n--- a/t/t5515/fetch.br-branches-one_branches-one\n+++ b/t/t5515/fetch.br-branches-one_branches-one\n@@ -1,8 +1,8 @@\n # br-branches-one branches-one\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-config-explicit b/t/t5515/fetch.br-config-explicit\nindex e2fa9c8..68fc927 100644\n--- a/t/t5515/fetch.br-config-explicit\n+++ b/t/t5515/fetch.br-config-explicit\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-config-explicit-merge b/t/t5515/fetch.br-config-explicit-merge\nindex ec1a723..f6475b7 100644\n--- a/t/t5515/fetch.br-config-explicit-merge\n+++ b/t/t5515/fetch.br-config-explicit-merge\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-config-explicit-merge_config-explicit b/t/t5515/fetch.br-config-explicit-merge_config-explicit\nindex 54f6891..018bdd7 100644\n--- a/t/t5515/fetch.br-config-explicit-merge_config-explicit\n+++ b/t/t5515/fetch.br-config-explicit-merge_config-explicit\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-config-explicit-octopus b/t/t5515/fetch.br-config-explicit-octopus\nindex 7011dfc..36d0270 100644\n--- a/t/t5515/fetch.br-config-explicit-octopus\n+++ b/t/t5515/fetch.br-config-explicit-octopus\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\t\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-config-explicit-octopus_config-explicit b/t/t5515/fetch.br-config-explicit-octopus_config-explicit\nindex bdad51f..6654ad0 100644\n--- a/t/t5515/fetch.br-config-explicit-octopus_config-explicit\n+++ b/t/t5515/fetch.br-config-explicit-octopus_config-explicit\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\t\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-config-explicit_config-explicit b/t/t5515/fetch.br-config-explicit_config-explicit\nindex 1b237dd..b19b016 100644\n--- a/t/t5515/fetch.br-config-explicit_config-explicit\n+++ b/t/t5515/fetch.br-config-explicit_config-explicit\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-config-glob b/t/t5515/fetch.br-config-glob\nindex e75ec2f..946d70c 100644\n--- a/t/t5515/fetch.br-config-glob\n+++ b/t/t5515/fetch.br-config-glob\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-config-glob-merge b/t/t5515/fetch.br-config-glob-merge\nindex ce8f739..8bb5e8b 100644\n--- a/t/t5515/fetch.br-config-glob-merge\n+++ b/t/t5515/fetch.br-config-glob-merge\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-config-glob-merge_config-glob b/t/t5515/fetch.br-config-glob-merge_config-glob\nindex 5817bed..113c08d 100644\n--- a/t/t5515/fetch.br-config-glob-merge_config-glob\n+++ b/t/t5515/fetch.br-config-glob-merge_config-glob\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-config-glob-octopus b/t/t5515/fetch.br-config-glob-octopus\nindex 938e532..9bbd537 100644\n--- a/t/t5515/fetch.br-config-glob-octopus\n+++ b/t/t5515/fetch.br-config-glob-octopus\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\t\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-config-glob-octopus_config-glob b/t/t5515/fetch.br-config-glob-octopus_config-glob\nindex c9225bf..4e51043 100644\n--- a/t/t5515/fetch.br-config-glob-octopus_config-glob\n+++ b/t/t5515/fetch.br-config-glob-octopus_config-glob\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\t\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-config-glob_config-glob b/t/t5515/fetch.br-config-glob_config-glob\nindex a6c20f9..19daf0c 100644\n--- a/t/t5515/fetch.br-config-glob_config-glob\n+++ b/t/t5515/fetch.br-config-glob_config-glob\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-remote-explicit b/t/t5515/fetch.br-remote-explicit\nindex 83534d2..ab44bc5 100644\n--- a/t/t5515/fetch.br-remote-explicit\n+++ b/t/t5515/fetch.br-remote-explicit\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-remote-explicit-merge b/t/t5515/fetch.br-remote-explicit-merge\nindex a9064dd..7421b2c 100644\n--- a/t/t5515/fetch.br-remote-explicit-merge\n+++ b/t/t5515/fetch.br-remote-explicit-merge\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-remote-explicit-merge_remote-explicit b/t/t5515/fetch.br-remote-explicit-merge_remote-explicit\nindex 732a37e..b6975d3 100644\n--- a/t/t5515/fetch.br-remote-explicit-merge_remote-explicit\n+++ b/t/t5515/fetch.br-remote-explicit-merge_remote-explicit\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-remote-explicit-octopus b/t/t5515/fetch.br-remote-explicit-octopus\nindex ecf020d..7681281 100644\n--- a/t/t5515/fetch.br-remote-explicit-octopus\n+++ b/t/t5515/fetch.br-remote-explicit-octopus\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\t\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-remote-explicit-octopus_remote-explicit b/t/t5515/fetch.br-remote-explicit-octopus_remote-explicit\nindex af77531..4c896cf 100644\n--- a/t/t5515/fetch.br-remote-explicit-octopus_remote-explicit\n+++ b/t/t5515/fetch.br-remote-explicit-octopus_remote-explicit\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\t\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-remote-explicit_remote-explicit b/t/t5515/fetch.br-remote-explicit_remote-explicit\nindex 51fae56..01e014e 100644\n--- a/t/t5515/fetch.br-remote-explicit_remote-explicit\n+++ b/t/t5515/fetch.br-remote-explicit_remote-explicit\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-remote-glob b/t/t5515/fetch.br-remote-glob\nindex 94e6ad3..09bfcee 100644\n--- a/t/t5515/fetch.br-remote-glob\n+++ b/t/t5515/fetch.br-remote-glob\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-remote-glob-merge b/t/t5515/fetch.br-remote-glob-merge\nindex 09362e2..4b62b01 100644\n--- a/t/t5515/fetch.br-remote-glob-merge\n+++ b/t/t5515/fetch.br-remote-glob-merge\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-remote-glob-merge_remote-glob b/t/t5515/fetch.br-remote-glob-merge_remote-glob\nindex e2eabec..7478f1f 100644\n--- a/t/t5515/fetch.br-remote-glob-merge_remote-glob\n+++ b/t/t5515/fetch.br-remote-glob-merge_remote-glob\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-remote-glob-octopus b/t/t5515/fetch.br-remote-glob-octopus\nindex b08e046..2543420 100644\n--- a/t/t5515/fetch.br-remote-glob-octopus\n+++ b/t/t5515/fetch.br-remote-glob-octopus\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\t\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-remote-glob-octopus_remote-glob b/t/t5515/fetch.br-remote-glob-octopus_remote-glob\nindex d4d547c..5ffde9c 100644\n--- a/t/t5515/fetch.br-remote-glob-octopus_remote-glob\n+++ b/t/t5515/fetch.br-remote-glob-octopus_remote-glob\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\t\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-remote-glob_remote-glob b/t/t5515/fetch.br-remote-glob_remote-glob\nindex 646dbc8..20ba5cb 100644\n--- a/t/t5515/fetch.br-remote-glob_remote-glob\n+++ b/t/t5515/fetch.br-remote-glob_remote-glob\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-unconfig b/t/t5515/fetch.br-unconfig\nindex 65ce6d9..887ccfc 100644\n--- a/t/t5515/fetch.br-unconfig\n+++ b/t/t5515/fetch.br-unconfig\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-unconfig_--tags_.._.git b/t/t5515/fetch.br-unconfig_--tags_.._.git\nindex 8258c80..1669cc4 100644\n--- a/t/t5515/fetch.br-unconfig_--tags_.._.git\n+++ b/t/t5515/fetch.br-unconfig_--tags_.._.git\n@@ -1,7 +1,7 @@\n # br-unconfig --tags ../.git\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-unconfig_.._.git_one_tag_tag-one_tag_tag-three-file b/t/t5515/fetch.br-unconfig_.._.git_one_tag_tag-one_tag_tag-three-file\nindex f02bab2..7411536 100644\n--- a/t/t5515/fetch.br-unconfig_.._.git_one_tag_tag-one_tag_tag-three-file\n+++ b/t/t5515/fetch.br-unconfig_.._.git_one_tag_tag-one_tag_tag-three-file\n@@ -2,7 +2,7 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\ttag 'tag-one' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-unconfig_.._.git_tag_tag-one-tree_tag_tag-three-file b/t/t5515/fetch.br-unconfig_.._.git_tag_tag-one-tree_tag_tag-three-file\nindex 85de411..7726983 100644\n--- a/t/t5515/fetch.br-unconfig_.._.git_tag_tag-one-tree_tag_tag-three-file\n+++ b/t/t5515/fetch.br-unconfig_.._.git_tag_tag-one-tree_tag_tag-three-file\n@@ -1,7 +1,7 @@\n # br-unconfig ../.git tag tag-one-tree tag tag-three-file\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-unconfig_.._.git_tag_tag-one_tag_tag-three b/t/t5515/fetch.br-unconfig_.._.git_tag_tag-one_tag_tag-three\nindex 0da2337..7b3750c 100644\n--- a/t/t5515/fetch.br-unconfig_.._.git_tag_tag-one_tag_tag-three\n+++ b/t/t5515/fetch.br-unconfig_.._.git_tag_tag-one_tag_tag-three\n@@ -1,7 +1,7 @@\n # br-unconfig ../.git tag tag-one tag tag-three\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\ttag 'tag-one' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\ttag 'tag-three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\t\ttag 'tag-three' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-unconfig_branches-default b/t/t5515/fetch.br-unconfig_branches-default\nindex fc7041e..da30e3c 100644\n--- a/t/t5515/fetch.br-unconfig_branches-default\n+++ b/t/t5515/fetch.br-unconfig_branches-default\n@@ -1,8 +1,8 @@\n # br-unconfig branches-default\n 754b754407bf032e9a2f9d5a9ad05ca79a6b228f\t\tbranch 'master' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-unconfig_branches-one b/t/t5515/fetch.br-unconfig_branches-one\nindex e94cde7..e461431 100644\n--- a/t/t5515/fetch.br-unconfig_branches-one\n+++ b/t/t5515/fetch.br-unconfig_branches-one\n@@ -1,8 +1,8 @@\n # br-unconfig branches-one\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-unconfig_config-explicit b/t/t5515/fetch.br-unconfig_config-explicit\nindex 01a283e..ed323c9 100644\n--- a/t/t5515/fetch.br-unconfig_config-explicit\n+++ b/t/t5515/fetch.br-unconfig_config-explicit\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-unconfig_config-glob b/t/t5515/fetch.br-unconfig_config-glob\nindex 3a556c5..2372ed0 100644\n--- a/t/t5515/fetch.br-unconfig_config-glob\n+++ b/t/t5515/fetch.br-unconfig_config-glob\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-unconfig_remote-explicit b/t/t5515/fetch.br-unconfig_remote-explicit\nindex db216df..6318dd1 100644\n--- a/t/t5515/fetch.br-unconfig_remote-explicit\n+++ b/t/t5515/fetch.br-unconfig_remote-explicit\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.br-unconfig_remote-glob b/t/t5515/fetch.br-unconfig_remote-glob\nindex aee65c2..1d9afad 100644\n--- a/t/t5515/fetch.br-unconfig_remote-glob\n+++ b/t/t5515/fetch.br-unconfig_remote-glob\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.master b/t/t5515/fetch.master\nindex 950fd07..9b29d67 100644\n--- a/t/t5515/fetch.master\n+++ b/t/t5515/fetch.master\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.master_--tags_.._.git b/t/t5515/fetch.master_--tags_.._.git\nindex 0e59950..8a74935 100644\n--- a/t/t5515/fetch.master_--tags_.._.git\n+++ b/t/t5515/fetch.master_--tags_.._.git\n@@ -1,7 +1,7 @@\n # master --tags ../.git\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.master_.._.git_one_tag_tag-one_tag_tag-three-file b/t/t5515/fetch.master_.._.git_one_tag_tag-one_tag_tag-three-file\nindex 8286852..0672d12 100644\n--- a/t/t5515/fetch.master_.._.git_one_tag_tag-one_tag_tag-three-file\n+++ b/t/t5515/fetch.master_.._.git_one_tag_tag-one_tag_tag-three-file\n@@ -2,7 +2,7 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\ttag 'tag-one' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.master_.._.git_tag_tag-one-tree_tag_tag-three-file b/t/t5515/fetch.master_.._.git_tag_tag-one-tree_tag_tag-three-file\nindex 2e133ef..0fd737c 100644\n--- a/t/t5515/fetch.master_.._.git_tag_tag-one-tree_tag_tag-three-file\n+++ b/t/t5515/fetch.master_.._.git_tag_tag-one-tree_tag_tag-three-file\n@@ -1,7 +1,7 @@\n # master ../.git tag tag-one-tree tag tag-three-file\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.master_.._.git_tag_tag-one_tag_tag-three b/t/t5515/fetch.master_.._.git_tag_tag-one_tag_tag-three\nindex 92b18b4..e488986 100644\n--- a/t/t5515/fetch.master_.._.git_tag_tag-one_tag_tag-three\n+++ b/t/t5515/fetch.master_.._.git_tag_tag-one_tag_tag-three\n@@ -1,7 +1,7 @@\n # master ../.git tag tag-one tag tag-three\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\ttag 'tag-one' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\t\ttag 'tag-three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\t\ttag 'tag-three' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.master_branches-default b/t/t5515/fetch.master_branches-default\nindex 603d6d2..2eedd3b 100644\n--- a/t/t5515/fetch.master_branches-default\n+++ b/t/t5515/fetch.master_branches-default\n@@ -1,8 +1,8 @@\n # master branches-default\n 754b754407bf032e9a2f9d5a9ad05ca79a6b228f\t\tbranch 'master' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.master_branches-one b/t/t5515/fetch.master_branches-one\nindex fe9bb0b..901ce21 100644\n--- a/t/t5515/fetch.master_branches-one\n+++ b/t/t5515/fetch.master_branches-one\n@@ -1,8 +1,8 @@\n # master branches-one\n 8e32a6d901327a23ef831511badce7bf3bf46689\t\tbranch 'one' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.master_config-explicit b/t/t5515/fetch.master_config-explicit\nindex 4be97c7..251c826 100644\n--- a/t/t5515/fetch.master_config-explicit\n+++ b/t/t5515/fetch.master_config-explicit\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.master_config-glob b/t/t5515/fetch.master_config-glob\nindex cb0726f..27c158e 100644\n--- a/t/t5515/fetch.master_config-glob\n+++ b/t/t5515/fetch.master_config-glob\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.master_remote-explicit b/t/t5515/fetch.master_remote-explicit\nindex 44a1ca8..b3cfe6b 100644\n--- a/t/t5515/fetch.master_remote-explicit\n+++ b/t/t5515/fetch.master_remote-explicit\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\ndiff --git a/t/t5515/fetch.master_remote-glob b/t/t5515/fetch.master_remote-glob\nindex 724e8db..118befd 100644\n--- a/t/t5515/fetch.master_remote-glob\n+++ b/t/t5515/fetch.master_remote-glob\n@@ -3,9 +3,9 @@\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\tbranch 'one' of ../\n 0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\tbranch 'three' of ../\n 6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\tbranch 'two' of ../\n-754b754407bf032e9a2f9d5a9ad05ca79a6b228f\tnot-for-merge\ttag 'tag-master' of ../\n+6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\tnot-for-merge\ttag 'tag-master' of ../\n 8e32a6d901327a23ef831511badce7bf3bf46689\tnot-for-merge\ttag 'tag-one' of ../\n 22feea448b023a2d864ef94b013735af34d238ba\tnot-for-merge\ttag 'tag-one-tree' of ../\n-0567da4d5edd2ff4bb292a465ba9e64dcad9536b\tnot-for-merge\ttag 'tag-three' of ../\n+c61a82b60967180544e3c19f819ddbd0c9f89899\tnot-for-merge\ttag 'tag-three' of ../\n 0e3b14047d3ee365f4f2a1b673db059c3972589c\tnot-for-merge\ttag 'tag-three-file' of ../\n-6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\tnot-for-merge\ttag 'tag-two' of ../\n+525b7fb068d59950d185a8779dc957c77eed73ba\tnot-for-merge\ttag 'tag-two' of ../\n-- \n1.7.8.rc0.128.g31aa4\n"},{"id":"179104","messageId":"1320721245-13223-4-git-send-email-gitster@pobox.com","threadId":"28845","inReplyTo":"1320721245-13223-1-git-send-email-gitster@pobox.com","subject":"[PATCH v2 03/12] merge: notice local merging of tags and keep it unwrapped","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-08T03:00:36Z","receivedAt":"2011-11-08T03:00:36Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This also updates the autogenerated merge title message from \"merge commit X\"\nto \"merge tag X\", and its effect can be seen in the changes to the test suite.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin/merge.c                 |    5 +++++\n t/t4202-log.sh                  |    4 ++--\n t/t7600-merge.sh                |    6 +++---\n t/t7604-merge-custom-message.sh |    2 +-\n t/t7608-merge-messages.sh       |    4 ++--\n 5 files changed, 13 insertions(+), 8 deletions(-)\n\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex dffd5ec..6a44b6d 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -441,6 +441,11 @@ static void merge_name(const char *remote, struct strbuf *msg)\n \t\t\t\t    sha1_to_hex(branch_head), remote);\n \t\t\tgoto cleanup;\n \t\t}\n+\t\tif (!prefixcmp(found_ref, \"refs/tags/\")) {\n+\t\t\tstrbuf_addf(msg, \"%s\\t\\ttag '%s' of .\\n\",\n+\t\t\t\t    sha1_to_hex(branch_head), remote);\n+\t\t\tgoto cleanup;\n+\t\t}\n \t\tif (!prefixcmp(found_ref, \"refs/remotes/\")) {\n \t\t\tstrbuf_addf(msg, \"%s\\t\\tremote-tracking branch '%s' of .\\n\",\n \t\t\t\t    sha1_to_hex(branch_head), remote);\ndiff --git a/t/t4202-log.sh b/t/t4202-log.sh\nindex 983e34b..222f755 100755\n--- a/t/t4202-log.sh\n+++ b/t/t4202-log.sh\n@@ -346,11 +346,11 @@ test_expect_success 'set up more tangled history' '\n '\n \n cat > expect <<\\EOF\n-*   Merge commit 'reach'\n+*   Merge tag 'reach'\n |\\\n | \\\n |  \\\n-*-. \\   Merge commit 'octopus-a'; commit 'octopus-b'\n+*-. \\   Merge tags 'octopus-a' and 'octopus-b'\n |\\ \\ \\\n * | | | seventh\n | | * | octopus-b\ndiff --git a/t/t7600-merge.sh b/t/t7600-merge.sh\nindex 3008e4e..b91d022 100755\n--- a/t/t7600-merge.sh\n+++ b/t/t7600-merge.sh\n@@ -38,8 +38,8 @@ printf '%s\\n' '1 X' 2 3 4 '5 X' 6 7 8 '9 X' >result.1-5-9\n >empty\n \n create_merge_msgs () {\n-\techo \"Merge commit 'c2'\" >msg.1-5 &&\n-\techo \"Merge commit 'c2'; commit 'c3'\" >msg.1-5-9 &&\n+\techo \"Merge tag 'c2'\" >msg.1-5 &&\n+\techo \"Merge tags 'c2' and 'c3'\" >msg.1-5-9 &&\n \t{\n \t\techo \"Squashed commit of the following:\" &&\n \t\techo &&\n@@ -57,7 +57,7 @@ create_merge_msgs () {\n \t} >squash.1-5-9 &&\n \techo >msg.nolog &&\n \t{\n-\t\techo \"* commit 'c3':\" &&\n+\t\techo \"* tag 'c3':\" &&\n \t\techo \"  commit 3\" &&\n \t\techo\n \t} >msg.log\ndiff --git a/t/t7604-merge-custom-message.sh b/t/t7604-merge-custom-message.sh\nindex 9114785..89619cf 100755\n--- a/t/t7604-merge-custom-message.sh\n+++ b/t/t7604-merge-custom-message.sh\n@@ -11,7 +11,7 @@ create_merge_msgs() {\n \n \tcp exp.subject exp.log &&\n \techo >>exp.log \"\" &&\n-\techo >>exp.log \"* commit 'c2':\" &&\n+\techo >>exp.log \"* tag 'c2':\" &&\n \techo >>exp.log \"  c2\"\n }\n \ndiff --git a/t/t7608-merge-messages.sh b/t/t7608-merge-messages.sh\nindex 9225fa6..8e7e0a5 100755\n--- a/t/t7608-merge-messages.sh\n+++ b/t/t7608-merge-messages.sh\n@@ -35,7 +35,7 @@ test_expect_success 'merge tag' '\n \tgit checkout master &&\n \ttest_commit master-3 &&\n \tgit merge tag-1 &&\n-\tcheck_oneline \"Merge commit Qtag-1Q\"\n+\tcheck_oneline \"Merge tag Qtag-1Q\"\n '\n \n test_expect_success 'ambiguous tag' '\n@@ -44,7 +44,7 @@ test_expect_success 'ambiguous tag' '\n \tgit checkout master &&\n \ttest_commit master-4 &&\n \tgit merge ambiguous &&\n-\tcheck_oneline \"Merge commit QambiguousQ\"\n+\tcheck_oneline \"Merge tag QambiguousQ\"\n '\n \n test_expect_success 'remote-tracking branch' '\n-- \n1.7.8.rc0.128.g31aa4\n"},{"id":"179103","messageId":"1320721245-13223-5-git-send-email-gitster@pobox.com","threadId":"28845","inReplyTo":"1320721245-13223-1-git-send-email-gitster@pobox.com","subject":"[PATCH v2 04/12] fetch: allow \"git fetch $there v1.0\" to fetch a tag","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-08T03:00:37Z","receivedAt":"2011-11-08T03:00:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"You can already do so with \"git fetch $there tags/v1.0\" but if it is not\nambiguous there is no reason to force users to type more.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n refs.c |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/refs.c b/refs.c\nindex cab4394..ff20eeb 100644\n--- a/refs.c\n+++ b/refs.c\n@@ -998,6 +998,7 @@ const char *ref_rev_parse_rules[] = {\n const char *ref_fetch_rules[] = {\n \t\"%.*s\",\n \t\"refs/%.*s\",\n+\t\"refs/tags/%.*s\",\n \t\"refs/heads/%.*s\",\n \tNULL\n };\n-- \n1.7.8.rc0.128.g31aa4\n"},{"id":"179113","messageId":"1320721245-13223-6-git-send-email-gitster@pobox.com","threadId":"28845","inReplyTo":"1320721245-13223-1-git-send-email-gitster@pobox.com","subject":"[PATCH v2 05/12] refs DWIMmery: use the same rule for both \"git fetch\" and others","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-08T03:00:38Z","receivedAt":"2011-11-08T03:00:38Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"git log frotz\" can DWIM to \"refs/remotes/frotz/HEAD\", but in the remote\naccess context, \"git fetch frotz\" to fetch what the other side happened to\nhave fetched from what it calls 'frotz' (which may not have any relation\nto what we consider is 'frotz') the last time would not make much sense,\nso the fetch rules table did not include \"refs/remotes/%.*s/HEAD\".\n\nWhen the user really wants to, \"git fetch $there remotes/frotz/HEAD\" would\nlet her do so anyway, so this is not about safety or security; it merely\nis about confusion avoidance and discouraging meaningless usage.\n\nSpecifically, it is _not_ about ambiguity avoidance. A name that would\nbecome ambiguous if we use the same rules table for both fetch and local\nrev-parse would be ambiguous locally at the remote side.\n\nSo for the same reason as we added rule to allow \"git fetch $there v1.0\"\ninstead of \"git fetch $there tags/v1.0\" in the previous commit, here is a\nbit longer rope for the users, which incidentally simplifies our code.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n cache.h          |    2 +-\n refs.c           |    8 --------\n t/t5510-fetch.sh |    5 ++---\n 3 files changed, 3 insertions(+), 12 deletions(-)\n\ndiff --git a/cache.h b/cache.h\nindex be07ec7..26322dd 100644\n--- a/cache.h\n+++ b/cache.h\n@@ -873,7 +873,7 @@ extern int get_sha1_mb(const char *str, unsigned char *sha1);\n \n extern int refname_match(const char *abbrev_name, const char *full_name, const char **rules);\n extern const char *ref_rev_parse_rules[];\n-extern const char *ref_fetch_rules[];\n+#define ref_fetch_rules ref_rev_parse_rules\n \n extern int create_symref(const char *ref, const char *refs_heads_master, const char *logmsg);\n extern int validate_headref(const char *ref);\ndiff --git a/refs.c b/refs.c\nindex ff20eeb..026c7ea 100644\n--- a/refs.c\n+++ b/refs.c\n@@ -995,14 +995,6 @@ const char *ref_rev_parse_rules[] = {\n \tNULL\n };\n \n-const char *ref_fetch_rules[] = {\n-\t\"%.*s\",\n-\t\"refs/%.*s\",\n-\t\"refs/tags/%.*s\",\n-\t\"refs/heads/%.*s\",\n-\tNULL\n-};\n-\n int refname_match(const char *abbrev_name, const char *full_name, const char **rules)\n {\n \tconst char **p;\ndiff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh\nindex 7e433b1..251d138 100755\n--- a/t/t5510-fetch.sh\n+++ b/t/t5510-fetch.sh\n@@ -116,7 +116,7 @@ test_expect_success 'fetch must not resolve short tag name' '\n \n '\n \n-test_expect_success 'fetch must not resolve short remote name' '\n+test_expect_success 'fetch can now resolve short remote name' '\n \n \tcd \"$D\" &&\n \tgit update-ref refs/remotes/six/HEAD HEAD &&\n@@ -125,8 +125,7 @@ test_expect_success 'fetch must not resolve short remote name' '\n \tcd six &&\n \tgit init &&\n \n-\ttest_must_fail git fetch .. six:six\n-\n+\tgit fetch .. six:six\n '\n \n test_expect_success 'create bundle 1' '\n-- \n1.7.8.rc0.128.g31aa4\n"},{"id":"179105","messageId":"1320721245-13223-7-git-send-email-gitster@pobox.com","threadId":"28845","inReplyTo":"1320721245-13223-1-git-send-email-gitster@pobox.com","subject":"[PATCH v2 06/12] fmt-merge-msg: avoid early returns","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-08T03:00:39Z","receivedAt":"2011-11-08T03:00:39Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"In various places in the codepath, the program tries to return early\nassuming there is no more work needed. That is generally untrue when\nover time new features are added.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin/fmt-merge-msg.c |   20 ++++++++++----------\n 1 files changed, 10 insertions(+), 10 deletions(-)\n\ndiff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c\nindex 7e2f225..7b492f9 100644\n--- a/builtin/fmt-merge-msg.c\n+++ b/builtin/fmt-merge-msg.c\n@@ -26,6 +26,7 @@ static int fmt_merge_msg_config(const char *key, const char *value, void *cb)\n \treturn 0;\n }\n \n+/* merge data per repository where the merged tips came from */\n struct src_data {\n \tstruct string_list branch, tag, r_branch, generic;\n \tint head_status;\n@@ -71,6 +72,11 @@ static int handle_line(char *line)\n \t\tline[len - 1] = 0;\n \tline += 42;\n \n+\t/*\n+\t * At this point, line points at the beginning of comment e.g.\n+\t * \"branch 'frotz' of git://that/repository.git\".\n+\t * Find the repository name and point it with src.\n+\t */\n \tsrc = strstr(line, \" of \");\n \tif (src) {\n \t\t*src = 0;\n@@ -283,10 +289,7 @@ static int do_fmt_merge_msg(int merge_title, struct strbuf *in,\n \t\t\tdie (\"Error in line %d: %.*s\", i, len, p);\n \t}\n \n-\tif (!srcs.nr)\n-\t\treturn 0;\n-\n-\tif (merge_title)\n+\tif (merge_title && srcs.nr)\n \t\tdo_fmt_merge_msg_title(out, current_branch);\n \n \tif (shortlog_len) {\n@@ -306,6 +309,8 @@ static int do_fmt_merge_msg(int merge_title, struct strbuf *in,\n \t\t\tshortlog(origins.items[i].string, origins.items[i].util,\n \t\t\t\t\thead, &rev, shortlog_len, out);\n \t}\n+\tif (out->len && out->buf[out->len-1] != '\\n')\n+\t\tstrbuf_addch(out, '\\n');\n \treturn 0;\n }\n \n@@ -341,12 +346,7 @@ int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix)\n \t\t\t     0);\n \tif (argc > 0)\n \t\tusage_with_options(fmt_merge_msg_usage, options);\n-\tif (message && !shortlog_len) {\n-\t\tchar nl = '\\n';\n-\t\twrite_in_full(STDOUT_FILENO, message, strlen(message));\n-\t\twrite_in_full(STDOUT_FILENO, &nl, 1);\n-\t\treturn 0;\n-\t}\n+\n \tif (shortlog_len < 0)\n \t\tdie(\"Negative --log=%d\", shortlog_len);\n \n-- \n1.7.8.rc0.128.g31aa4\n"},{"id":"179107","messageId":"1320721245-13223-8-git-send-email-gitster@pobox.com","threadId":"28845","inReplyTo":"1320721245-13223-1-git-send-email-gitster@pobox.com","subject":"[PATCH v2 07/12] fmt-merge-msg: package options into a structure","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-08T03:00:40Z","receivedAt":"2011-11-08T03:00:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This way new features can be added more easily\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin.h               |    8 +++++++-\n builtin/fmt-merge-msg.c |   29 ++++++++++++++---------------\n builtin/merge.c         |    8 ++++++--\n 3 files changed, 27 insertions(+), 18 deletions(-)\n\ndiff --git a/builtin.h b/builtin.h\nindex 0e9da90..e94a5dc 100644\n--- a/builtin.h\n+++ b/builtin.h\n@@ -14,8 +14,14 @@ extern const char git_usage_string[];\n extern const char git_more_info_string[];\n \n extern void prune_packed_objects(int);\n+\n+struct fmt_merge_msg_opts {\n+\tunsigned add_title:1;\n+\tint shortlog_len;\n+};\n+\n extern int fmt_merge_msg(struct strbuf *in, struct strbuf *out,\n-\t\t\t int merge_title, int shortlog_len);\n+\t\t\t struct fmt_merge_msg_opts *);\n extern void commit_notes(struct notes_tree *t, const char *msg);\n \n struct notes_rewrite_cfg {\ndiff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c\nindex 7b492f9..3ff9564 100644\n--- a/builtin/fmt-merge-msg.c\n+++ b/builtin/fmt-merge-msg.c\n@@ -209,7 +209,7 @@ static void shortlog(const char *name, unsigned char *sha1,\n \tstring_list_clear(&subjects, 0);\n }\n \n-static void do_fmt_merge_msg_title(struct strbuf *out,\n+static void fmt_merge_msg_title(struct strbuf *out,\n \tconst char *current_branch) {\n \tint i = 0;\n \tchar *sep = \"\";\n@@ -262,8 +262,9 @@ static void do_fmt_merge_msg_title(struct strbuf *out,\n \t\tstrbuf_addf(out, \" into %s\\n\", current_branch);\n }\n \n-static int do_fmt_merge_msg(int merge_title, struct strbuf *in,\n-\tstruct strbuf *out, int shortlog_len) {\n+int fmt_merge_msg(struct strbuf *in, struct strbuf *out,\n+\t\t  struct fmt_merge_msg_opts *opts)\n+{\n \tint i = 0, pos = 0;\n \tunsigned char head_sha1[20];\n \tconst char *current_branch;\n@@ -289,10 +290,10 @@ static int do_fmt_merge_msg(int merge_title, struct strbuf *in,\n \t\t\tdie (\"Error in line %d: %.*s\", i, len, p);\n \t}\n \n-\tif (merge_title && srcs.nr)\n-\t\tdo_fmt_merge_msg_title(out, current_branch);\n+\tif (opts->add_title && srcs.nr)\n+\t\tfmt_merge_msg_title(out, current_branch);\n \n-\tif (shortlog_len) {\n+\tif (opts->shortlog_len) {\n \t\tstruct commit *head;\n \t\tstruct rev_info rev;\n \n@@ -307,18 +308,13 @@ static int do_fmt_merge_msg(int merge_title, struct strbuf *in,\n \n \t\tfor (i = 0; i < origins.nr; i++)\n \t\t\tshortlog(origins.items[i].string, origins.items[i].util,\n-\t\t\t\t\thead, &rev, shortlog_len, out);\n+\t\t\t\t head, &rev, opts->shortlog_len, out);\n \t}\n \tif (out->len && out->buf[out->len-1] != '\\n')\n \t\tstrbuf_addch(out, '\\n');\n \treturn 0;\n }\n \n-int fmt_merge_msg(struct strbuf *in, struct strbuf *out,\n-\t\t  int merge_title, int shortlog_len) {\n-\treturn do_fmt_merge_msg(merge_title, in, out, shortlog_len);\n-}\n-\n int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix)\n {\n \tconst char *inpath = NULL;\n@@ -340,6 +336,7 @@ int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix)\n \tFILE *in = stdin;\n \tstruct strbuf input = STRBUF_INIT, output = STRBUF_INIT;\n \tint ret;\n+\tstruct fmt_merge_msg_opts opts;\n \n \tgit_config(fmt_merge_msg_config, NULL);\n \targc = parse_options(argc, argv, prefix, options, fmt_merge_msg_usage,\n@@ -361,10 +358,12 @@ int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix)\n \n \tif (message)\n \t\tstrbuf_addstr(&output, message);\n-\tret = fmt_merge_msg(&input, &output,\n-\t\t\t    message ? 0 : 1,\n-\t\t\t    shortlog_len);\n \n+\tmemset(&opts, 0, sizeof(opts));\n+\topts.add_title = !message;\n+\topts.shortlog_len = shortlog_len;\n+\n+\tret = fmt_merge_msg(&input, &output, &opts);\n \tif (ret)\n \t\treturn ret;\n \twrite_in_full(STDOUT_FILENO, output.buf, output.len);\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex 6a44b6d..48e7f00 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -1229,8 +1229,12 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\t\tmerge_name(argv[i], &merge_names);\n \n \t\tif (!have_message || shortlog_len) {\n-\t\t\tfmt_merge_msg(&merge_names, &merge_msg, !have_message,\n-\t\t\t\t      shortlog_len);\n+\t\t\tstruct fmt_merge_msg_opts opts;\n+\t\t\tmemset(&opts, 0, sizeof(opts));\n+\t\t\topts.add_title = !have_message;\n+\t\t\topts.shortlog_len = shortlog_len;\n+\n+\t\t\tfmt_merge_msg(&merge_names, &merge_msg, &opts);\n \t\t\tif (merge_msg.len)\n \t\t\t\tstrbuf_setlen(&merge_msg, merge_msg.len - 1);\n \t\t}\n-- \n1.7.8.rc0.128.g31aa4\n"},{"id":"179111","messageId":"1320721245-13223-9-git-send-email-gitster@pobox.com","threadId":"28845","inReplyTo":"1320721245-13223-1-git-send-email-gitster@pobox.com","subject":"[PATCH v2 08/12] fmt-merge-msg: Add contents of merged tag in the merge message","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-08T03:00:41Z","receivedAt":"2011-11-08T03:00:41Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"When a contributor asks the integrator to merge her history, a signed tag\ncan be a good vehicle to communicate the authenticity of the request while\nconveying other information such as the purpose of the topic.\n\nE.g. a signed tag \"for-linus\" can be created, and the integrator can run:\n\n   $ git pull git://example.com/work.git/ for-linus\n\nThis would allow the integrator to run \"git verify-tag FETCH_HEAD\" to\nvalidate the signed tag.\n\nUpdate fmt-merge-msg so that it pre-fills the merge message template with\nthe body (but not signature) of the tag object to help the integrator write\na better merge message, in the same spirit as the existing merge.log summary\nlines.\n\nThe message that comes from GPG signature validation is also included in\nthe merge message template to help the integrator verify it, but they are\nprefixed with \"#\" to make them comments.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin/fmt-merge-msg.c |   72 +++++++++++++++++++++++++++++++++++++++++++++-\n strbuf.c                |   15 ++++++++++\n strbuf.h                |    8 +++++\n 3 files changed, 93 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c\nindex 3ff9564..7dae846 100644\n--- a/builtin/fmt-merge-msg.c\n+++ b/builtin/fmt-merge-msg.c\n@@ -5,6 +5,7 @@\n #include \"revision.h\"\n #include \"tag.h\"\n #include \"string-list.h\"\n+#include \"gpg-interface.h\"\n \n static const char * const fmt_merge_msg_usage[] = {\n \t\"git fmt-merge-msg [-m <message>] [--log[=<n>]|--no-log] [--file <file>]\",\n@@ -262,6 +263,70 @@ static void fmt_merge_msg_title(struct strbuf *out,\n \t\tstrbuf_addf(out, \" into %s\\n\", current_branch);\n }\n \n+static void fmt_tag_signature(struct strbuf *tagbuf,\n+\t\t\t      struct strbuf *sig,\n+\t\t\t      const char *buf,\n+\t\t\t      unsigned long len)\n+{\n+\tconst char *tag_body = strstr(buf, \"\\n\\n\");\n+\tif (tag_body) {\n+\t\ttag_body += 2;\n+\t\tstrbuf_add(tagbuf, tag_body, buf + len - tag_body);\n+\t}\n+\tstrbuf_complete_line(tagbuf);\n+\tstrbuf_add_lines(tagbuf, \"# \", sig->buf, sig->len);\n+}\n+\n+static void fmt_merge_msg_sigs(struct strbuf *out)\n+{\n+\tint i, tag_number = 0, first_tag = 0;\n+\tstruct strbuf tagbuf = STRBUF_INIT;\n+\n+\tfor (i = 0; i < origins.nr; i++) {\n+\t\tunsigned char *sha1 = origins.items[i].util;\n+\t\tenum object_type type;\n+\t\tunsigned long size, len;\n+\t\tchar *buf = read_sha1_file(sha1, &type, &size);\n+\t\tstruct strbuf sig = STRBUF_INIT;\n+\n+\t\tif (!buf || type != OBJ_TAG)\n+\t\t\tgoto next;\n+\t\tlen = parse_signature(buf, size);\n+\n+\t\tif (size == len)\n+\t\t\t; /* merely annotated */\n+\t\telse if (verify_signed_buffer(buf, len, buf + len, size - len, &sig)) {\n+\t\t\tif (!sig.len)\n+\t\t\t\tstrbuf_addstr(&sig, \"gpg verification failed.\\n\");\n+\t\t}\n+\n+\t\tif (!tag_number++) {\n+\t\t\tfmt_tag_signature(&tagbuf, &sig, buf, len);\n+\t\t\tfirst_tag = i;\n+\t\t} else {\n+\t\t\tif (tag_number == 2) {\n+\t\t\t\tstruct strbuf tagline = STRBUF_INIT;\n+\t\t\t\tstrbuf_addf(&tagline, \"\\n# %s\\n\",\n+\t\t\t\t\t    origins.items[first_tag].string);\n+\t\t\t\tstrbuf_insert(&tagbuf, 0, tagline.buf,\n+\t\t\t\t\t      tagline.len);\n+\t\t\t\tstrbuf_release(&tagline);\n+\t\t\t}\n+\t\t\tstrbuf_addf(&tagbuf, \"\\n# %s\\n\",\n+\t\t\t\t    origins.items[i].string);\n+\t\t\tfmt_tag_signature(&tagbuf, &sig, buf, len);\n+\t\t}\n+\t\tstrbuf_release(&sig);\n+\tnext:\n+\t\tfree(buf);\n+\t}\n+\tif (tagbuf.len) {\n+\t\tstrbuf_addch(out, '\\n');\n+\t\tstrbuf_addbuf(out, &tagbuf);\n+\t}\n+\tstrbuf_release(&tagbuf);\n+}\n+\n int fmt_merge_msg(struct strbuf *in, struct strbuf *out,\n \t\t  struct fmt_merge_msg_opts *opts)\n {\n@@ -293,6 +358,9 @@ int fmt_merge_msg(struct strbuf *in, struct strbuf *out,\n \tif (opts->add_title && srcs.nr)\n \t\tfmt_merge_msg_title(out, current_branch);\n \n+\tif (origins.nr)\n+\t\tfmt_merge_msg_sigs(out);\n+\n \tif (opts->shortlog_len) {\n \t\tstruct commit *head;\n \t\tstruct rev_info rev;\n@@ -310,8 +378,8 @@ int fmt_merge_msg(struct strbuf *in, struct strbuf *out,\n \t\t\tshortlog(origins.items[i].string, origins.items[i].util,\n \t\t\t\t head, &rev, opts->shortlog_len, out);\n \t}\n-\tif (out->len && out->buf[out->len-1] != '\\n')\n-\t\tstrbuf_addch(out, '\\n');\n+\n+\tstrbuf_complete_line(out);\n \treturn 0;\n }\n \ndiff --git a/strbuf.c b/strbuf.c\nindex 3ad2cc0..a3c2e84 100644\n--- a/strbuf.c\n+++ b/strbuf.c\n@@ -397,3 +397,18 @@ int strbuf_read_file(struct strbuf *sb, const char *path, size_t hint)\n \n \treturn len;\n }\n+\n+void strbuf_add_lines(struct strbuf *out, const char *prefix,\n+\t\t      const char *buf, size_t size)\n+{\n+\tstrbuf_complete_line(out);\n+\twhile (size) {\n+\t\tconst char *next = memchr(buf, '\\n', size);\n+\t\tnext = next ? (next + 1) : (buf + size);\n+\t\tstrbuf_addstr(out, prefix);\n+\t\tstrbuf_add(out, buf, next - buf);\n+\t\tsize -= next - buf;\n+\t\tbuf = next;\n+\t}\n+\tstrbuf_complete_line(out);\n+}\ndiff --git a/strbuf.h b/strbuf.h\nindex 46a33f8..08fc13d 100644\n--- a/strbuf.h\n+++ b/strbuf.h\n@@ -100,6 +100,14 @@ extern void strbuf_addf(struct strbuf *sb, const char *fmt, ...);\n __attribute__((format (printf,2,0)))\n extern void strbuf_vaddf(struct strbuf *sb, const char *fmt, va_list ap);\n \n+extern void strbuf_add_lines(struct strbuf *sb, const char *prefix, const char *buf, size_t size);\n+\n+static inline void strbuf_complete_line(struct strbuf *sb)\n+{\n+\tif (sb->len && sb->buf[sb->len - 1] != '\\n')\n+\t\tstrbuf_addch(sb, '\\n');\n+}\n+\n extern size_t strbuf_fread(struct strbuf *, size_t, FILE *);\n /* XXX: if read fails, any partial read is undone */\n extern ssize_t strbuf_read(struct strbuf *, int fd, size_t hint);\n-- \n1.7.8.rc0.128.g31aa4\n"},{"id":"179112","messageId":"1320721245-13223-10-git-send-email-gitster@pobox.com","threadId":"28845","inReplyTo":"1320721245-13223-1-git-send-email-gitster@pobox.com","subject":"[PATCH v2 09/12] merge: make usage of commit->util more extensible","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-08T03:00:42Z","receivedAt":"2011-11-08T03:00:42Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"The merge-recursive code uses the commit->util field directly to annotate\nthe commit objects given from the command line, i.e. the remote heads to\nbe merged, with a single string to be used to describe it in its trace\nmessages and conflict markers.\n\nCorrect this short-signtedness by redefining the field to be a pointer to\na structure \"struct merge_remote_desc\" that later enhancements can add\nmore information. Store the original objects we were told to merge in a\nfield \"obj\" in this struct, so that we can recover the tag we were told to\nmerge.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin/merge.c   |   63 +++++++++++++++++++---------------------------------\n commit.c          |   19 ++++++++++++++++\n commit.h          |   13 +++++++++++\n merge-recursive.c |   13 +++++------\n 4 files changed, 61 insertions(+), 47 deletions(-)\n\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex 48e7f00..8d4eb4e 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -406,20 +406,10 @@ static void finish(struct commit *head_commit,\n \tstrbuf_release(&reflog_message);\n }\n \n-static struct object *want_commit(const char *name)\n-{\n-\tstruct object *obj;\n-\tunsigned char sha1[20];\n-\tif (get_sha1(name, sha1))\n-\t\treturn NULL;\n-\tobj = parse_object(sha1);\n-\treturn peel_to_type(name, 0, obj, OBJ_COMMIT);\n-}\n-\n /* Get the name for the merge commit's message. */\n static void merge_name(const char *remote, struct strbuf *msg)\n {\n-\tstruct object *remote_head;\n+\tstruct commit *remote_head;\n \tunsigned char branch_head[20], buf_sha[20];\n \tstruct strbuf buf = STRBUF_INIT;\n \tstruct strbuf bname = STRBUF_INIT;\n@@ -431,7 +421,7 @@ static void merge_name(const char *remote, struct strbuf *msg)\n \tremote = bname.buf;\n \n \tmemset(branch_head, 0, sizeof(branch_head));\n-\tremote_head = want_commit(remote);\n+\tremote_head = get_merge_parent(remote);\n \tif (!remote_head)\n \t\tdie(_(\"'%s' does not point to a commit\"), remote);\n \n@@ -487,7 +477,7 @@ static void merge_name(const char *remote, struct strbuf *msg)\n \t\tif (resolve_ref(truname.buf, buf_sha, 1, NULL)) {\n \t\t\tstrbuf_addf(msg,\n \t\t\t\t    \"%s\\t\\tbranch '%s'%s of .\\n\",\n-\t\t\t\t    sha1_to_hex(remote_head->sha1),\n+\t\t\t\t    sha1_to_hex(remote_head->object.sha1),\n \t\t\t\t    truname.buf + 11,\n \t\t\t\t    (early ? \" (early part)\" : \"\"));\n \t\t\tstrbuf_release(&truname);\n@@ -515,7 +505,7 @@ static void merge_name(const char *remote, struct strbuf *msg)\n \t\tgoto cleanup;\n \t}\n \tstrbuf_addf(msg, \"%s\\t\\tcommit '%s'\\n\",\n-\t\tsha1_to_hex(remote_head->sha1), remote);\n+\t\tsha1_to_hex(remote_head->object.sha1), remote);\n cleanup:\n \tstrbuf_release(&buf);\n \tstrbuf_release(&bname);\n@@ -719,7 +709,7 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,\n \t\t\t\tdie(_(\"Unknown option for merge-recursive: -X%s\"), xopts[x]);\n \n \t\to.branch1 = head_arg;\n-\t\to.branch2 = remoteheads->item->util;\n+\t\to.branch2 = merge_remote_util(remoteheads->item)->name;\n \n \t\tfor (j = common; j; j = j->next)\n \t\t\tcommit_list_insert(j->item, &reversed);\n@@ -1190,7 +1180,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\targv += 2;\n \t\targc -= 2;\n \t} else if (!head_commit) {\n-\t\tstruct object *remote_head;\n+\t\tstruct commit *remote_head;\n \t\t/*\n \t\t * If the merged head is a valid one there is no reason\n \t\t * to forbid \"git merge\" into a branch yet to be born.\n@@ -1204,12 +1194,12 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\tif (!allow_fast_forward)\n \t\t\tdie(_(\"Non-fast-forward commit does not make sense into \"\n \t\t\t    \"an empty head\"));\n-\t\tremote_head = want_commit(argv[0]);\n+\t\tremote_head = get_merge_parent(argv[0]);\n \t\tif (!remote_head)\n \t\t\tdie(_(\"%s - not something we can merge\"), argv[0]);\n-\t\tread_empty(remote_head->sha1, 0);\n-\t\tupdate_ref(\"initial pull\", \"HEAD\", remote_head->sha1, NULL, 0,\n-\t\t\t\tDIE_ON_ERR);\n+\t\tread_empty(remote_head->object.sha1, 0);\n+\t\tupdate_ref(\"initial pull\", \"HEAD\", remote_head->object.sha1,\n+\t\t\t   NULL, 0, DIE_ON_ERR);\n \t\treturn 0;\n \t} else {\n \t\tstruct strbuf merge_names = STRBUF_INIT;\n@@ -1218,12 +1208,9 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\thead_arg = \"HEAD\";\n \n \t\t/*\n-\t\t * All the rest are the commits being merged;\n-\t\t * prepare the standard merge summary message to\n-\t\t * be appended to the given message.  If remote\n-\t\t * is invalid we will die later in the common\n-\t\t * codepath so we discard the error in this\n-\t\t * loop.\n+\t\t * All the rest are the commits being merged; prepare\n+\t\t * the standard merge summary message to be appended\n+\t\t * to the given message.\n \t\t */\n \t\tfor (i = 0; i < argc; i++)\n \t\t\tmerge_name(argv[i], &merge_names);\n@@ -1251,17 +1238,12 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \tstrbuf_reset(&buf);\n \n \tfor (i = 0; i < argc; i++) {\n-\t\tstruct object *o;\n-\t\tstruct commit *commit;\n-\n-\t\to = want_commit(argv[i]);\n-\t\tif (!o)\n+\t\tstruct commit *commit = get_merge_parent(argv[i]);\n+\t\tif (!commit)\n \t\t\tdie(_(\"%s - not something we can merge\"), argv[i]);\n-\t\tcommit = lookup_commit(o->sha1);\n-\t\tcommit->util = (void *)argv[i];\n \t\tremotes = &commit_list_insert(commit, remotes)->next;\n-\n-\t\tstrbuf_addf(&buf, \"GITHEAD_%s\", sha1_to_hex(o->sha1));\n+\t\tstrbuf_addf(&buf, \"GITHEAD_%s\",\n+\t\t\t    sha1_to_hex(commit->object.sha1));\n \t\tsetenv(buf.buf, argv[i], 1);\n \t\tstrbuf_reset(&buf);\n \t}\n@@ -1307,7 +1289,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\t\t!hashcmp(common->item->object.sha1, head_commit->object.sha1)) {\n \t\t/* Again the most common case of merging one remote. */\n \t\tstruct strbuf msg = STRBUF_INIT;\n-\t\tstruct object *o;\n+\t\tstruct commit *commit;\n \t\tchar hex[41];\n \n \t\tstrcpy(hex, find_unique_abbrev(head_commit->object.sha1, DEFAULT_ABBREV));\n@@ -1321,14 +1303,15 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\tif (have_message)\n \t\t\tstrbuf_addstr(&msg,\n \t\t\t\t\" (no commit created; -m option ignored)\");\n-\t\to = want_commit(sha1_to_hex(remoteheads->item->object.sha1));\n-\t\tif (!o)\n+\t\tcommit = remoteheads->item;\n+\t\tif (!commit)\n \t\t\treturn 1;\n \n-\t\tif (checkout_fast_forward(head_commit->object.sha1, remoteheads->item->object.sha1))\n+\t\tif (checkout_fast_forward(head_commit->object.sha1,\n+\t\t\t\t\t  commit->object.sha1))\n \t\t\treturn 1;\n \n-\t\tfinish(head_commit, o->sha1, msg.buf);\n+\t\tfinish(head_commit, commit->object.sha1, msg.buf);\n \t\tdrop_save();\n \t\treturn 0;\n \t} else if (!remoteheads->next && common->next)\ndiff --git a/commit.c b/commit.c\nindex 73b7e00..83ff503 100644\n--- a/commit.c\n+++ b/commit.c\n@@ -894,3 +894,22 @@ int commit_tree(const char *msg, unsigned char *tree,\n \tstrbuf_release(&buffer);\n \treturn result;\n }\n+\n+struct commit *get_merge_parent(const char *name)\n+{\n+\tstruct object *obj;\n+\tstruct commit *commit;\n+\tunsigned char sha1[20];\n+\tif (get_sha1(name, sha1))\n+\t\treturn NULL;\n+\tobj = parse_object(sha1);\n+\tcommit = (struct commit *)peel_to_type(name, 0, obj, OBJ_COMMIT);\n+\tif (commit && !commit->util) {\n+\t\tstruct merge_remote_desc *desc;\n+\t\tdesc = xmalloc(sizeof(*desc));\n+\t\tdesc->obj = obj;\n+\t\tdesc->name = strdup(name);\n+\t\tcommit->util = desc;\n+\t}\n+\treturn commit;\n+}\ndiff --git a/commit.h b/commit.h\nindex 009b113..5b57eab 100644\n--- a/commit.h\n+++ b/commit.h\n@@ -185,4 +185,17 @@ extern int commit_tree(const char *msg, unsigned char *tree,\n \t\tstruct commit_list *parents, unsigned char *ret,\n \t\tconst char *author);\n \n+struct merge_remote_desc {\n+\tstruct object *obj; /* the named object, could be a tag */\n+\tconst char *name;\n+};\n+#define merge_remote_util(commit) ((struct merge_remote_desc *)((commit)->util))\n+\n+/*\n+ * Given \"name\" from the command line to merge, find the commit object\n+ * and return it, while storing merge_remote_desc in its ->util field,\n+ * to allow callers to tell if we are told to merge a tag.\n+ */\n+struct commit *get_merge_parent(const char *name);\n+\n #endif /* COMMIT_H */\ndiff --git a/merge-recursive.c b/merge-recursive.c\nindex cc664c3..5a2db29 100644\n--- a/merge-recursive.c\n+++ b/merge-recursive.c\n@@ -38,16 +38,15 @@ static struct tree *shift_tree_object(struct tree *one, struct tree *two,\n \treturn lookup_tree(shifted);\n }\n \n-/*\n- * A virtual commit has (const char *)commit->util set to the name.\n- */\n-\n static struct commit *make_virtual_commit(struct tree *tree, const char *comment)\n {\n \tstruct commit *commit = xcalloc(1, sizeof(struct commit));\n+\tstruct merge_remote_desc *desc = xmalloc(sizeof(*desc));\n+\n+\tdesc->name = comment;\n+\tdesc->obj = (struct object *)commit;\n \tcommit->tree = tree;\n-\tcommit->util = (void*)comment;\n-\t/* avoid warnings */\n+\tcommit->util = desc;\n \tcommit->object.parsed = 1;\n \treturn commit;\n }\n@@ -184,7 +183,7 @@ static void output_commit_title(struct merge_options *o, struct commit *commit)\n \tfor (i = o->call_depth; i--;)\n \t\tfputs(\"  \", stdout);\n \tif (commit->util)\n-\t\tprintf(\"virtual %s\\n\", (char *)commit->util);\n+\t\tprintf(\"virtual %s\\n\", merge_remote_util(commit)->name);\n \telse {\n \t\tprintf(\"%s \", find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV));\n \t\tif (parse_commit(commit) != 0)\n-- \n1.7.8.rc0.128.g31aa4\n"},{"id":"179110","messageId":"1320721245-13223-11-git-send-email-gitster@pobox.com","threadId":"28845","inReplyTo":"1320721245-13223-1-git-send-email-gitster@pobox.com","subject":"[PATCH v2 10/12] merge: record tag objects without peeling in MERGE_HEAD","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-08T03:00:43Z","receivedAt":"2011-11-08T03:00:43Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Otherwise, \"git commit\" wouldn't have a way to tell that we were in the\nmiddle of merging an annotated or signed tag, not a plain commit, after\n\"git merge\" stops to ask the user to resolve conflicts.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin/merge.c  |   13 ++++++++++---\n t/t7600-merge.sh |    6 +++++-\n 2 files changed, 15 insertions(+), 4 deletions(-)\n\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex 8d4eb4e..7158e8e 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -1045,9 +1045,16 @@ static void write_merge_state(void)\n \tstruct commit_list *j;\n \tstruct strbuf buf = STRBUF_INIT;\n \n-\tfor (j = remoteheads; j; j = j->next)\n-\t\tstrbuf_addf(&buf, \"%s\\n\",\n-\t\t\tsha1_to_hex(j->item->object.sha1));\n+\tfor (j = remoteheads; j; j = j->next) {\n+\t\tunsigned const char *sha1;\n+\t\tstruct commit *c = j->item;\n+\t\tif (c->util && merge_remote_util(c)->obj) {\n+\t\t\tsha1 = merge_remote_util(c)->obj->sha1;\n+\t\t} else {\n+\t\t\tsha1 = c->object.sha1;\n+\t\t}\n+\t\tstrbuf_addf(&buf, \"%s\\n\", sha1_to_hex(sha1));\n+\t}\n \tfd = open(git_path(\"MERGE_HEAD\"), O_WRONLY | O_CREAT, 0666);\n \tif (fd < 0)\n \t\tdie_errno(_(\"Could not open '%s' for writing\"),\ndiff --git a/t/t7600-merge.sh b/t/t7600-merge.sh\nindex b91d022..5d8c428 100755\n--- a/t/t7600-merge.sh\n+++ b/t/t7600-merge.sh\n@@ -96,7 +96,11 @@ verify_parents () {\n \n verify_mergeheads () {\n \tprintf '%s\\n' \"$@\" >mergehead.expected &&\n-\ttest_cmp mergehead.expected .git/MERGE_HEAD\n+\twhile read sha1 rest\n+\tdo\n+\t\tgit rev-parse $sha1\n+\tdone <.git/MERGE_HEAD >mergehead.actual &&\n+\ttest_cmp mergehead.expected mergehead.actual\n }\n \n verify_no_mergehead () {\n-- \n1.7.8.rc0.128.g31aa4\n"},{"id":"179108","messageId":"1320721245-13223-12-git-send-email-gitster@pobox.com","threadId":"28845","inReplyTo":"1320721245-13223-1-git-send-email-gitster@pobox.com","subject":"[PATCH v2 11/12] commit: copy merged signed tags to headers of merge commit","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-08T03:00:44Z","receivedAt":"2011-11-08T03:00:44Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Now MERGE_HEAD records the tag objects without peeling, we could record\nthe result of manual conflict resolution via \"git commit\" without losing\nthe tag information.\n\nIn hindsight, it would have been better to make \"merge --continue\" as the\nway to continue from such an interrupted merge, not \"commit\", but this is\na backward compatibility baggage we would need to carry around for now.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin/commit.c |   10 +++++-----\n commit.c         |   46 +++++++++++++++++++++++++++++++++++++++++++++-\n 2 files changed, 50 insertions(+), 6 deletions(-)\n\ndiff --git a/builtin/commit.c b/builtin/commit.c\nindex c46f2d1..4688a73 100644\n--- a/builtin/commit.c\n+++ b/builtin/commit.c\n@@ -1425,7 +1425,6 @@ int cmd_commit(int argc, const char **argv, const char *prefix)\n \t\t\tpptr = &commit_list_insert(c->item, pptr)->next;\n \t} else if (whence == FROM_MERGE) {\n \t\tstruct strbuf m = STRBUF_INIT;\n-\t\tstruct commit *commit;\n \t\tFILE *fp;\n \n \t\tif (!reflog_msg)\n@@ -1436,11 +1435,12 @@ int cmd_commit(int argc, const char **argv, const char *prefix)\n \t\t\tdie_errno(_(\"could not open '%s' for reading\"),\n \t\t\t\t  git_path(\"MERGE_HEAD\"));\n \t\twhile (strbuf_getline(&m, fp, '\\n') != EOF) {\n-\t\t\tunsigned char sha1[20];\n-\t\t\tif (get_sha1_hex(m.buf, sha1) < 0)\n+\t\t\tstruct commit *parent;\n+\n+\t\t\tparent = get_merge_parent(m.buf);\n+\t\t\tif (!parent)\n \t\t\t\tdie(_(\"Corrupt MERGE_HEAD file (%s)\"), m.buf);\n-\t\t\tcommit = lookup_commit_or_die(sha1, \"MERGE_HEAD\");\n-\t\t\tpptr = &commit_list_insert(commit, pptr)->next;\n+\t\t\tpptr = &commit_list_insert(parent, pptr)->next;\n \t\t}\n \t\tfclose(fp);\n \t\tstrbuf_release(&m);\ndiff --git a/commit.c b/commit.c\nindex 83ff503..7d471a3 100644\n--- a/commit.c\n+++ b/commit.c\n@@ -840,6 +840,41 @@ struct commit_list *reduce_heads(struct commit_list *heads)\n \treturn result;\n }\n \n+static void handle_signed_tag(struct strbuf *signed_tags, struct commit *parent)\n+{\n+\tstruct merge_remote_desc *desc;\n+\tstruct strbuf sig = STRBUF_INIT;\n+\tchar *buf;\n+\tunsigned long size, len;\n+\tenum object_type type;\n+\n+\tdesc = merge_remote_util(parent);\n+\tif (!desc || !desc->obj)\n+\t\treturn;\n+\tbuf = read_sha1_file(desc->obj->sha1, &type, &size);\n+\tif (!buf || type != OBJ_TAG)\n+\t\tgoto free_return;\n+\tlen = parse_signature(buf, size);\n+\tif (size == len)\n+\t\tgoto free_return;\n+\t/*\n+\t * We could verify this signature again and either omit writing\n+\t * the contents of the tag when it does not validate, but the\n+\t * integrator may not have the public key of the signer of the\n+\t * tag he is merging, while a later auditor may acquire the public\n+\t * key while auditing, so let's not run verify-signed-buffer here\n+\t * for now...\n+\t *\n+\t * if (verify_signed_buffer(buf, len, buf + len, size - len, &sig))\n+\t *\twarn(\"warning: signed tag unverified.\");\n+\t */\n+\tstrbuf_add_lines(signed_tags, \"mergetag \", buf, size);\n+\n+free_return:\n+\tstrbuf_release(&sig);\n+\tfree(buf);\n+}\n+\n static const char commit_utf8_warn[] =\n \"Warning: commit message does not conform to UTF-8.\\n\"\n \"You may want to amend it after fixing the message, or set the config\\n\"\n@@ -852,6 +887,7 @@ int commit_tree(const char *msg, unsigned char *tree,\n \tint result;\n \tint encoding_is_utf8;\n \tstruct strbuf buffer;\n+\tstruct strbuf signed_tags = STRBUF_INIT;\n \n \tassert_sha1_type(tree, OBJ_TREE);\n \n@@ -868,8 +904,11 @@ int commit_tree(const char *msg, unsigned char *tree,\n \t */\n \twhile (parents) {\n \t\tstruct commit_list *next = parents->next;\n+\t\tstruct commit *parent = parents->item;\n+\n \t\tstrbuf_addf(&buffer, \"parent %s\\n\",\n-\t\t\tsha1_to_hex(parents->item->object.sha1));\n+\t\t\t    sha1_to_hex(parent->object.sha1));\n+\t\thandle_signed_tag(&signed_tags, parent);\n \t\tfree(parents);\n \t\tparents = next;\n \t}\n@@ -881,6 +920,11 @@ int commit_tree(const char *msg, unsigned char *tree,\n \tstrbuf_addf(&buffer, \"committer %s\\n\", git_committer_info(IDENT_ERROR_ON_NO_NAME));\n \tif (!encoding_is_utf8)\n \t\tstrbuf_addf(&buffer, \"encoding %s\\n\", git_commit_encoding);\n+\n+\tif (signed_tags.len) {\n+\t\tstrbuf_addbuf(&buffer, &signed_tags);\n+\t\tstrbuf_release(&signed_tags);\n+\t}\n \tstrbuf_addch(&buffer, '\\n');\n \n \t/* And add the comment */\n-- \n1.7.8.rc0.128.g31aa4\n"},{"id":"179109","messageId":"1320721245-13223-13-git-send-email-gitster@pobox.com","threadId":"28845","inReplyTo":"1320721245-13223-1-git-send-email-gitster@pobox.com","subject":"[PATCH v2 12/12] merge: force edit mode when merging a tag object","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-08T03:00:45Z","receivedAt":"2011-11-08T03:00:45Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Now that we allow pulling a tag from the remote site to validate the\nauthenticity, we should give the user the final chance to verify and\nedit the merge message.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin/merge.c |    4 ++++\n 1 files changed, 4 insertions(+), 0 deletions(-)\n\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex 7158e8e..3b3e374 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -1253,6 +1253,10 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\t\t    sha1_to_hex(commit->object.sha1));\n \t\tsetenv(buf.buf, argv[i], 1);\n \t\tstrbuf_reset(&buf);\n+\t\tif (merge_remote_util(commit) &&\n+\t\t    merge_remote_util(commit)->obj &&\n+\t\t    merge_remote_util(commit)->obj->type == OBJ_TAG)\n+\t\t\toption_edit = 1;\n \t}\n \n \tif (!use_strategies) {\n-- \n1.7.8.rc0.128.g31aa4\n"},{"id":"179114","messageId":"CA+55aFxVsgNjGv2zAGR1VK34uG59+euJec_3i9JNyQ0VUdjyeA@mail.gmail.com","threadId":"28845","inReplyTo":"1320721245-13223-1-git-send-email-gitster@pobox.com","subject":"Re: [PATCH v2 00/12] Pulling signed/annotated tags","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2011-11-08T04:20:35Z","receivedAt":"2011-11-08T04:20:35Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"On Mon, Nov 7, 2011 at 7:00 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> This is a re-roll of the fourth iteration.\n\nOk, this all looks fine to me.\n\nClean series, and everything looks fine.\n\nThe one thing I wondered about is what happens when you merge two\nsigned tags. Maybe I read the patch wrong, but it *looks* to me like\nthe code just appends them all together with nothing in between. Is it\nstill parseable?\n\nI guess I could just try it out .. ;)\n\n         Linus\n"},{"id":"179115","messageId":"7vsjlzyza7.fsf@alter.siamese.dyndns.org","threadId":"28845","inReplyTo":"CA+55aFxVsgNjGv2zAGR1VK34uG59+euJec_3i9JNyQ0VUdjyeA@mail.gmail.com","subject":"Re: [PATCH v2 00/12] Pulling signed/annotated tags","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-08T05:10:56Z","receivedAt":"2011-11-08T05:10:56Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@linux-foundation.org> writes:\n\n> On Mon, Nov 7, 2011 at 7:00 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>> This is a re-roll of the fourth iteration.\n>\n> Ok, this all looks fine to me.\n>\n> Clean series, and everything looks fine.\n>\n> The one thing I wondered about is what happens when you merge two\n> signed tags. Maybe I read the patch wrong, but it *looks* to me like\n> the code just appends them all together with nothing in between. Is it\n> still parseable?\n\nEek.\n\nThe mergetag stuff is a dump of \"cat-file tag\" so if you have a line that\nbegins with \"object \" the parsing side (which does not exist yet) would\nhave trouble. We would need to devise e.g. adding number of lines at the\nbeginning, or something.\n"},{"id":"179116","messageId":"CA+55aFyEuuT25m00uakL66YKSpT-zjoiBreymFSbuHmtARq6yw@mail.gmail.com","threadId":"28845","inReplyTo":"7vsjlzyza7.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH v2 00/12] Pulling signed/annotated tags","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2011-11-08T05:31:05Z","receivedAt":"2011-11-08T05:31:05Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"On Mon, Nov 7, 2011 at 9:10 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>\n> Eek.\n>\n> The mergetag stuff is a dump of \"cat-file tag\" so if you have a line that\n> begins with \"object \" the parsing side (which does not exist yet) would\n> have trouble. We would need to devise e.g. adding number of lines at the\n> beginning, or something.\n\nMight I suggest making it simpler still to parse?\n\nChange \"strbuf_add_lines()\" to have two *different* prefixes: one for\nthe first line, and one for \"continuation lines\".\n\nThen you can just use the same prefix if you want to - and get the\nsemantics you have now for that helper.\n\nBut instead of just having \"mergetag\" as the prefix for all the lines\ncopied from the merge, wouldn't it be nice and easy to have \"mergetag\"\nas the prefix for the *first* line of each copied tag, but then have\nsome other tag for lines 2..n?\n\nI think that would be *way* easier to parse, and I think something\nlike that could be a good generic model for any multi-line thing -\nhave the first line tagged, and the rest have just the continuation\nmarker. You don't really need to repeat the tag over and over again\neach line, it just causes ambiguoity as shown by this example.\n\nBut I don't have any really strong opinions on it. I just think it's a\ngood idea to make it easy to parse both mechanically and\nhuman-visually, and \"number of lines\" doesn't strike me as being very\nhuman-friendly.\n\n         Linus\n"},{"id":"179120","messageId":"7vobwnyy2m.fsf@alter.siamese.dyndns.org","threadId":"28845","inReplyTo":"CA+55aFyEuuT25m00uakL66YKSpT-zjoiBreymFSbuHmtARq6yw@mail.gmail.com","subject":"Re: [PATCH v2 00/12] Pulling signed/annotated tags","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-08T05:37:05Z","receivedAt":"2011-11-08T05:37:05Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@linux-foundation.org> writes:\n\n> But I don't have any really strong opinions on it. I just think it's a\n> good idea to make it easy to parse both mechanically and\n> human-visually, and \"number of lines\" doesn't strike me as being very\n> human-friendly.\n\nHere is what I had in mind. An empty line in the tag payload would become\n\"mergetag \\n\" and a separate would become \"mergetag\\n\". The consumer of\n\"cat-file commit\" would be able to tell between the two anyway and if a\nhuman _really_ cares, s/he can pipe it to \"cat -e\" or something.\n\nHonestly, I do not care too much about human readability of \"mergetag\"\nheader. We could even store zlib-deflate-and-then-base85 the payload,\nwhich _might_ be a better solution. For one thing, it would protect us\nfrom potential NUL in the tag payload ;-).\n\n\n commit.c |    2 ++\n 1 files changed, 2 insertions(+), 0 deletions(-)\n\ndiff --git a/commit.c b/commit.c\nindex 7d471a3..6a5d40e 100644\n--- a/commit.c\n+++ b/commit.c\n@@ -868,6 +868,8 @@ static void handle_signed_tag(struct strbuf *signed_tags, struct commit *parent)\n \t * if (verify_signed_buffer(buf, len, buf + len, size - len, &sig))\n \t *\twarn(\"warning: signed tag unverified.\");\n \t */\n+\tif (signed_tags->len)\n+\t\tstrbuf_addstr(signed_tags, \"mergetag\\n\");\n \tstrbuf_add_lines(signed_tags, \"mergetag \", buf, size);\n \n free_return:\n"},{"id":"179165","messageId":"7v39dyxp8k.fsf@alter.siamese.dyndns.org","threadId":"28845","inReplyTo":"7vobwnyy2m.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH v2 00/12] Pulling signed/annotated tags","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-08T21:45:31Z","receivedAt":"2011-11-08T21:45:31Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Here is what I had in mind....\n\nAnd then I changed my mind again. Using a single SP indent for multi-line\nheader fields make things easy to view.\n\n| tree 20009beb1d5d0494347db5afbe80b364563dd511\n| parent 8457d13895251ebf2f839ee6f74dd0087fb56334\n| parent 6486ca6d77eaf4109b26b70da0b3a0158868e22f\n| author Junio C Hamano <gitster@pobox.com> 1320781099 -0800\n| committer Junio C Hamano <gitster@pobox.com> 1320781099 -0800\n| mergetag object 6486ca6d77eaf4109b26b70da0b3a0158868e22f\n|  type commit\n|  tag test-tag\n|  tagger Junio C Hamano <gitster@pobox.com> 1320471226 -0700\n|  \n|  test merge\n|  -----BEGIN PGP SIGNATURE-----\n|  Version: GnuPG v1.4.10 (GNU/Linux)\n|  \n|  iQIcBAABAgAGBQJOtMq7AAoJELC16IaWr+bLL30P/iEhPR+gkOpF09EshWZy7Vbu\n|  ...\n|  =eJX/\n|  -----END PGP SIGNATURE-----\n| \n| Merge tag 'test-tag' of ../git into HEAD\n| \n| test merge\n\nI am redoing the \"signed-commit\" series to also use this format.\n\nThe way I made the tag available to commit_tree() turned out to be a bit\ntoo clever, by the way, and it would cause problems down the road when\nthese things need to be amended. Embedded \"gpgsig\" in a commit is about\nthe commit itself, and should not be carried over, but \"mergetag\" is about\nthe parent and should not be lost only because you wanted to fix a type\nin your merge log message. I'll be redoing that part in the series and\nhopefully the finished result would be ready for review after 1.7.8 final.\n"}]}