{"thread":{"id":"58751","subject":"[PATCH 0/2] add case insensitivity option to bash completion","startedAt":"2022-11-05T17:28:44Z","lastAt":"2022-11-30T03:08:55Z","messageCount":15,"participants":["Alison Winters via GitGitGadget","Taylor Blau","SZEDER Gábor","Junio C Hamano","Alison Winters","Ævar Arnfjörð Bjarmason"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"466608","messageId":"pull.1374.git.git.1667669315.gitgitgadget@gmail.com","threadId":"58751","inReplyTo":null,"subject":"[PATCH 0/2] add case insensitivity option to bash completion","fromName":"Alison Winters via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2022-11-05T17:28:33Z","receivedAt":"2022-11-05T17:28:44Z","isPatch":true,"sender":{"key":"alisonatwork@outlook.com","avatar":"https://avatars.githubusercontent.com/u/660556?v=4"},"body":"In 3bb16a8bf2 (tag, branch, for-each-ref: add --ignore-case for sorting and\nfiltering, 2016-12-04), support was added for filtering and sorting refs in\na case insensitive way. This is a behavior that seems appropriate to enable\nwith shell completion. Many shells provide case insensitive completion as an\noption, even on filesystems that remain case sensitive.\n\nThis patch adds a new variable that, when set, will allow Bash completion to\nuse the --ignore-case option to match refs. Additionally, some basic support\nis implemented to match pseudorefs like HEAD.\n\nAlison Winters (2):\n  completion: add optional ignore-case when matching refs\n  completion: add case-insensitive match of pseudorefs\n\n contrib/completion/git-completion.bash | 51 ++++++++++++++++++++++++--\n t/t9902-completion.sh                  | 32 ++++++++++++++++\n 2 files changed, 80 insertions(+), 3 deletions(-)\n\n\nbase-commit: 3b08839926fcc7cc48cf4c759737c1a71af430c1\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1374%2Falisonatwork%2Fbash-insensitive-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1374/alisonatwork/bash-insensitive-v1\nPull-Request: https://github.com/git/git/pull/1374\n-- \ngitgitgadget\n"},{"id":"466610","messageId":"cef9a12b5752fc62151296e1b679fbe973556998.1667669315.git.gitgitgadget@gmail.com","threadId":"58751","inReplyTo":"pull.1374.git.git.1667669315.gitgitgadget@gmail.com","subject":"[PATCH 1/2] completion: add optional ignore-case when matching refs","fromName":"Alison Winters via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2022-11-05T17:28:34Z","receivedAt":"2022-11-05T17:28:46Z","isPatch":true,"sender":{"key":"alisonatwork@outlook.com","avatar":"https://avatars.githubusercontent.com/u/660556?v=4"},"body":"From: Alison Winters <alisonatwork@outlook.com>\n\nIf GIT_COMPLETION_IGNORE_CASE=1 is set, --ignore-case will be added to\ngit for-each-ref calls so that branches and tags can be matched case\ninsensitively.\n\nSigned-off-by: Alison Winters <alisonatwork@outlook.com>\n---\n contrib/completion/git-completion.bash | 41 ++++++++++++++++++++++++++\n t/t9902-completion.sh                  | 16 ++++++++++\n 2 files changed, 57 insertions(+)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex ba5c395d2d8..8ed96a5b8b6 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -58,6 +58,11 @@\n #\n #     When set to \"1\" suggest all options, including options which are\n #     typically hidden (e.g. '--allow-empty' for 'git commit').\n+#\n+#   GIT_COMPLETION_IGNORE_CASE\n+#\n+#     When set to \"1\", suggest refs that match case insensitively (e.g.,\n+#     completing \"FOO\" on \"git checkout f<TAB>\").\n \n case \"$COMP_WORDBREAKS\" in\n *:*) : great ;;\n@@ -644,8 +649,15 @@ __git_complete_index_file ()\n __git_heads ()\n {\n \tlocal pfx=\"${1-}\" cur_=\"${2-}\" sfx=\"${3-}\"\n+\tlocal ignore_case=\"\"\n+\n+\tif test \"${GIT_COMPLETION_IGNORE_CASE-}\" = \"1\"\n+\tthen\n+\t\tignore_case=\"--ignore-case\"\n+\tfi\n \n \t__git for-each-ref --format=\"${pfx//\\%/%%}%(refname:strip=2)$sfx\" \\\n+\t\t\t$ignore_case \\\n \t\t\t\"refs/heads/$cur_*\" \"refs/heads/$cur_*/**\"\n }\n \n@@ -657,8 +669,15 @@ __git_heads ()\n __git_remote_heads ()\n {\n \tlocal pfx=\"${1-}\" cur_=\"${2-}\" sfx=\"${3-}\"\n+\tlocal ignore_case=\"\"\n+\n+\tif test \"${GIT_COMPLETION_IGNORE_CASE-}\" = \"1\"\n+\tthen\n+\t\tignore_case=\"--ignore-case\"\n+\tfi\n \n \t__git for-each-ref --format=\"${pfx//\\%/%%}%(refname:strip=2)$sfx\" \\\n+\t\t\t$ignore_case \\\n \t\t\t\"refs/remotes/$cur_*\" \"refs/remotes/$cur_*/**\"\n }\n \n@@ -667,8 +686,15 @@ __git_remote_heads ()\n __git_tags ()\n {\n \tlocal pfx=\"${1-}\" cur_=\"${2-}\" sfx=\"${3-}\"\n+\tlocal ignore_case=\"\"\n+\n+\tif test \"${GIT_COMPLETION_IGNORE_CASE-}\" = \"1\"\n+\tthen\n+\t\tignore_case=\"--ignore-case\"\n+\tfi\n \n \t__git for-each-ref --format=\"${pfx//\\%/%%}%(refname:strip=2)$sfx\" \\\n+\t\t\t$ignore_case \\\n \t\t\t\"refs/tags/$cur_*\" \"refs/tags/$cur_*/**\"\n }\n \n@@ -682,12 +708,19 @@ __git_dwim_remote_heads ()\n {\n \tlocal pfx=\"${1-}\" cur_=\"${2-}\" sfx=\"${3-}\"\n \tlocal fer_pfx=\"${pfx//\\%/%%}\" # \"escape\" for-each-ref format specifiers\n+\tlocal ignore_case=\"\"\n+\n+\tif test \"${GIT_COMPLETION_IGNORE_CASE-}\" = \"1\"\n+\tthen\n+\t\tignore_case=\"--ignore-case\"\n+\tfi\n \n \t# employ the heuristic used by git checkout and git switch\n \t# Try to find a remote branch that cur_es the completion word\n \t# but only output if the branch name is unique\n \t__git for-each-ref --format=\"$fer_pfx%(refname:strip=3)$sfx\" \\\n \t\t--sort=\"refname:strip=3\" \\\n+\t\t$ignore_case \\\n \t\t\"refs/remotes/*/$cur_*\" \"refs/remotes/*/$cur_*/**\" | \\\n \tuniq -u\n }\n@@ -713,6 +746,7 @@ __git_refs ()\n \tlocal pfx=\"${3-}\" cur_=\"${4-$cur}\" sfx=\"${5-}\"\n \tlocal match=\"${4-}\"\n \tlocal fer_pfx=\"${pfx//\\%/%%}\" # \"escape\" for-each-ref format specifiers\n+\tlocal ignore_case=\"\"\n \n \t__git_find_repo_path\n \tdir=\"$__git_repo_path\"\n@@ -735,6 +769,11 @@ __git_refs ()\n \t\tfi\n \tfi\n \n+\tif test \"${GIT_COMPLETION_IGNORE_CASE-}\" = \"1\"\n+\tthen\n+\t\tignore_case=\"--ignore-case\"\n+\tfi\n+\n \tif [ \"$list_refs_from\" = path ]; then\n \t\tif [[ \"$cur_\" == ^* ]]; then\n \t\t\tpfx=\"$pfx^\"\n@@ -765,6 +804,7 @@ __git_refs ()\n \t\t\t;;\n \t\tesac\n \t\t__git_dir=\"$dir\" __git for-each-ref --format=\"$fer_pfx%($format)$sfx\" \\\n+\t\t\t$ignore_case \\\n \t\t\t\"${refs[@]}\"\n \t\tif [ -n \"$track\" ]; then\n \t\t\t__git_dwim_remote_heads \"$pfx\" \"$match\" \"$sfx\"\n@@ -787,6 +827,7 @@ __git_refs ()\n \t\t\t$match*)\techo \"${pfx}HEAD$sfx\" ;;\n \t\t\tesac\n \t\t\t__git for-each-ref --format=\"$fer_pfx%(refname:strip=3)$sfx\" \\\n+\t\t\t\t$ignore_case \\\n \t\t\t\t\"refs/remotes/$remote/$match*\" \\\n \t\t\t\t\"refs/remotes/$remote/$match*/**\"\n \t\telse\ndiff --git a/t/t9902-completion.sh b/t/t9902-completion.sh\nindex 43de868b800..f62a395d827 100755\n--- a/t/t9902-completion.sh\n+++ b/t/t9902-completion.sh\n@@ -2255,6 +2255,22 @@ test_expect_success 'checkout completes ref names' '\n \tEOF\n '\n \n+test_expect_success 'checkout does not match ref names of a different case' '\n+\ttest_completion \"git checkout M\" \"\"\n+'\n+\n+test_expect_success 'checkout matches case insensitively with GIT_COMPLETION_IGNORE_CASE' '\n+\t(\n+\t\t. \"$GIT_BUILD_DIR/contrib/completion/git-completion.bash\" &&\n+\t\tGIT_COMPLETION_IGNORE_CASE=1 && export GIT_COMPLETION_IGNORE_CASE &&\n+\t\ttest_completion \"git checkout M\" <<-\\EOF\n+\t\tmain Z\n+\t\tmybranch Z\n+\t\tmytag Z\n+\t\tEOF\n+\t)\n+'\n+\n test_expect_success 'git -C <path> checkout uses the right repo' '\n \ttest_completion \"git -C subdir -C subsubdir -C .. -C ../otherrepo checkout b\" <<-\\EOF\n \tbranch-in-other Z\n-- \ngitgitgadget\n\n"},{"id":"466609","messageId":"c455e855395dcc9215ea4ce3181eb3cbaff4000b.1667669315.git.gitgitgadget@gmail.com","threadId":"58751","inReplyTo":"pull.1374.git.git.1667669315.gitgitgadget@gmail.com","subject":"[PATCH 2/2] completion: add case-insensitive match of pseudorefs","fromName":"Alison Winters via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2022-11-05T17:28:35Z","receivedAt":"2022-11-05T17:28:47Z","isPatch":true,"sender":{"key":"alisonatwork@outlook.com","avatar":"https://avatars.githubusercontent.com/u/660556?v=4"},"body":"From: Alison Winters <alisonatwork@outlook.com>\n\nWhen GIT_COMPLETION_IGNORE_CASE=1, also allow lowercase completion text\nlike \"head\" to match HEAD and other pseudorefs.\n\nSigned-off-by: Alison Winters <alisonatwork@outlook.com>\n---\n contrib/completion/git-completion.bash | 10 +++++++---\n t/t9902-completion.sh                  | 16 ++++++++++++++++\n 2 files changed, 23 insertions(+), 3 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 8ed96a5b8b6..161327057da 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -745,6 +745,7 @@ __git_refs ()\n \tlocal format refs\n \tlocal pfx=\"${3-}\" cur_=\"${4-$cur}\" sfx=\"${5-}\"\n \tlocal match=\"${4-}\"\n+\tlocal umatch=\"${4-}\"\n \tlocal fer_pfx=\"${pfx//\\%/%%}\" # \"escape\" for-each-ref format specifiers\n \tlocal ignore_case=\"\"\n \n@@ -772,6 +773,8 @@ __git_refs ()\n \tif test \"${GIT_COMPLETION_IGNORE_CASE-}\" = \"1\"\n \tthen\n \t\tignore_case=\"--ignore-case\"\n+\t\t# use tr instead of ${match,^^} to preserve bash 3.2 compatibility\n+\t\tumatch=$(echo \"$match\" | tr a-z A-Z 2> /dev/null || echo \"$match\")\n \tfi\n \n \tif [ \"$list_refs_from\" = path ]; then\n@@ -780,6 +783,7 @@ __git_refs ()\n \t\t\tfer_pfx=\"$fer_pfx^\"\n \t\t\tcur_=${cur_#^}\n \t\t\tmatch=${match#^}\n+\t\t\tumatch=${umatch#^}\n \t\tfi\n \t\tcase \"$cur_\" in\n \t\trefs|refs/*)\n@@ -790,7 +794,7 @@ __git_refs ()\n \t\t*)\n \t\t\tfor i in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD REBASE_HEAD CHERRY_PICK_HEAD; do\n \t\t\t\tcase \"$i\" in\n-\t\t\t\t$match*)\n+\t\t\t\t$match*|$umatch*)\n \t\t\t\t\tif [ -e \"$dir/$i\" ]; then\n \t\t\t\t\t\techo \"$pfx$i$sfx\"\n \t\t\t\t\tfi\n@@ -824,7 +828,7 @@ __git_refs ()\n \t*)\n \t\tif [ \"$list_refs_from\" = remote ]; then\n \t\t\tcase \"HEAD\" in\n-\t\t\t$match*)\techo \"${pfx}HEAD$sfx\" ;;\n+\t\t\t$match*|$umatch*)\techo \"${pfx}HEAD$sfx\" ;;\n \t\t\tesac\n \t\t\t__git for-each-ref --format=\"$fer_pfx%(refname:strip=3)$sfx\" \\\n \t\t\t\t$ignore_case \\\n@@ -833,7 +837,7 @@ __git_refs ()\n \t\telse\n \t\t\tlocal query_symref\n \t\t\tcase \"HEAD\" in\n-\t\t\t$match*)\tquery_symref=\"HEAD\" ;;\n+\t\t\t$match*|$umatch*)\tquery_symref=\"HEAD\" ;;\n \t\t\tesac\n \t\t\t__git ls-remote \"$remote\" $query_symref \\\n \t\t\t\t\"refs/tags/$match*\" \"refs/heads/$match*\" \\\ndiff --git a/t/t9902-completion.sh b/t/t9902-completion.sh\nindex f62a395d827..b4c46567fa4 100755\n--- a/t/t9902-completion.sh\n+++ b/t/t9902-completion.sh\n@@ -2271,6 +2271,22 @@ test_expect_success 'checkout matches case insensitively with GIT_COMPLETION_IGN\n \t)\n '\n \n+test_expect_success 'checkout completes pseudo refs' '\n+\ttest_completion \"git checkout H\" <<-\\EOF\n+\tHEAD Z\n+\tEOF\n+'\n+\n+test_expect_success 'checkout completes pseudo refs case insensitively with GIT_COMPLETION_IGNORE_CASE' '\n+\t(\n+\t\t. \"$GIT_BUILD_DIR/contrib/completion/git-completion.bash\" &&\n+\t\tGIT_COMPLETION_IGNORE_CASE=1 && export GIT_COMPLETION_IGNORE_CASE &&\n+\t\ttest_completion \"git checkout h\" <<-\\EOF\n+\t\tHEAD Z\n+\t\tEOF\n+\t)\n+'\n+\n test_expect_success 'git -C <path> checkout uses the right repo' '\n \ttest_completion \"git -C subdir -C subsubdir -C .. -C ../otherrepo checkout b\" <<-\\EOF\n \tbranch-in-other Z\n-- \ngitgitgadget\n"},{"id":"466784","messageId":"Y2nGMquKVz4vDNDS@nand.local","threadId":"58751","inReplyTo":"pull.1374.git.git.1667669315.gitgitgadget@gmail.com","subject":"Re: [PATCH 0/2] add case insensitivity option to bash completion","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2022-11-08T03:00:02Z","receivedAt":"2022-11-08T03:00:11Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"Hi Alison,\n\nOn Sat, Nov 05, 2022 at 05:28:33PM +0000, Alison Winters via GitGitGadget wrote:\n> Alison Winters (2):\n>   completion: add optional ignore-case when matching refs\n>   completion: add case-insensitive match of pseudorefs\n>\n>  contrib/completion/git-completion.bash | 51 ++++++++++++++++++++++++--\n>  t/t9902-completion.sh                  | 32 ++++++++++++++++\n>  2 files changed, 80 insertions(+), 3 deletions(-)\n\nIt looks reasonable to me, but I'm far from an expert on the completion\ncode ;-).\n\nCC'ing some folks who are going to be more familiar with it than me.\n\nThanks,\nTaylor\n"},{"id":"467624","messageId":"20221120202454.GB4039@szeder.dev","threadId":"58751","inReplyTo":"cef9a12b5752fc62151296e1b679fbe973556998.1667669315.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 1/2] completion: add optional ignore-case when matching refs","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2022-11-20T20:24:54Z","receivedAt":"2022-11-20T20:30:41Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Sat, Nov 05, 2022 at 05:28:34PM +0000, Alison Winters via GitGitGadget wrote:\n> From: Alison Winters <alisonatwork@outlook.com>\n> \n> If GIT_COMPLETION_IGNORE_CASE=1 is set, --ignore-case will be added to\n> git for-each-ref calls so that branches and tags can be matched case\n> insensitively.\n> \n> Signed-off-by: Alison Winters <alisonatwork@outlook.com>\n> ---\n>  contrib/completion/git-completion.bash | 41 ++++++++++++++++++++++++++\n>  t/t9902-completion.sh                  | 16 ++++++++++\n>  2 files changed, 57 insertions(+)\n> \n> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n> index ba5c395d2d8..8ed96a5b8b6 100644\n> --- a/contrib/completion/git-completion.bash\n> +++ b/contrib/completion/git-completion.bash\n> @@ -58,6 +58,11 @@\n>  #\n>  #     When set to \"1\" suggest all options, including options which are\n>  #     typically hidden (e.g. '--allow-empty' for 'git commit').\n> +#\n> +#   GIT_COMPLETION_IGNORE_CASE\n> +#\n> +#     When set to \"1\", suggest refs that match case insensitively (e.g.,\n> +#     completing \"FOO\" on \"git checkout f<TAB>\").\n\nI wish the commit message and this comment would be more explicit\nabout only the matching being case insensitive, but the words listed\nfor completion will all have the same case as the files/refs/etc. that\nare being completed.\n\nI've already started writing a reply along the lines of \"does this\nonly work on case-insensitive filesystems?!\" before finally realizing\nthat's not how it works...\n\n>  case \"$COMP_WORDBREAKS\" in\n>  *:*) : great ;;\n> @@ -644,8 +649,15 @@ __git_complete_index_file ()\n>  __git_heads ()\n>  {\n>  \tlocal pfx=\"${1-}\" cur_=\"${2-}\" sfx=\"${3-}\"\n> +\tlocal ignore_case=\"\"\n> +\n> +\tif test \"${GIT_COMPLETION_IGNORE_CASE-}\" = \"1\"\n> +\tthen\n> +\t\tignore_case=\"--ignore-case\"\n> +\tfi\n\nI find these six lines a bit too verbose for what there are doing,\nespecially since the same six lines are added a couple of times.  I\nthink it could be shortened to just a single line with the \"use\nalternate value\" parameter expansion like this:\n\n    local ignore_case=${GIT_COMPLETION_IGNORE_CASE+--ignore-case}\n\n>  \t__git for-each-ref --format=\"${pfx//\\%/%%}%(refname:strip=2)$sfx\" \\\n> +\t\t\t$ignore_case \\\n\nIn fact, we could eliminate that new $ignore_case local variable\nentirely by adding that parameter expansion right here.\n\n>  \t\t\t\"refs/heads/$cur_*\" \"refs/heads/$cur_*/**\"\n>  }\n>  \n> @@ -657,8 +669,15 @@ __git_heads ()\n>  __git_remote_heads ()\n>  {\n>  \tlocal pfx=\"${1-}\" cur_=\"${2-}\" sfx=\"${3-}\"\n> +\tlocal ignore_case=\"\"\n> +\n> +\tif test \"${GIT_COMPLETION_IGNORE_CASE-}\" = \"1\"\n> +\tthen\n> +\t\tignore_case=\"--ignore-case\"\n> +\tfi\n>  \n>  \t__git for-each-ref --format=\"${pfx//\\%/%%}%(refname:strip=2)$sfx\" \\\n> +\t\t\t$ignore_case \\\n>  \t\t\t\"refs/remotes/$cur_*\" \"refs/remotes/$cur_*/**\"\n>  }\n>  \n> @@ -667,8 +686,15 @@ __git_remote_heads ()\n>  __git_tags ()\n>  {\n>  \tlocal pfx=\"${1-}\" cur_=\"${2-}\" sfx=\"${3-}\"\n> +\tlocal ignore_case=\"\"\n> +\n> +\tif test \"${GIT_COMPLETION_IGNORE_CASE-}\" = \"1\"\n> +\tthen\n> +\t\tignore_case=\"--ignore-case\"\n> +\tfi\n>  \n>  \t__git for-each-ref --format=\"${pfx//\\%/%%}%(refname:strip=2)$sfx\" \\\n> +\t\t\t$ignore_case \\\n>  \t\t\t\"refs/tags/$cur_*\" \"refs/tags/$cur_*/**\"\n>  }\n>  \n> @@ -682,12 +708,19 @@ __git_dwim_remote_heads ()\n>  {\n>  \tlocal pfx=\"${1-}\" cur_=\"${2-}\" sfx=\"${3-}\"\n>  \tlocal fer_pfx=\"${pfx//\\%/%%}\" # \"escape\" for-each-ref format specifiers\n> +\tlocal ignore_case=\"\"\n> +\n> +\tif test \"${GIT_COMPLETION_IGNORE_CASE-}\" = \"1\"\n> +\tthen\n> +\t\tignore_case=\"--ignore-case\"\n> +\tfi\n>  \n>  \t# employ the heuristic used by git checkout and git switch\n>  \t# Try to find a remote branch that cur_es the completion word\n>  \t# but only output if the branch name is unique\n>  \t__git for-each-ref --format=\"$fer_pfx%(refname:strip=3)$sfx\" \\\n>  \t\t--sort=\"refname:strip=3\" \\\n> +\t\t$ignore_case \\\n>  \t\t\"refs/remotes/*/$cur_*\" \"refs/remotes/*/$cur_*/**\" | \\\n>  \tuniq -u\n>  }\n> @@ -713,6 +746,7 @@ __git_refs ()\n>  \tlocal pfx=\"${3-}\" cur_=\"${4-$cur}\" sfx=\"${5-}\"\n>  \tlocal match=\"${4-}\"\n>  \tlocal fer_pfx=\"${pfx//\\%/%%}\" # \"escape\" for-each-ref format specifiers\n> +\tlocal ignore_case=\"\"\n>  \n>  \t__git_find_repo_path\n>  \tdir=\"$__git_repo_path\"\n> @@ -735,6 +769,11 @@ __git_refs ()\n>  \t\tfi\n>  \tfi\n>  \n> +\tif test \"${GIT_COMPLETION_IGNORE_CASE-}\" = \"1\"\n> +\tthen\n> +\t\tignore_case=\"--ignore-case\"\n> +\tfi\n> +\n>  \tif [ \"$list_refs_from\" = path ]; then\n>  \t\tif [[ \"$cur_\" == ^* ]]; then\n>  \t\t\tpfx=\"$pfx^\"\n> @@ -765,6 +804,7 @@ __git_refs ()\n>  \t\t\t;;\n>  \t\tesac\n>  \t\t__git_dir=\"$dir\" __git for-each-ref --format=\"$fer_pfx%($format)$sfx\" \\\n> +\t\t\t$ignore_case \\\n>  \t\t\t\"${refs[@]}\"\n>  \t\tif [ -n \"$track\" ]; then\n>  \t\t\t__git_dwim_remote_heads \"$pfx\" \"$match\" \"$sfx\"\n> @@ -787,6 +827,7 @@ __git_refs ()\n>  \t\t\t$match*)\techo \"${pfx}HEAD$sfx\" ;;\n>  \t\t\tesac\n>  \t\t\t__git for-each-ref --format=\"$fer_pfx%(refname:strip=3)$sfx\" \\\n> +\t\t\t\t$ignore_case \\\n>  \t\t\t\t\"refs/remotes/$remote/$match*\" \\\n>  \t\t\t\t\"refs/remotes/$remote/$match*/**\"\n>  \t\telse\n> diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh\n> index 43de868b800..f62a395d827 100755\n> --- a/t/t9902-completion.sh\n> +++ b/t/t9902-completion.sh\n> @@ -2255,6 +2255,22 @@ test_expect_success 'checkout completes ref names' '\n>  \tEOF\n>  '\n>  \n> +test_expect_success 'checkout does not match ref names of a different case' '\n> +\ttest_completion \"git checkout M\" \"\"\n> +'\n> +\n> +test_expect_success 'checkout matches case insensitively with GIT_COMPLETION_IGNORE_CASE' '\n> +\t(\n> +\t\t. \"$GIT_BUILD_DIR/contrib/completion/git-completion.bash\" &&\n\nI don't think it's necessary to source the completion script here,\nbecause the test script's main shell process has already sourced it,\nand its functions are visible in this test's subshell as well.\n\n(Yeah, there are a few test cases near the end that do (re-)source the\ncompletion script, but they do so because they must invalidate the\ncache variables used by the completion script; this case-insensitive\nmatch feature, however, doesn't involve any of those cache variables.)\n\n> +\t\tGIT_COMPLETION_IGNORE_CASE=1 && export GIT_COMPLETION_IGNORE_CASE &&\n\nThere is no need to export this variable, because only a handful of\ncompletion helper functions look at it, which are invoked in this same\nshell process (or perhaps in one of its subshells, but this variable\nwill be visible there are all the same).\n\n> +\t\ttest_completion \"git checkout M\" <<-\\EOF\n> +\t\tmain Z\n> +\t\tmybranch Z\n> +\t\tmytag Z\n> +\t\tEOF\n> +\t)\n> +'\n> +\n>  test_expect_success 'git -C <path> checkout uses the right repo' '\n>  \ttest_completion \"git -C subdir -C subsubdir -C .. -C ../otherrepo checkout b\" <<-\\EOF\n>  \tbranch-in-other Z\n> -- \n> gitgitgadget\n> \n"},{"id":"467625","messageId":"20221120204232.GC4039@szeder.dev","threadId":"58751","inReplyTo":"c455e855395dcc9215ea4ce3181eb3cbaff4000b.1667669315.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 2/2] completion: add case-insensitive match of pseudorefs","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2022-11-20T20:42:32Z","receivedAt":"2022-11-20T20:42:41Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Sat, Nov 05, 2022 at 05:28:35PM +0000, Alison Winters via GitGitGadget wrote:\n> From: Alison Winters <alisonatwork@outlook.com>\n> \n> When GIT_COMPLETION_IGNORE_CASE=1, also allow lowercase completion text\n> like \"head\" to match HEAD and other pseudorefs.\n> \n> Signed-off-by: Alison Winters <alisonatwork@outlook.com>\n> ---\n>  contrib/completion/git-completion.bash | 10 +++++++---\n>  t/t9902-completion.sh                  | 16 ++++++++++++++++\n>  2 files changed, 23 insertions(+), 3 deletions(-)\n> \n> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n> index 8ed96a5b8b6..161327057da 100644\n> --- a/contrib/completion/git-completion.bash\n> +++ b/contrib/completion/git-completion.bash\n> @@ -745,6 +745,7 @@ __git_refs ()\n>  \tlocal format refs\n>  \tlocal pfx=\"${3-}\" cur_=\"${4-$cur}\" sfx=\"${5-}\"\n>  \tlocal match=\"${4-}\"\n> +\tlocal umatch=\"${4-}\"\n\nWhy 'umatch' and not 'imatch'?\n\n>  \tlocal fer_pfx=\"${pfx//\\%/%%}\" # \"escape\" for-each-ref format specifiers\n>  \tlocal ignore_case=\"\"\n>  \n> @@ -772,6 +773,8 @@ __git_refs ()\n>  \tif test \"${GIT_COMPLETION_IGNORE_CASE-}\" = \"1\"\n>  \tthen\n>  \t\tignore_case=\"--ignore-case\"\n> +\t\t# use tr instead of ${match,^^} to preserve bash 3.2 compatibility\n\nThank you for keeping compatibility with old versions in mind!\n\n> +\t\tumatch=$(echo \"$match\" | tr a-z A-Z 2> /dev/null || echo \"$match\")\n\nStyle nit: we usually don't add a space between the redirection\noperator and the filename.\n\n>  \tfi\n>  \n>  \tif [ \"$list_refs_from\" = path ]; then\n> @@ -780,6 +783,7 @@ __git_refs ()\n>  \t\t\tfer_pfx=\"$fer_pfx^\"\n>  \t\t\tcur_=${cur_#^}\n>  \t\t\tmatch=${match#^}\n> +\t\t\tumatch=${umatch#^}\n>  \t\tfi\n>  \t\tcase \"$cur_\" in\n>  \t\trefs|refs/*)\n> @@ -790,7 +794,7 @@ __git_refs ()\n>  \t\t*)\n>  \t\t\tfor i in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD REBASE_HEAD CHERRY_PICK_HEAD; do\n>  \t\t\t\tcase \"$i\" in\n> -\t\t\t\t$match*)\n> +\t\t\t\t$match*|$umatch*)\n\nI find the two patterns here weird.  I suppose it works as intended,\nbecause with GIT_COMPLETION_IGNORE_CASE being unset both $match and\n$umatch have the same value, so there is only one pattern after all,\nbut when GIT_COMPLETION_IGNORE_CASE is set then $umatch contains the\ncase insensitive pattern...  but I still find it a bit weird :) but I\ndon't know how to make it less weird without introducing code\nduplication, so it's still better than the alternatives.\n\n>  \t\t\t\t\tif [ -e \"$dir/$i\" ]; then\n>  \t\t\t\t\t\techo \"$pfx$i$sfx\"\n>  \t\t\t\t\tfi\n> @@ -824,7 +828,7 @@ __git_refs ()\n>  \t*)\n>  \t\tif [ \"$list_refs_from\" = remote ]; then\n>  \t\t\tcase \"HEAD\" in\n> -\t\t\t$match*)\techo \"${pfx}HEAD$sfx\" ;;\n> +\t\t\t$match*|$umatch*)\techo \"${pfx}HEAD$sfx\" ;;\n>  \t\t\tesac\n>  \t\t\t__git for-each-ref --format=\"$fer_pfx%(refname:strip=3)$sfx\" \\\n>  \t\t\t\t$ignore_case \\\n> @@ -833,7 +837,7 @@ __git_refs ()\n>  \t\telse\n>  \t\t\tlocal query_symref\n>  \t\t\tcase \"HEAD\" in\n> -\t\t\t$match*)\tquery_symref=\"HEAD\" ;;\n> +\t\t\t$match*|$umatch*)\tquery_symref=\"HEAD\" ;;\n>  \t\t\tesac\n>  \t\t\t__git ls-remote \"$remote\" $query_symref \\\n>  \t\t\t\t\"refs/tags/$match*\" \"refs/heads/$match*\" \\\n> diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh\n> index f62a395d827..b4c46567fa4 100755\n> --- a/t/t9902-completion.sh\n> +++ b/t/t9902-completion.sh\n> @@ -2271,6 +2271,22 @@ test_expect_success 'checkout matches case insensitively with GIT_COMPLETION_IGN\n>  \t)\n>  '\n>  \n> +test_expect_success 'checkout completes pseudo refs' '\n> +\ttest_completion \"git checkout H\" <<-\\EOF\n> +\tHEAD Z\n> +\tEOF\n> +'\n> +\n> +test_expect_success 'checkout completes pseudo refs case insensitively with GIT_COMPLETION_IGNORE_CASE' '\n> +\t(\n> +\t\t. \"$GIT_BUILD_DIR/contrib/completion/git-completion.bash\" &&\n> +\t\tGIT_COMPLETION_IGNORE_CASE=1 && export GIT_COMPLETION_IGNORE_CASE &&\n\nThe same comment about the unnecessary sourcing and exporting on the\nprevious patch applies here as well.\n\n> +\t\ttest_completion \"git checkout h\" <<-\\EOF\n> +\t\tHEAD Z\n> +\t\tEOF\n> +\t)\n> +'\n> +\n>  test_expect_success 'git -C <path> checkout uses the right repo' '\n>  \ttest_completion \"git -C subdir -C subsubdir -C .. -C ../otherrepo checkout b\" <<-\\EOF\n>  \tbranch-in-other Z\n> -- \n> gitgitgadget\n"},{"id":"467626","messageId":"20221120204646.GD4039@szeder.dev","threadId":"58751","inReplyTo":"20221120204232.GC4039@szeder.dev","subject":"Re: [PATCH 2/2] completion: add case-insensitive match of pseudorefs","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2022-11-20T20:46:46Z","receivedAt":"2022-11-20T20:46:52Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Sun, Nov 20, 2022 at 09:42:32PM +0100, SZEDER Gábor wrote:\n> On Sat, Nov 05, 2022 at 05:28:35PM +0000, Alison Winters via GitGitGadget wrote:\n> > From: Alison Winters <alisonatwork@outlook.com>\n> > \n> > When GIT_COMPLETION_IGNORE_CASE=1, also allow lowercase completion text\n> > like \"head\" to match HEAD and other pseudorefs.\n> > \n> > Signed-off-by: Alison Winters <alisonatwork@outlook.com>\n> > ---\n> >  contrib/completion/git-completion.bash | 10 +++++++---\n> >  t/t9902-completion.sh                  | 16 ++++++++++++++++\n> >  2 files changed, 23 insertions(+), 3 deletions(-)\n> > \n> > diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n> > index 8ed96a5b8b6..161327057da 100644\n> > --- a/contrib/completion/git-completion.bash\n> > +++ b/contrib/completion/git-completion.bash\n> > @@ -745,6 +745,7 @@ __git_refs ()\n> >  \tlocal format refs\n> >  \tlocal pfx=\"${3-}\" cur_=\"${4-$cur}\" sfx=\"${5-}\"\n> >  \tlocal match=\"${4-}\"\n> > +\tlocal umatch=\"${4-}\"\n> \n> Why 'umatch' and not 'imatch'?\n\nGah, because it's all _u_pper case, as can be seen in the next hunk,\nthat's why.\n\n> >  \tlocal fer_pfx=\"${pfx//\\%/%%}\" # \"escape\" for-each-ref format specifiers\n> >  \tlocal ignore_case=\"\"\n> >  \n> > @@ -772,6 +773,8 @@ __git_refs ()\n> >  \tif test \"${GIT_COMPLETION_IGNORE_CASE-}\" = \"1\"\n> >  \tthen\n> >  \t\tignore_case=\"--ignore-case\"\n> > +\t\t# use tr instead of ${match,^^} to preserve bash 3.2 compatibility\n> \n> Thank you for keeping compatibility with old versions in mind!\n> \n> > +\t\tumatch=$(echo \"$match\" | tr a-z A-Z 2> /dev/null || echo \"$match\")\n> \n"},{"id":"467638","messageId":"a261a94877ad486073ae6e644e540b920a04c6b9.1668990419.git.gitgitgadget@gmail.com","threadId":"58751","inReplyTo":"pull.1374.v2.git.git.1668990419.gitgitgadget@gmail.com","subject":"[PATCH v2 1/2] completion: add optional ignore-case when matching refs","fromName":"Alison Winters via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2022-11-21T00:26:58Z","receivedAt":"2022-11-21T00:27:37Z","isPatch":true,"sender":{"key":"alisonatwork@outlook.com","avatar":"https://avatars.githubusercontent.com/u/660556?v=4"},"body":"From: Alison Winters <alisonatwork@outlook.com>\n\nIf GIT_COMPLETION_IGNORE_CASE is set, --ignore-case will be added to\ngit for-each-ref calls so that refs can be matched case insensitively,\neven when running on case sensitive filesystems.\n\nSigned-off-by: Alison Winters <alisonatwork@outlook.com>\n---\n contrib/completion/git-completion.bash | 12 ++++++++++++\n t/t9902-completion.sh                  | 15 +++++++++++++++\n 2 files changed, 27 insertions(+)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex ba5c395d2d8..7dcf4b63562 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -58,6 +58,12 @@\n #\n #     When set to \"1\" suggest all options, including options which are\n #     typically hidden (e.g. '--allow-empty' for 'git commit').\n+#\n+#   GIT_COMPLETION_IGNORE_CASE\n+#\n+#     When set, uses for-each-ref '--ignore-case' to find refs that match\n+#     case insensitively, even on systems with case sensitive file systems\n+#     (e.g., completing tag name \"FOO\" on \"git checkout f<TAB>\").\n \n case \"$COMP_WORDBREAKS\" in\n *:*) : great ;;\n@@ -646,6 +652,7 @@ __git_heads ()\n \tlocal pfx=\"${1-}\" cur_=\"${2-}\" sfx=\"${3-}\"\n \n \t__git for-each-ref --format=\"${pfx//\\%/%%}%(refname:strip=2)$sfx\" \\\n+\t\t\t${GIT_COMPLETION_IGNORE_CASE+--ignore-case} \\\n \t\t\t\"refs/heads/$cur_*\" \"refs/heads/$cur_*/**\"\n }\n \n@@ -659,6 +666,7 @@ __git_remote_heads ()\n \tlocal pfx=\"${1-}\" cur_=\"${2-}\" sfx=\"${3-}\"\n \n \t__git for-each-ref --format=\"${pfx//\\%/%%}%(refname:strip=2)$sfx\" \\\n+\t\t\t${GIT_COMPLETION_IGNORE_CASE+--ignore-case} \\\n \t\t\t\"refs/remotes/$cur_*\" \"refs/remotes/$cur_*/**\"\n }\n \n@@ -669,6 +677,7 @@ __git_tags ()\n \tlocal pfx=\"${1-}\" cur_=\"${2-}\" sfx=\"${3-}\"\n \n \t__git for-each-ref --format=\"${pfx//\\%/%%}%(refname:strip=2)$sfx\" \\\n+\t\t\t${GIT_COMPLETION_IGNORE_CASE+--ignore-case} \\\n \t\t\t\"refs/tags/$cur_*\" \"refs/tags/$cur_*/**\"\n }\n \n@@ -688,6 +697,7 @@ __git_dwim_remote_heads ()\n \t# but only output if the branch name is unique\n \t__git for-each-ref --format=\"$fer_pfx%(refname:strip=3)$sfx\" \\\n \t\t--sort=\"refname:strip=3\" \\\n+\t\t${GIT_COMPLETION_IGNORE_CASE+--ignore-case} \\\n \t\t\"refs/remotes/*/$cur_*\" \"refs/remotes/*/$cur_*/**\" | \\\n \tuniq -u\n }\n@@ -765,6 +775,7 @@ __git_refs ()\n \t\t\t;;\n \t\tesac\n \t\t__git_dir=\"$dir\" __git for-each-ref --format=\"$fer_pfx%($format)$sfx\" \\\n+\t\t\t${GIT_COMPLETION_IGNORE_CASE+--ignore-case} \\\n \t\t\t\"${refs[@]}\"\n \t\tif [ -n \"$track\" ]; then\n \t\t\t__git_dwim_remote_heads \"$pfx\" \"$match\" \"$sfx\"\n@@ -787,6 +798,7 @@ __git_refs ()\n \t\t\t$match*)\techo \"${pfx}HEAD$sfx\" ;;\n \t\t\tesac\n \t\t\t__git for-each-ref --format=\"$fer_pfx%(refname:strip=3)$sfx\" \\\n+\t\t\t\t${GIT_COMPLETION_IGNORE_CASE+--ignore-case} \\\n \t\t\t\t\"refs/remotes/$remote/$match*\" \\\n \t\t\t\t\"refs/remotes/$remote/$match*/**\"\n \t\telse\ndiff --git a/t/t9902-completion.sh b/t/t9902-completion.sh\nindex 43de868b800..d89d0a93a2a 100755\n--- a/t/t9902-completion.sh\n+++ b/t/t9902-completion.sh\n@@ -2255,6 +2255,21 @@ test_expect_success 'checkout completes ref names' '\n \tEOF\n '\n \n+test_expect_success 'checkout does not match ref names of a different case' '\n+\ttest_completion \"git checkout M\" \"\"\n+'\n+\n+test_expect_success 'checkout matches case insensitively with GIT_COMPLETION_IGNORE_CASE' '\n+\t(\n+\t\tGIT_COMPLETION_IGNORE_CASE=1 &&\n+\t\ttest_completion \"git checkout M\" <<-\\EOF\n+\t\tmain Z\n+\t\tmybranch Z\n+\t\tmytag Z\n+\t\tEOF\n+\t)\n+'\n+\n test_expect_success 'git -C <path> checkout uses the right repo' '\n \ttest_completion \"git -C subdir -C subsubdir -C .. -C ../otherrepo checkout b\" <<-\\EOF\n \tbranch-in-other Z\n-- \ngitgitgadget\n\n"},{"id":"467639","messageId":"pull.1374.v2.git.git.1668990419.gitgitgadget@gmail.com","threadId":"58751","inReplyTo":"pull.1374.git.git.1667669315.gitgitgadget@gmail.com","subject":"[PATCH v2 0/2] add case insensitivity option to bash completion","fromName":"Alison Winters via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2022-11-21T00:26:57Z","receivedAt":"2022-11-21T00:27:40Z","isPatch":true,"sender":{"key":"alisonatwork@outlook.com","avatar":"https://avatars.githubusercontent.com/u/660556?v=4"},"body":"In 3bb16a8bf2 (tag, branch, for-each-ref: add --ignore-case for sorting and\nfiltering, 2016-12-04), support was added for filtering and sorting refs in\na case insensitive way. This is a behavior that seems appropriate to enable\nwith shell completion. Many shells provide case insensitive completion as an\noption, even on filesystems that remain case sensitive.\n\nThis patch adds a new variable that, when set, will allow Bash completion to\nuse the --ignore-case option to match refs. Additionally, some basic support\nis implemented to match pseudorefs like HEAD.\n\nChanges since v1:\n\n * Improved comments and commit messages to clarify behavior on case\n   sensitive filesystems\n * Replaced some lengthy if blocks with inline substitution\n * As a result of the above change, GIT_COMPLETION_IGNORE_CASE no longer\n   needs to be set to \"1\" and now just needs to be present in the\n   environment to work\n * Removed unnecessary exports in tests\n\nAlison Winters (2):\n  completion: add optional ignore-case when matching refs\n  completion: add case-insensitive match of pseudorefs\n\n contrib/completion/git-completion.bash | 26 +++++++++++++++++++---\n t/t9902-completion.sh                  | 30 ++++++++++++++++++++++++++\n 2 files changed, 53 insertions(+), 3 deletions(-)\n\n\nbase-commit: a0789512c5a4ae7da935cd2e419f253cb3cb4ce7\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1374%2Falisonatwork%2Fbash-insensitive-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1374/alisonatwork/bash-insensitive-v2\nPull-Request: https://github.com/git/git/pull/1374\n\nRange-diff vs v1:\n\n 1:  cef9a12b575 ! 1:  a261a94877a completion: add optional ignore-case when matching refs\n     @@ Metadata\n       ## Commit message ##\n          completion: add optional ignore-case when matching refs\n      \n     -    If GIT_COMPLETION_IGNORE_CASE=1 is set, --ignore-case will be added to\n     -    git for-each-ref calls so that branches and tags can be matched case\n     -    insensitively.\n     +    If GIT_COMPLETION_IGNORE_CASE is set, --ignore-case will be added to\n     +    git for-each-ref calls so that refs can be matched case insensitively,\n     +    even when running on case sensitive filesystems.\n      \n          Signed-off-by: Alison Winters <alisonatwork@outlook.com>\n      \n     @@ contrib/completion/git-completion.bash\n      +#\n      +#   GIT_COMPLETION_IGNORE_CASE\n      +#\n     -+#     When set to \"1\", suggest refs that match case insensitively (e.g.,\n     -+#     completing \"FOO\" on \"git checkout f<TAB>\").\n     ++#     When set, uses for-each-ref '--ignore-case' to find refs that match\n     ++#     case insensitively, even on systems with case sensitive file systems\n     ++#     (e.g., completing tag name \"FOO\" on \"git checkout f<TAB>\").\n       \n       case \"$COMP_WORDBREAKS\" in\n       *:*) : great ;;\n     -@@ contrib/completion/git-completion.bash: __git_complete_index_file ()\n     - __git_heads ()\n     - {\n     +@@ contrib/completion/git-completion.bash: __git_heads ()\n       \tlocal pfx=\"${1-}\" cur_=\"${2-}\" sfx=\"${3-}\"\n     -+\tlocal ignore_case=\"\"\n     -+\n     -+\tif test \"${GIT_COMPLETION_IGNORE_CASE-}\" = \"1\"\n     -+\tthen\n     -+\t\tignore_case=\"--ignore-case\"\n     -+\tfi\n       \n       \t__git for-each-ref --format=\"${pfx//\\%/%%}%(refname:strip=2)$sfx\" \\\n     -+\t\t\t$ignore_case \\\n     ++\t\t\t${GIT_COMPLETION_IGNORE_CASE+--ignore-case} \\\n       \t\t\t\"refs/heads/$cur_*\" \"refs/heads/$cur_*/**\"\n       }\n       \n     -@@ contrib/completion/git-completion.bash: __git_heads ()\n     - __git_remote_heads ()\n     - {\n     +@@ contrib/completion/git-completion.bash: __git_remote_heads ()\n       \tlocal pfx=\"${1-}\" cur_=\"${2-}\" sfx=\"${3-}\"\n     -+\tlocal ignore_case=\"\"\n     -+\n     -+\tif test \"${GIT_COMPLETION_IGNORE_CASE-}\" = \"1\"\n     -+\tthen\n     -+\t\tignore_case=\"--ignore-case\"\n     -+\tfi\n       \n       \t__git for-each-ref --format=\"${pfx//\\%/%%}%(refname:strip=2)$sfx\" \\\n     -+\t\t\t$ignore_case \\\n     ++\t\t\t${GIT_COMPLETION_IGNORE_CASE+--ignore-case} \\\n       \t\t\t\"refs/remotes/$cur_*\" \"refs/remotes/$cur_*/**\"\n       }\n       \n     -@@ contrib/completion/git-completion.bash: __git_remote_heads ()\n     - __git_tags ()\n     - {\n     +@@ contrib/completion/git-completion.bash: __git_tags ()\n       \tlocal pfx=\"${1-}\" cur_=\"${2-}\" sfx=\"${3-}\"\n     -+\tlocal ignore_case=\"\"\n     -+\n     -+\tif test \"${GIT_COMPLETION_IGNORE_CASE-}\" = \"1\"\n     -+\tthen\n     -+\t\tignore_case=\"--ignore-case\"\n     -+\tfi\n       \n       \t__git for-each-ref --format=\"${pfx//\\%/%%}%(refname:strip=2)$sfx\" \\\n     -+\t\t\t$ignore_case \\\n     ++\t\t\t${GIT_COMPLETION_IGNORE_CASE+--ignore-case} \\\n       \t\t\t\"refs/tags/$cur_*\" \"refs/tags/$cur_*/**\"\n       }\n       \n      @@ contrib/completion/git-completion.bash: __git_dwim_remote_heads ()\n     - {\n     - \tlocal pfx=\"${1-}\" cur_=\"${2-}\" sfx=\"${3-}\"\n     - \tlocal fer_pfx=\"${pfx//\\%/%%}\" # \"escape\" for-each-ref format specifiers\n     -+\tlocal ignore_case=\"\"\n     -+\n     -+\tif test \"${GIT_COMPLETION_IGNORE_CASE-}\" = \"1\"\n     -+\tthen\n     -+\t\tignore_case=\"--ignore-case\"\n     -+\tfi\n     - \n     - \t# employ the heuristic used by git checkout and git switch\n     - \t# Try to find a remote branch that cur_es the completion word\n       \t# but only output if the branch name is unique\n       \t__git for-each-ref --format=\"$fer_pfx%(refname:strip=3)$sfx\" \\\n       \t\t--sort=\"refname:strip=3\" \\\n     -+\t\t$ignore_case \\\n     ++\t\t${GIT_COMPLETION_IGNORE_CASE+--ignore-case} \\\n       \t\t\"refs/remotes/*/$cur_*\" \"refs/remotes/*/$cur_*/**\" | \\\n       \tuniq -u\n       }\n     -@@ contrib/completion/git-completion.bash: __git_refs ()\n     - \tlocal pfx=\"${3-}\" cur_=\"${4-$cur}\" sfx=\"${5-}\"\n     - \tlocal match=\"${4-}\"\n     - \tlocal fer_pfx=\"${pfx//\\%/%%}\" # \"escape\" for-each-ref format specifiers\n     -+\tlocal ignore_case=\"\"\n     - \n     - \t__git_find_repo_path\n     - \tdir=\"$__git_repo_path\"\n     -@@ contrib/completion/git-completion.bash: __git_refs ()\n     - \t\tfi\n     - \tfi\n     - \n     -+\tif test \"${GIT_COMPLETION_IGNORE_CASE-}\" = \"1\"\n     -+\tthen\n     -+\t\tignore_case=\"--ignore-case\"\n     -+\tfi\n     -+\n     - \tif [ \"$list_refs_from\" = path ]; then\n     - \t\tif [[ \"$cur_\" == ^* ]]; then\n     - \t\t\tpfx=\"$pfx^\"\n      @@ contrib/completion/git-completion.bash: __git_refs ()\n       \t\t\t;;\n       \t\tesac\n       \t\t__git_dir=\"$dir\" __git for-each-ref --format=\"$fer_pfx%($format)$sfx\" \\\n     -+\t\t\t$ignore_case \\\n     ++\t\t\t${GIT_COMPLETION_IGNORE_CASE+--ignore-case} \\\n       \t\t\t\"${refs[@]}\"\n       \t\tif [ -n \"$track\" ]; then\n       \t\t\t__git_dwim_remote_heads \"$pfx\" \"$match\" \"$sfx\"\n     @@ contrib/completion/git-completion.bash: __git_refs ()\n       \t\t\t$match*)\techo \"${pfx}HEAD$sfx\" ;;\n       \t\t\tesac\n       \t\t\t__git for-each-ref --format=\"$fer_pfx%(refname:strip=3)$sfx\" \\\n     -+\t\t\t\t$ignore_case \\\n     ++\t\t\t\t${GIT_COMPLETION_IGNORE_CASE+--ignore-case} \\\n       \t\t\t\t\"refs/remotes/$remote/$match*\" \\\n       \t\t\t\t\"refs/remotes/$remote/$match*/**\"\n       \t\telse\n     @@ t/t9902-completion.sh: test_expect_success 'checkout completes ref names' '\n      +\n      +test_expect_success 'checkout matches case insensitively with GIT_COMPLETION_IGNORE_CASE' '\n      +\t(\n     -+\t\t. \"$GIT_BUILD_DIR/contrib/completion/git-completion.bash\" &&\n     -+\t\tGIT_COMPLETION_IGNORE_CASE=1 && export GIT_COMPLETION_IGNORE_CASE &&\n     ++\t\tGIT_COMPLETION_IGNORE_CASE=1 &&\n      +\t\ttest_completion \"git checkout M\" <<-\\EOF\n      +\t\tmain Z\n      +\t\tmybranch Z\n 2:  c455e855395 ! 2:  480f6554c93 completion: add case-insensitive match of pseudorefs\n     @@ Metadata\n       ## Commit message ##\n          completion: add case-insensitive match of pseudorefs\n      \n     -    When GIT_COMPLETION_IGNORE_CASE=1, also allow lowercase completion text\n     -    like \"head\" to match HEAD and other pseudorefs.\n     +    When GIT_COMPLETION_IGNORE_CASE is set, also allow lowercase completion\n     +    text like \"head\" to match uppercase HEAD and other pseudorefs.\n      \n          Signed-off-by: Alison Winters <alisonatwork@outlook.com>\n      \n     @@ contrib/completion/git-completion.bash: __git_refs ()\n       \tlocal match=\"${4-}\"\n      +\tlocal umatch=\"${4-}\"\n       \tlocal fer_pfx=\"${pfx//\\%/%%}\" # \"escape\" for-each-ref format specifiers\n     - \tlocal ignore_case=\"\"\n       \n     + \t__git_find_repo_path\n      @@ contrib/completion/git-completion.bash: __git_refs ()\n     - \tif test \"${GIT_COMPLETION_IGNORE_CASE-}\" = \"1\"\n     - \tthen\n     - \t\tignore_case=\"--ignore-case\"\n     -+\t\t# use tr instead of ${match,^^} to preserve bash 3.2 compatibility\n     -+\t\tumatch=$(echo \"$match\" | tr a-z A-Z 2> /dev/null || echo \"$match\")\n     + \t\tfi\n       \tfi\n       \n     ++\tif test \"${GIT_COMPLETION_IGNORE_CASE:+1}\" = \"1\"\n     ++\tthen\n     ++\t\t# uppercase with tr instead of ${match,^^} for bash 3.2 compatibility\n     ++\t\tumatch=$(echo \"$match\" | tr a-z A-Z 2>/dev/null || echo \"$match\")\n     ++\tfi\n     ++\n       \tif [ \"$list_refs_from\" = path ]; then\n     -@@ contrib/completion/git-completion.bash: __git_refs ()\n     + \t\tif [[ \"$cur_\" == ^* ]]; then\n     + \t\t\tpfx=\"$pfx^\"\n       \t\t\tfer_pfx=\"$fer_pfx^\"\n       \t\t\tcur_=${cur_#^}\n       \t\t\tmatch=${match#^}\n     @@ contrib/completion/git-completion.bash: __git_refs ()\n      +\t\t\t$match*|$umatch*)\techo \"${pfx}HEAD$sfx\" ;;\n       \t\t\tesac\n       \t\t\t__git for-each-ref --format=\"$fer_pfx%(refname:strip=3)$sfx\" \\\n     - \t\t\t\t$ignore_case \\\n     + \t\t\t\t${GIT_COMPLETION_IGNORE_CASE+--ignore-case} \\\n      @@ contrib/completion/git-completion.bash: __git_refs ()\n       \t\telse\n       \t\t\tlocal query_symref\n     @@ t/t9902-completion.sh: test_expect_success 'checkout matches case insensitively\n      +\n      +test_expect_success 'checkout completes pseudo refs case insensitively with GIT_COMPLETION_IGNORE_CASE' '\n      +\t(\n     -+\t\t. \"$GIT_BUILD_DIR/contrib/completion/git-completion.bash\" &&\n     -+\t\tGIT_COMPLETION_IGNORE_CASE=1 && export GIT_COMPLETION_IGNORE_CASE &&\n     ++\t\tGIT_COMPLETION_IGNORE_CASE=1 &&\n      +\t\ttest_completion \"git checkout h\" <<-\\EOF\n      +\t\tHEAD Z\n      +\t\tEOF\n\n-- \ngitgitgadget\n"},{"id":"467640","messageId":"480f6554c9361781ecee9067b85eb33d7189e5c6.1668990419.git.gitgitgadget@gmail.com","threadId":"58751","inReplyTo":"pull.1374.v2.git.git.1668990419.gitgitgadget@gmail.com","subject":"[PATCH v2 2/2] completion: add case-insensitive match of pseudorefs","fromName":"Alison Winters via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2022-11-21T00:26:59Z","receivedAt":"2022-11-21T00:27:44Z","isPatch":true,"sender":{"key":"alisonatwork@outlook.com","avatar":"https://avatars.githubusercontent.com/u/660556?v=4"},"body":"From: Alison Winters <alisonatwork@outlook.com>\n\nWhen GIT_COMPLETION_IGNORE_CASE is set, also allow lowercase completion\ntext like \"head\" to match uppercase HEAD and other pseudorefs.\n\nSigned-off-by: Alison Winters <alisonatwork@outlook.com>\n---\n contrib/completion/git-completion.bash | 14 +++++++++++---\n t/t9902-completion.sh                  | 15 +++++++++++++++\n 2 files changed, 26 insertions(+), 3 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 7dcf4b63562..dc95c34cc85 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -722,6 +722,7 @@ __git_refs ()\n \tlocal format refs\n \tlocal pfx=\"${3-}\" cur_=\"${4-$cur}\" sfx=\"${5-}\"\n \tlocal match=\"${4-}\"\n+\tlocal umatch=\"${4-}\"\n \tlocal fer_pfx=\"${pfx//\\%/%%}\" # \"escape\" for-each-ref format specifiers\n \n \t__git_find_repo_path\n@@ -745,12 +746,19 @@ __git_refs ()\n \t\tfi\n \tfi\n \n+\tif test \"${GIT_COMPLETION_IGNORE_CASE:+1}\" = \"1\"\n+\tthen\n+\t\t# uppercase with tr instead of ${match,^^} for bash 3.2 compatibility\n+\t\tumatch=$(echo \"$match\" | tr a-z A-Z 2>/dev/null || echo \"$match\")\n+\tfi\n+\n \tif [ \"$list_refs_from\" = path ]; then\n \t\tif [[ \"$cur_\" == ^* ]]; then\n \t\t\tpfx=\"$pfx^\"\n \t\t\tfer_pfx=\"$fer_pfx^\"\n \t\t\tcur_=${cur_#^}\n \t\t\tmatch=${match#^}\n+\t\t\tumatch=${umatch#^}\n \t\tfi\n \t\tcase \"$cur_\" in\n \t\trefs|refs/*)\n@@ -761,7 +769,7 @@ __git_refs ()\n \t\t*)\n \t\t\tfor i in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD REBASE_HEAD CHERRY_PICK_HEAD; do\n \t\t\t\tcase \"$i\" in\n-\t\t\t\t$match*)\n+\t\t\t\t$match*|$umatch*)\n \t\t\t\t\tif [ -e \"$dir/$i\" ]; then\n \t\t\t\t\t\techo \"$pfx$i$sfx\"\n \t\t\t\t\tfi\n@@ -795,7 +803,7 @@ __git_refs ()\n \t*)\n \t\tif [ \"$list_refs_from\" = remote ]; then\n \t\t\tcase \"HEAD\" in\n-\t\t\t$match*)\techo \"${pfx}HEAD$sfx\" ;;\n+\t\t\t$match*|$umatch*)\techo \"${pfx}HEAD$sfx\" ;;\n \t\t\tesac\n \t\t\t__git for-each-ref --format=\"$fer_pfx%(refname:strip=3)$sfx\" \\\n \t\t\t\t${GIT_COMPLETION_IGNORE_CASE+--ignore-case} \\\n@@ -804,7 +812,7 @@ __git_refs ()\n \t\telse\n \t\t\tlocal query_symref\n \t\t\tcase \"HEAD\" in\n-\t\t\t$match*)\tquery_symref=\"HEAD\" ;;\n+\t\t\t$match*|$umatch*)\tquery_symref=\"HEAD\" ;;\n \t\t\tesac\n \t\t\t__git ls-remote \"$remote\" $query_symref \\\n \t\t\t\t\"refs/tags/$match*\" \"refs/heads/$match*\" \\\ndiff --git a/t/t9902-completion.sh b/t/t9902-completion.sh\nindex d89d0a93a2a..d6c0478d98b 100755\n--- a/t/t9902-completion.sh\n+++ b/t/t9902-completion.sh\n@@ -2270,6 +2270,21 @@ test_expect_success 'checkout matches case insensitively with GIT_COMPLETION_IGN\n \t)\n '\n \n+test_expect_success 'checkout completes pseudo refs' '\n+\ttest_completion \"git checkout H\" <<-\\EOF\n+\tHEAD Z\n+\tEOF\n+'\n+\n+test_expect_success 'checkout completes pseudo refs case insensitively with GIT_COMPLETION_IGNORE_CASE' '\n+\t(\n+\t\tGIT_COMPLETION_IGNORE_CASE=1 &&\n+\t\ttest_completion \"git checkout h\" <<-\\EOF\n+\t\tHEAD Z\n+\t\tEOF\n+\t)\n+'\n+\n test_expect_success 'git -C <path> checkout uses the right repo' '\n \ttest_completion \"git -C subdir -C subsubdir -C .. -C ../otherrepo checkout b\" <<-\\EOF\n \tbranch-in-other Z\n-- \ngitgitgadget\n"},{"id":"468150","messageId":"xmqqedtm4h93.fsf@gitster.g","threadId":"58751","inReplyTo":"pull.1374.git.git.1667669315.gitgitgadget@gmail.com","subject":"Re: [PATCH 0/2] add case insensitivity option to bash completion","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-11-29T02:38:32Z","receivedAt":"2022-11-29T02:38:39Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Alison Winters via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> In 3bb16a8bf2 (tag, branch, for-each-ref: add --ignore-case for sorting and\n> filtering, 2016-12-04), support was added for filtering and sorting refs in\n> a case insensitive way. This is a behavior that seems appropriate to enable\n> with shell completion. Many shells provide case insensitive completion as an\n> option, even on filesystems that remain case sensitive.\n>\n> This patch adds a new variable that, when set, will allow Bash completion to\n> use the --ignore-case option to match refs. Additionally, some basic support\n> is implemented to match pseudorefs like HEAD.\n\nI did not try to figure out the reason but the topic with its tests\nseem to break in 'seen' the linux-cmake-ctest CI job.\n\n  https://github.com/git/git/actions/runs/3570230611/jobs/6001013549\n\nbut the same test does not break under usual \"make test\".\n\nCan people who are interested in the cmake-ctest stuff take a look?\n\nIt is tempting to eject the ab/cmake-nix-and-ci topic that is\nalready in 'next', under the theory that what that topic does to the\ntests \"works\" for some tests but not for others, and this topic is\nan unfortunate collateral damage whose tests weren't something the\nother topic supports well.  If the cmake-ctest stuff is in such a\nshape, then it may have been a bit premature to merge it down.\n\nThanks.\n"},{"id":"468194","messageId":"PRAP192MB1506B74F9BB25061419FA228DE129@PRAP192MB1506.EURP192.PROD.OUTLOOK.COM","threadId":"58751","inReplyTo":"xmqqedtm4h93.fsf@gitster.g","subject":"Re: [PATCH 0/2] add case insensitivity option to bash completion","fromName":"Alison Winters","fromEmail":"alisonatwork@outlook.com","sentAt":"2022-11-29T15:56:21Z","receivedAt":"2022-11-29T15:57:14Z","isPatch":true,"sender":{"key":"alisonatwork@outlook.com","avatar":"https://avatars.githubusercontent.com/u/660556?v=4"},"body":"On 2022-11-29 10:38, Junio C Hamano wrote:\n > I did not try to figure out the reason but the topic with its tests\n > seem to break in 'seen' the linux-cmake-ctest CI job.\n >\n > https://github.com/git/git/actions/runs/3570230611/jobs/6001013549\n >\n > but the same test does not break under usual \"make test\".\n\nI cannot speak for how the changes of the ab/cmake-nix-and-ci impact\nthe aw/complete-case-insensitive branch, but the failure seems to be\npointing to a test that I have since changed in the v2 patch, on the\nsuggestion of Szeder Gabor. The variable is no longer exported and\nthe script is no longer sourced a second time. I don't know if those\nv2 changes would change the results of this test, but they might be a\nstarting point for the other people CC:ed here to consider.\n\nAlison\n\n"},{"id":"468196","messageId":"221129.86y1rtirhl.gmgdl@evledraar.gmail.com","threadId":"58751","inReplyTo":"PRAP192MB1506B74F9BB25061419FA228DE129@PRAP192MB1506.EURP192.PROD.OUTLOOK.COM","subject":"Re: [PATCH 0/2] add case insensitivity option to bash completion","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-11-29T17:40:40Z","receivedAt":"2022-11-29T17:46:08Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Tue, Nov 29 2022, Alison Winters wrote:\n\n> On 2022-11-29 10:38, Junio C Hamano wrote:\n>> I did not try to figure out the reason but the topic with its tests\n>> seem to break in 'seen' the linux-cmake-ctest CI job.\n>>\n>> https://github.com/git/git/actions/runs/3570230611/jobs/6001013549\n>>\n>> but the same test does not break under usual \"make test\".\n>\n> I cannot speak for how the changes of the ab/cmake-nix-and-ci impact\n> the aw/complete-case-insensitive branch, but the failure seems to be\n> pointing to a test that I have since changed in the v2 patch, on the\n> suggestion of Szeder Gabor. The variable is no longer exported and\n> the script is no longer sourced a second time. I don't know if those\n> v2 changes would change the results of this test, but they might be a\n> starting point for the other people CC:ed here to consider.\n\nThe breakage is due to a semantic conflict between the two, which is\nsolved thusly:\n\t\n\tdiff --git a/t/t9902-completion.sh b/t/t9902-completion.sh\n\tindex d45d820da28..2aa128075ca 100755\n\t--- a/t/t9902-completion.sh\n\t+++ b/t/t9902-completion.sh\n\t@@ -2261,7 +2261,7 @@ test_expect_success 'checkout does not match ref names of a different case' '\n\t \n\t test_expect_success 'checkout matches case insensitively with GIT_COMPLETION_IGNORE_CASE' '\n\t \t(\n\t-\t\t. \"$GIT_BUILD_DIR/contrib/completion/git-completion.bash\" &&\n\t+\t\t. \"$GIT_SOURCE_DIR/contrib/completion/git-completion.bash\" &&\n\t \t\tGIT_COMPLETION_IGNORE_CASE=1 && export GIT_COMPLETION_IGNORE_CASE &&\n\t \t\ttest_completion \"git checkout M\" <<-\\EOF\n\t \t\tmain Z\n\t@@ -2279,7 +2279,7 @@ test_expect_success 'checkout completes pseudo refs' '\n\t \n\t test_expect_success 'checkout completes pseudo refs case insensitively with GIT_COMPLETION_IGNORE_CASE' '\n\t \t(\n\t-\t\t. \"$GIT_BUILD_DIR/contrib/completion/git-completion.bash\" &&\n\t+\t\t. \"$GIT_SOURCE_DIR/contrib/completion/git-completion.bash\" &&\n\t \t\tGIT_COMPLETION_IGNORE_CASE=1 && export GIT_COMPLETION_IGNORE_CASE &&\n\t \t\ttest_completion \"git checkout h\" <<-\\EOF\n\t \t\tHEAD Z\n\nJunio: I don't think this warrants kicking out the cmake topic. This\nsort of problem is just going to occur while something like that is\nin-flight, or Alison would have otherwise presumably seen it as a CI\nfailure if based off \"master\".\n\nWith hindsight I could have made e74e51a9154 (cmake & test-lib.sh: add a\n$GIT_SOURCE_DIR variable, 2022-11-03) do the migration in two phases,\nbut I didn't expect another topic to rely on the relatively obscure bits\nthat were being copied to the $GIT_BUILD_DIR, we weren't exactly\ndrowning in git-completion.bash patches...\n"},{"id":"468215","messageId":"PRAP192MB15064FE07E86792F36FCE267DE159@PRAP192MB1506.EURP192.PROD.OUTLOOK.COM","threadId":"58751","inReplyTo":"221129.86y1rtirhl.gmgdl@evledraar.gmail.com","subject":"Re: [PATCH 0/2] add case insensitivity option to bash completion","fromName":"Alison Winters","fromEmail":"alisonatwork@outlook.com","sentAt":"2022-11-30T00:37:07Z","receivedAt":"2022-11-30T00:37:21Z","isPatch":true,"sender":{"key":"alisonatwork@outlook.com","avatar":"https://avatars.githubusercontent.com/u/660556?v=4"},"body":"On 2022-11-30 01:40, Ævar Arnfjörð Bjarmason wrote:\n >\n > On Tue, Nov 29 2022, Alison Winters wrote:\n >\n >> On 2022-11-29 10:38, Junio C Hamano wrote:\n >>> I did not try to figure out the reason but the topic with its tests\n >>> seem to break in 'seen' the linux-cmake-ctest CI job.\n >>>\n >>> https://github.com/git/git/actions/runs/3570230611/jobs/6001013549\n >>>\n >>> but the same test does not break under usual \"make test\".\n >>\n >> I cannot speak for how the changes of the ab/cmake-nix-and-ci impact\n >> the aw/complete-case-insensitive branch, but the failure seems to be\n >> pointing to a test that I have since changed in the v2 patch, on the\n >> suggestion of Szeder Gabor. The variable is no longer exported and\n >> the script is no longer sourced a second time. I don't know if those\n >> v2 changes would change the results of this test, but they might be a\n >> starting point for the other people CC:ed here to consider.\n >\n > The breakage is due to a semantic conflict between the two, which is\n > solved thusly:\n >\n >     diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh\n >     index d45d820da28..2aa128075ca 100755\n >     --- a/t/t9902-completion.sh\n >     +++ b/t/t9902-completion.sh\n >     @@ -2261,7 +2261,7 @@ test_expect_success 'checkout does not \nmatch ref names of a different case' '\n >\n >      test_expect_success 'checkout matches case insensitively with \nGIT_COMPLETION_IGNORE_CASE' '\n >          (\n >     -        . \"$GIT_BUILD_DIR/contrib/completion/git-completion.bash\" &&\n >     +        . \n\"$GIT_SOURCE_DIR/contrib/completion/git-completion.bash\" &&\n >              GIT_COMPLETION_IGNORE_CASE=1 && export \nGIT_COMPLETION_IGNORE_CASE &&\n >              test_completion \"git checkout M\" <<-\\EOF\n >              main Z\n >     @@ -2279,7 +2279,7 @@ test_expect_success 'checkout completes \npseudo refs' '\n >\n >      test_expect_success 'checkout completes pseudo refs case \ninsensitively with GIT_COMPLETION_IGNORE_CASE' '\n >          (\n >     -        . \"$GIT_BUILD_DIR/contrib/completion/git-completion.bash\" &&\n >     +        . \n\"$GIT_SOURCE_DIR/contrib/completion/git-completion.bash\" &&\n >              GIT_COMPLETION_IGNORE_CASE=1 && export \nGIT_COMPLETION_IGNORE_CASE &&\n >              test_completion \"git checkout h\" <<-\\EOF\n >              HEAD Z\n\nIn this case, I think the easiest solution will be to move the\naw/complete-case-insensitive branch forward to the v2 patch (posted to\nthe list @ 2022-11-21  0:26 UTC), which no longer includes this line.\n\nAlison\n"},{"id":"468221","messageId":"xmqqmt8916m4.fsf@gitster.g","threadId":"58751","inReplyTo":"PRAP192MB15064FE07E86792F36FCE267DE159@PRAP192MB1506.EURP192.PROD.OUTLOOK.COM","subject":"Re: [PATCH 0/2] add case insensitivity option to bash completion","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-11-30T03:08:51Z","receivedAt":"2022-11-30T03:08:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alison Winters <alisonatwork@outlook.com> writes:\n\n> In this case, I think the easiest solution will be to move the\n> aw/complete-case-insensitive branch forward to the v2 patch (posted to\n> the list @ 2022-11-21  0:26 UTC), which no longer includes this line.\n\nIndeed.  With <pull.1374.v2.git.git.1668990419.gitgitgadget@gmail.com>\nmerged on top of a known-good subset of 'seen', cmake-ctest thing did\nnot fail.\n\nhttps://github.com/git/git/actions/runs/3579752650/jobs/6021251201\n\nThanks.\n\nP.S. Ignore the osx-gcc job that was cancelled in the same run; as\nthis is not the only topic I have to deal with, I submitted a trial\nmerge into 'seen' of another topic after seeing cmake-ctest job\nfinish, but because of recent CI change to cancel an earlier job\nwhen a new job is started, it got auto-cancelled (which is mostly a\ngood thing for regular developer workflow, but not for me X-<)\n\n"}]}