{"thread":{"id":"17372","subject":"[PATCH 2/3] Make has_commit non-static","startedAt":"2009-01-26T14:13:23Z","lastAt":"2009-02-03T15:08:58Z","messageCount":9,"participants":["Jake Goulding","Johannes Schindelin","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"101988","messageId":"1232979205-17161-1-git-send-email-goulding@vivisimo.com","threadId":"17372","inReplyTo":null,"subject":"[PATCH 1/3] Make opt_parse_with_commit non-static","fromName":"Jake Goulding","fromEmail":"goulding@vivisimo.com","sentAt":"2009-01-26T14:13:23Z","receivedAt":"2009-01-26T14:13:23Z","isPatch":true,"sender":{"key":"goulding@vivisimo.com","avatar":"https://gravatar.com/avatar/d8938ff226c618b80857e27f7e0a2d4335215bfb9733c321b8dd30c660b7f1e9?d=mp&s=160"},"body":"Moving opt_parse_with_commit from branch to a common location in\npreparation for using it in tag. Renamed it to correspond to naming\nconvention of other option parsing functions.\n\nSigned-off-by: Jake Goulding <goulding@vivisimo.com>\n---\n builtin-branch.c |   20 ++------------------\n parse-options.c  |   17 +++++++++++++++++\n parse-options.h  |    1 +\n 3 files changed, 20 insertions(+), 18 deletions(-)\n\ndiff --git a/builtin-branch.c b/builtin-branch.c\nindex 02fa38f..82d6fb2 100644\n--- a/builtin-branch.c\n+++ b/builtin-branch.c\n@@ -466,22 +466,6 @@ static void rename_branch(const char *oldname, const char *newname, int force)\n \tstrbuf_release(&newsection);\n }\n \n-static int opt_parse_with_commit(const struct option *opt, const char *arg, int unset)\n-{\n-\tunsigned char sha1[20];\n-\tstruct commit *commit;\n-\n-\tif (!arg)\n-\t\treturn -1;\n-\tif (get_sha1(arg, sha1))\n-\t\tdie(\"malformed object name %s\", arg);\n-\tcommit = lookup_commit_reference(sha1);\n-\tif (!commit)\n-\t\tdie(\"no such commit %s\", arg);\n-\tcommit_list_insert(commit, opt->value);\n-\treturn 0;\n-}\n-\n static int opt_parse_merge_filter(const struct option *opt, const char *arg, int unset)\n {\n \tmerge_filter = ((opt->long_name[0] == 'n')\n@@ -517,13 +501,13 @@ int cmd_branch(int argc, const char **argv, const char *prefix)\n \t\t\tOPTION_CALLBACK, 0, \"contains\", &with_commit, \"commit\",\n \t\t\t\"print only branches that contain the commit\",\n \t\t\tPARSE_OPT_LASTARG_DEFAULT,\n-\t\t\topt_parse_with_commit, (intptr_t)\"HEAD\",\n+\t\t\tparse_opt_with_commit, (intptr_t)\"HEAD\",\n \t\t},\n \t\t{\n \t\t\tOPTION_CALLBACK, 0, \"with\", &with_commit, \"commit\",\n \t\t\t\"print only branches that contain the commit\",\n \t\t\tPARSE_OPT_HIDDEN | PARSE_OPT_LASTARG_DEFAULT,\n-\t\t\topt_parse_with_commit, (intptr_t) \"HEAD\",\n+\t\t\tparse_opt_with_commit, (intptr_t) \"HEAD\",\n \t\t},\n \t\tOPT__ABBREV(&abbrev),\n \ndiff --git a/parse-options.c b/parse-options.c\nindex 9eb55cc..4c5d09d 100644\n--- a/parse-options.c\n+++ b/parse-options.c\n@@ -1,6 +1,7 @@\n #include \"git-compat-util.h\"\n #include \"parse-options.h\"\n #include \"cache.h\"\n+#include \"commit.h\"\n \n #define OPT_SHORT 1\n #define OPT_UNSET 2\n@@ -506,6 +507,22 @@ int parse_opt_verbosity_cb(const struct option *opt, const char *arg,\n \treturn 0;\n }\n \n+int parse_opt_with_commit(const struct option *opt, const char *arg, int unset)\n+{\n+\tunsigned char sha1[20];\n+\tstruct commit *commit;\n+\n+\tif (!arg)\n+\t\treturn -1;\n+\tif (get_sha1(arg, sha1))\n+\t\treturn error(\"malformed object name %s\", arg);\n+\tcommit = lookup_commit_reference(sha1);\n+\tif (!commit)\n+\t\treturn error(\"no such commit %s\", arg);\n+\tcommit_list_insert(commit, opt->value);\n+\treturn 0;\n+}\n+\n /*\n  * This should really be OPTION_FILENAME type as a part of\n  * parse_options that take prefix to do this while parsing.\ndiff --git a/parse-options.h b/parse-options.h\nindex 034162e..9122905 100644\n--- a/parse-options.h\n+++ b/parse-options.h\n@@ -151,6 +151,7 @@ extern int parse_options_end(struct parse_opt_ctx_t *ctx);\n extern int parse_opt_abbrev_cb(const struct option *, const char *, int);\n extern int parse_opt_approxidate_cb(const struct option *, const char *, int);\n extern int parse_opt_verbosity_cb(const struct option *, const char *, int);\n+extern int parse_opt_with_commit(const struct option *, const char *, int);\n \n #define OPT__VERBOSE(var)  OPT_BOOLEAN('v', \"verbose\", (var), \"be verbose\")\n #define OPT__QUIET(var)    OPT_BOOLEAN('q', \"quiet\",   (var), \"be quiet\")\n-- \n1.6.0.6\n"},{"id":"101986","messageId":"1232979205-17161-2-git-send-email-goulding@vivisimo.com","threadId":"17372","inReplyTo":"1232979205-17161-1-git-send-email-goulding@vivisimo.com","subject":"[PATCH 2/3] Make has_commit non-static","fromName":"Jake Goulding","fromEmail":"goulding@vivisimo.com","sentAt":"2009-01-26T14:13:24Z","receivedAt":"2009-01-26T14:13:24Z","isPatch":true,"sender":{"key":"goulding@vivisimo.com","avatar":"https://gravatar.com/avatar/d8938ff226c618b80857e27f7e0a2d4335215bfb9733c321b8dd30c660b7f1e9?d=mp&s=160"},"body":"Moving has_commit from branch to a common location in preparation for\nusing it in tag. Renaming it to commit_has_any_in_commit_list to be\nmore unique.\n\nSigned-off-by: Jake Goulding <goulding@vivisimo.com>\n---\n\nFunction renamed to less-generic name as suggested by Junio.\n\n builtin-branch.c |   20 +++-----------------\n commit.c         |   16 ++++++++++++++++\n commit.h         |    1 +\n 3 files changed, 20 insertions(+), 17 deletions(-)\n\ndiff --git a/builtin-branch.c b/builtin-branch.c\nindex 82d6fb2..a30ef76 100644\n--- a/builtin-branch.c\n+++ b/builtin-branch.c\n@@ -193,21 +193,6 @@ struct ref_list {\n \tint kinds;\n };\n \n-static int has_commit(struct commit *commit, struct commit_list *with_commit)\n-{\n-\tif (!with_commit)\n-\t\treturn 1;\n-\twhile (with_commit) {\n-\t\tstruct commit *other;\n-\n-\t\tother = with_commit->item;\n-\t\twith_commit = with_commit->next;\n-\t\tif (in_merge_bases(other, &commit, 1))\n-\t\t\treturn 1;\n-\t}\n-\treturn 0;\n-}\n-\n static int append_ref(const char *refname, const unsigned char *sha1, int flags, void *cb_data)\n {\n \tstruct ref_list *ref_list = (struct ref_list*)(cb_data);\n@@ -231,7 +216,7 @@ static int append_ref(const char *refname, const unsigned char *sha1, int flags,\n \t\treturn error(\"branch '%s' does not point at a commit\", refname);\n \n \t/* Filter with with_commit if specified */\n-\tif (!has_commit(commit, ref_list->with_commit))\n+\tif (!commit_has_any_in_commit_list(commit, ref_list->with_commit))\n \t\treturn 0;\n \n \t/* Don't add types the caller doesn't want */\n@@ -401,7 +386,8 @@ static void print_ref_list(int kinds, int detached, int verbose, int abbrev, str\n \tqsort(ref_list.list, ref_list.index, sizeof(struct ref_item), ref_cmp);\n \n \tdetached = (detached && (kinds & REF_LOCAL_BRANCH));\n-\tif (detached && head_commit && has_commit(head_commit, with_commit)) {\n+\tif (detached && head_commit &&\n+\t    commit_has_any_in_commit_list(head_commit, with_commit)) {\n \t\tstruct ref_item item;\n \t\titem.name = xstrdup(\"(no branch)\");\n \t\titem.kind = REF_LOCAL_BRANCH;\ndiff --git a/commit.c b/commit.c\nindex c99db16..97c8a8a 100644\n--- a/commit.c\n+++ b/commit.c\n@@ -705,6 +705,22 @@ struct commit_list *get_merge_bases(struct commit *one, struct commit *two,\n \treturn get_merge_bases_many(one, 1, &two, cleanup);\n }\n \n+int commit_has_any_in_commit_list(struct commit *commit,\n+\t\t\t\t  struct commit_list *with_commit)\n+{\n+\tif (!with_commit)\n+\t\treturn 1;\n+\twhile (with_commit) {\n+\t\tstruct commit *other;\n+\n+\t\tother = with_commit->item;\n+\t\twith_commit = with_commit->next;\n+\t\tif (in_merge_bases(other, &commit, 1))\n+\t\t\treturn 1;\n+\t}\n+\treturn 0;\n+}\n+\n int in_merge_bases(struct commit *commit, struct commit **reference, int num)\n {\n \tstruct commit_list *bases, *b;\ndiff --git a/commit.h b/commit.h\nindex 3a7b06a..4084102 100644\n--- a/commit.h\n+++ b/commit.h\n@@ -133,6 +133,7 @@ extern int is_repository_shallow(void);\n extern struct commit_list *get_shallow_commits(struct object_array *heads,\n \t\tint depth, int shallow_flag, int not_shallow_flag);\n \n+int commit_has_any_in_commit_list(struct commit *, struct commit_list *);\n int in_merge_bases(struct commit *, struct commit **, int);\n \n extern int interactive_add(int argc, const char **argv, const char *prefix);\n-- \n1.6.0.6\n"},{"id":"101987","messageId":"1232979205-17161-3-git-send-email-goulding@vivisimo.com","threadId":"17372","inReplyTo":"1232979205-17161-2-git-send-email-goulding@vivisimo.com","subject":"[PATCH 3/3] Add --contains flag to git tag","fromName":"Jake Goulding","fromEmail":"goulding@vivisimo.com","sentAt":"2009-01-26T14:13:25Z","receivedAt":"2009-01-26T14:13:25Z","isPatch":true,"sender":{"key":"goulding@vivisimo.com","avatar":"https://gravatar.com/avatar/d8938ff226c618b80857e27f7e0a2d4335215bfb9733c321b8dd30c660b7f1e9?d=mp&s=160"},"body":"This functions similar to git branch --contains - it will show all\ntags that contain the specified commit. Indeed, it uses the same\nlookup mechanisms as git branch.\n\nAlso adding documentation and tests for new option.\n\nSigned-off-by: Jake Goulding <goulding@vivisimo.com>\n---\n\nUpdated error semantics as suggested by Junio.\n\n Documentation/git-tag.txt |    5 ++-\n builtin-tag.c             |   30 +++++++++++-\n t/t7004-tag.sh            |  115 +++++++++++++++++++++++++++++++++++++++++++++\n 3 files changed, 147 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt\nindex e44f543..533d18b 100644\n--- a/Documentation/git-tag.txt\n+++ b/Documentation/git-tag.txt\n@@ -12,7 +12,7 @@ SYNOPSIS\n 'git tag' [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]\n \t<name> [<commit> | <object>]\n 'git tag' -d <name>...\n-'git tag' [-n[<num>]] -l [<pattern>]\n+'git tag' [-n[<num>]] -l [--contains <commit>] [<pattern>]\n 'git tag' -v <name>...\n \n DESCRIPTION\n@@ -68,6 +68,9 @@ OPTIONS\n \tList tags with names that match the given pattern (or all if no pattern is given).\n \tTyping \"git tag\" without arguments, also lists all tags.\n \n+--contains <commit>::\n+\tOnly list tags which contain the specified commit.\n+\n -m <msg>::\n \tUse the given tag message (instead of prompting).\n \tIf multiple `-m` options are given, their values are\ndiff --git a/builtin-tag.c b/builtin-tag.c\nindex a398499..17082de 100644\n--- a/builtin-tag.c\n+++ b/builtin-tag.c\n@@ -26,6 +26,7 @@ static char signingkey[1000];\n struct tag_filter {\n \tconst char *pattern;\n \tint lines;\n+\tstruct commit_list *with_commit;\n };\n \n #define PGP_SIGNATURE \"-----BEGIN PGP SIGNATURE-----\"\n@@ -42,6 +43,17 @@ static int show_reference(const char *refname, const unsigned char *sha1,\n \t\tchar *buf, *sp, *eol;\n \t\tsize_t len;\n \n+\t\tif (filter->with_commit) {\n+\t\t\tstruct commit *commit;\n+\n+\t\t\tcommit = lookup_commit_reference_gently(sha1, 1);\n+\t\t\tif (!commit)\n+\t\t\t\treturn 0;\n+\t\t\tif (!commit_has_any_in_commit_list(commit,\n+\t\t\t\t\t\t\t   filter->with_commit))\n+\t\t\t\treturn 0;\n+\t\t}\n+\n \t\tif (!filter->lines) {\n \t\t\tprintf(\"%s\\n\", refname);\n \t\t\treturn 0;\n@@ -79,7 +91,8 @@ static int show_reference(const char *refname, const unsigned char *sha1,\n \treturn 0;\n }\n \n-static int list_tags(const char *pattern, int lines)\n+static int list_tags(const char *pattern, int lines,\n+\t\t\tstruct commit_list *with_commit)\n {\n \tstruct tag_filter filter;\n \n@@ -88,6 +101,7 @@ static int list_tags(const char *pattern, int lines)\n \n \tfilter.pattern = pattern;\n \tfilter.lines = lines;\n+\tfilter.with_commit = with_commit;\n \n \tfor_each_tag_ref(show_reference, (void *) &filter);\n \n@@ -360,6 +374,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)\n \t\tlist = 0, delete = 0, verify = 0;\n \tconst char *msgfile = NULL, *keyid = NULL;\n \tstruct msg_arg msg = { 0, STRBUF_INIT };\n+\tstruct commit_list *with_commit = NULL;\n \tstruct option options[] = {\n \t\tOPT_BOOLEAN('l', NULL, &list, \"list tag names\"),\n \t\t{ OPTION_INTEGER, 'n', NULL, &lines, NULL,\n@@ -378,6 +393,14 @@ int cmd_tag(int argc, const char **argv, const char *prefix)\n \t\tOPT_STRING('u', NULL, &keyid, \"key-id\",\n \t\t\t\t\t\"use another key to sign the tag\"),\n \t\tOPT_BOOLEAN('f', NULL, &force, \"replace the tag if exists\"),\n+\n+\t\tOPT_GROUP(\"Tag listing options\"),\n+\t\t{\n+\t\t\tOPTION_CALLBACK, 0, \"contains\", &with_commit, \"commit\",\n+\t\t\t\"print only tags that contain the commit\",\n+\t\t\tPARSE_OPT_LASTARG_DEFAULT,\n+\t\t\tparse_opt_with_commit, (intptr_t)\"HEAD\",\n+\t\t},\n \t\tOPT_END()\n \t};\n \n@@ -402,9 +425,12 @@ int cmd_tag(int argc, const char **argv, const char *prefix)\n \tif (list + delete + verify > 1)\n \t\tusage_with_options(git_tag_usage, options);\n \tif (list)\n-\t\treturn list_tags(argv[0], lines == -1 ? 0 : lines);\n+\t\treturn list_tags(argv[0], lines == -1 ? 0 : lines,\n+\t\t\t\t with_commit);\n \tif (lines != -1)\n \t\tdie(\"-n option is only allowed with -l.\");\n+\tif (with_commit)\n+\t\tdie(\"--contains option is only allowed with -l.\");\n \tif (delete)\n \t\treturn for_each_tag_name(argv, delete_tag);\n \tif (verify)\ndiff --git a/t/t7004-tag.sh b/t/t7004-tag.sh\nindex f377fea..69501e2 100755\n--- a/t/t7004-tag.sh\n+++ b/t/t7004-tag.sh\n@@ -1090,6 +1090,121 @@ test_expect_success 'filename for the message is relative to cwd' '\n \tgit cat-file tag tag-from-subdir-2 | grep \"in sub directory\"\n '\n \n+# create a few more commits to test --contains\n+\n+hash1=$(git rev-parse HEAD)\n+\n+test_expect_success 'creating second commit and tag' '\n+\techo foo-2.0 >foo &&\n+\tgit add foo &&\n+\tgit commit -m second\n+\tgit tag v2.0\n+'\n+\n+hash2=$(git rev-parse HEAD)\n+\n+test_expect_success 'creating third commit without tag' '\n+\techo foo-dev >foo &&\n+\tgit add foo &&\n+\tgit commit -m third\n+'\n+\n+hash3=$(git rev-parse HEAD)\n+\n+# simple linear checks of --continue\n+\n+cat > expected <<EOF\n+v0.2.1\n+v1.0\n+v1.0.1\n+v1.1.3\n+v2.0\n+EOF\n+\n+test_expect_success 'checking that first commit is in all tags (hash)' \"\n+\tgit tag -l --contains $hash1 v* >actual\n+\ttest_cmp expected actual\n+\"\n+\n+# other ways of specifying the commit\n+test_expect_success 'checking that first commit is in all tags (tag)' \"\n+\tgit tag -l --contains v1.0 v* >actual\n+\ttest_cmp expected actual\n+\"\n+\n+test_expect_success 'checking that first commit is in all tags (relative)' \"\n+\tgit tag -l --contains HEAD~2 v* >actual\n+\ttest_cmp expected actual\n+\"\n+\n+cat > expected <<EOF\n+v2.0\n+EOF\n+\n+test_expect_success 'checking that second commit only has one tag' \"\n+\tgit tag -l --contains $hash2 v* >actual\n+\ttest_cmp expected actual\n+\"\n+\n+\n+cat > expected <<EOF\n+EOF\n+\n+test_expect_success 'checking that third commit has no tags' \"\n+\tgit tag -l --contains $hash3 v* >actual\n+\ttest_cmp expected actual\n+\"\n+\n+# how about a simple merge?\n+\n+test_expect_success 'creating simple branch' '\n+\tgit branch stable v2.0 &&\n+        git checkout stable &&\n+\techo foo-3.0 > foo &&\n+\tgit commit foo -m fourth\n+\tgit tag v3.0\n+'\n+\n+hash4=$(git rev-parse HEAD)\n+\n+cat > expected <<EOF\n+v3.0\n+EOF\n+\n+test_expect_success 'checking that branch head only has one tag' \"\n+\tgit tag -l --contains $hash4 v* >actual\n+\ttest_cmp expected actual\n+\"\n+\n+test_expect_success 'merging original branch into this branch' '\n+\tgit merge --strategy=ours master &&\n+        git tag v4.0\n+'\n+\n+cat > expected <<EOF\n+v4.0\n+EOF\n+\n+test_expect_success 'checking that original branch head has one tag now' \"\n+\tgit tag -l --contains $hash3 v* >actual\n+\ttest_cmp expected actual\n+\"\n+\n+cat > expected <<EOF\n+v0.2.1\n+v1.0\n+v1.0.1\n+v1.1.3\n+v2.0\n+v3.0\n+v4.0\n+EOF\n+\n+test_expect_success 'checking that initial commit is in all tags' \"\n+\tgit tag -l --contains $hash1 v* >actual\n+\ttest_cmp expected actual\n+\"\n+\n # mixing modes and options:\n \n test_expect_success 'mixing incompatibles modes and options is forbidden' '\n-- \n1.6.0.6\n"},{"id":"101994","messageId":"alpine.DEB.1.00.0901261637300.25749@intel-tinevez-2-302","threadId":"17372","inReplyTo":"1232979205-17161-2-git-send-email-goulding@vivisimo.com","subject":"Re: [PATCH 2/3] Make has_commit non-static","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-01-26T15:38:22Z","receivedAt":"2009-01-26T15:38:22Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 26 Jan 2009, Jake Goulding wrote:\n\n> Moving has_commit from branch to a common location in preparation for \n> using it in tag. Renaming it to commit_has_any_in_commit_list to be more \n> unique.\n\nI feel like bike-shedding for a change, and I'd also like to prove that \nnot all Germans like long names:\n\n\tis_ancestor_of_any()\n\nHmm?\n\nCiao,\nDscho\n"},{"id":"102026","messageId":"497E0CFE.4080702@vivisimo.com","threadId":"17372","inReplyTo":"alpine.DEB.1.00.0901261637300.25749@intel-tinevez-2-302","subject":"Re: [PATCH 2/3] Make has_commit non-static","fromName":"Jake Goulding","fromEmail":"goulding@vivisimo.com","sentAt":"2009-01-26T19:20:30Z","receivedAt":"2009-01-26T19:20:30Z","isPatch":true,"sender":{"key":"goulding@vivisimo.com","avatar":"https://gravatar.com/avatar/d8938ff226c618b80857e27f7e0a2d4335215bfb9733c321b8dd30c660b7f1e9?d=mp&s=160"},"body":"Johannes Schindelin wrote:\n> Hi,\n> \n> On Mon, 26 Jan 2009, Jake Goulding wrote:\n> \n>> Moving has_commit from branch to a common location in preparation for \n>> using it in tag. Renaming it to commit_has_any_in_commit_list to be more \n>> unique.\n> \n> I feel like bike-shedding for a change, and I'd also like to prove that \n> not all Germans like long names:\n> \n> \tis_ancestor_of_any()\n> \n> Hmm?\n\nI assume that this means that the rest of the code/logic is fine? :-D\n\nI'll change this (I don't have any attachment to one name or the other),\nthen it should be good to go!\n\n-Jake\n"},{"id":"102039","messageId":"7v63k16dd0.fsf@gitster.siamese.dyndns.org","threadId":"17372","inReplyTo":"alpine.DEB.1.00.0901261637300.25749@intel-tinevez-2-302","subject":"Re: [PATCH 2/3] Make has_commit non-static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-01-26T20:06:51Z","receivedAt":"2009-01-26T20:06:51Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> On Mon, 26 Jan 2009, Jake Goulding wrote:\n>\n>> Moving has_commit from branch to a common location in preparation for \n>> using it in tag. Renaming it to commit_has_any_in_commit_list to be more \n>> unique.\n>\n> I feel like bike-shedding for a change, and I'd also like to prove that \n> not all Germans like long names:\n>\n> \tis_ancestor_of_any()\n>\n> Hmm?\n\nIs it ancestor or descendant?  The latter makes the name longer, though\n;-)\n"},{"id":"102043","messageId":"alpine.DEB.1.00.0901262137290.25749@intel-tinevez-2-302","threadId":"17372","inReplyTo":"7v63k16dd0.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 2/3] Make has_commit non-static","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-01-26T20:38:03Z","receivedAt":"2009-01-26T20:38:03Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 26 Jan 2009, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> > On Mon, 26 Jan 2009, Jake Goulding wrote:\n> >\n> >> Moving has_commit from branch to a common location in preparation for \n> >> using it in tag. Renaming it to commit_has_any_in_commit_list to be \n> >> more unique.\n> >\n> > I feel like bike-shedding for a change, and I'd also like to prove \n> > that not all Germans like long names:\n> >\n> > \tis_ancestor_of_any()\n> >\n> > Hmm?\n> \n> Is it ancestor or descendant?  The latter makes the name longer, though \n> ;-)\n\nI did not read the patch and missed that it means the opposite, sorry...\n\nCiao,\nDscho\n"},{"id":"102343","messageId":"7vk58fnp63.fsf@gitster.siamese.dyndns.org","threadId":"17372","inReplyTo":"alpine.DEB.1.00.0901261637300.25749@intel-tinevez-2-302","subject":"Re: [PATCH 2/3] Make has_commit non-static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-01-28T20:36:36Z","receivedAt":"2009-01-28T20:36:36Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> On Mon, 26 Jan 2009, Jake Goulding wrote:\n>\n>> Moving has_commit from branch to a common location in preparation for \n>> using it in tag. Renaming it to commit_has_any_in_commit_list to be more \n>> unique.\n>\n> I feel like bike-shedding for a change, and I'd also like to prove that \n> not all Germans like long names:\n>\n> \tis_ancestor_of_any()\n\nI'll queue this after munging it to \"is_descendant_of()\".\n\nThanks.\n"},{"id":"102970","messageId":"49885E0A.4000707@vivisimo.com","threadId":"17372","inReplyTo":"7vk58fnp63.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 2/3] Make has_commit non-static","fromName":"Jake Goulding","fromEmail":"goulding@vivisimo.com","sentAt":"2009-02-03T15:08:58Z","receivedAt":"2009-02-03T15:08:58Z","isPatch":true,"sender":{"key":"goulding@vivisimo.com","avatar":"https://gravatar.com/avatar/d8938ff226c618b80857e27f7e0a2d4335215bfb9733c321b8dd30c660b7f1e9?d=mp&s=160"},"body":"Thanks for changing that for me - I lost track of this in other work!\n\n-Jake\n\nJunio C Hamano wrote:\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n>> On Mon, 26 Jan 2009, Jake Goulding wrote:\n>>\n>>> Moving has_commit from branch to a common location in preparation for \n>>> using it in tag. Renaming it to commit_has_any_in_commit_list to be more \n>>> unique.\n>> I feel like bike-shedding for a change, and I'd also like to prove that \n>> not all Germans like long names:\n>>\n>> \tis_ancestor_of_any()\n> \n> I'll queue this after munging it to \"is_descendant_of()\".\n> \n> Thanks.\n"}]}