Message ID | xmqqjzpfje33.fsf_-_@gitster.g (mailing list archive) |
---|---|
State | Accepted |
Commit | 6d6f1cd7eea0158ef22fb8b9a1675b860a3bc7ae |
Headers | show |
Series | doc: format.notes specify a ref under refs/notes/ hierarchy | expand |
On Fri, Dec 15, 2023 at 02:28:00PM -0800, Junio C Hamano wrote: > There is no 'ref/notes/' hierarchy. '[format] notes = foo' uses notes > that are found in 'refs/notes/foo'. > > Signed-off-by: Junio C Hamano <gitster@pobox.com> > --- > * According to my eyeballing "git grep refs/ Documentation" result, > this was the only remaining mention of "ref/" in Documentation/ > hierarchy that misspells "refs/". This made me look for additional instances where we were referring to "ref/". Turns out it's only a very limited set, see the below diff. Take the translation changes with a big grain of salt though, and neither am I sure whether we want to fix up past release notes. Also, the test is interesting because it would fail even if we didn't pass an invalid atom to git-for-each-ref(1). Anyway, the patch you have looks obviously correct to me. I would be happy to turn the below diff into a proper patch, but also wouldn't mind to let you roll them into your patch series. Please let me know your preference. Patrick diff --git a/Documentation/RelNotes/2.1.1.txt b/Documentation/RelNotes/2.1.1.txt index 830fc3cc6d..d46e142119 100644 --- a/Documentation/RelNotes/2.1.1.txt +++ b/Documentation/RelNotes/2.1.1.txt @@ -29,7 +29,7 @@ Git v2.1.1 Release Notes * "git add x" where x that used to be a directory has become a symbolic link to a directory misbehaved. - * The prompt script checked $GIT_DIR/ref/stash file to see if there + * The prompt script checked $GIT_DIR/refs/stash file to see if there is a stash, which was a no-no. * "git checkout -m" did not switch to another branch while carrying diff --git a/Documentation/RelNotes/2.2.0.txt b/Documentation/RelNotes/2.2.0.txt index e98ecbcff6..806908ddb2 100644 --- a/Documentation/RelNotes/2.2.0.txt +++ b/Documentation/RelNotes/2.2.0.txt @@ -205,7 +205,7 @@ notes for details). * "git add x" where x used to be a directory and is now a symbolic link to a directory misbehaved. - * The prompt script checked the $GIT_DIR/ref/stash file to see if there + * The prompt script checked the $GIT_DIR/refs/stash file to see if there is a stash, which was a no-no. * Pack-protocol documentation had a minor typo. diff --git a/po/fr.po b/po/fr.po index ee2e610ef1..744550b056 100644 --- a/po/fr.po +++ b/po/fr.po @@ -19773,7 +19773,7 @@ msgid "" "Neither worked, so we gave up. You must fully qualify the ref." msgstr "" "La destination que vous avez fournie n'est pas un nom de référence complète\n" -"(c'est-à-dire commençant par \"ref/\"). Essai d'approximation par :\n" +"(c'est-à-dire commençant par \"refs/\"). Essai d'approximation par :\n" "\n" "- Recherche d'une référence qui correspond à '%s' sur le serveur distant.\n" "- Vérification si la <source> en cours de poussée ('%s')\n" diff --git a/po/zh_CN.po b/po/zh_CN.po index 86402725b2..eb47e8f9b7 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -13224,8 +13224,8 @@ msgid "" msgid_plural "" "Note: Some branches outside the refs/remotes/ hierarchy were not removed;\n" "to delete them, use:" -msgstr[0] "注意:ref/remotes 层级之外的一个分支未被移除。要删除它,使用:" -msgstr[1] "注意:ref/remotes 层级之外的一些分支未被移除。要删除它们,使用:" +msgstr[0] "注意:refs/remotes 层级之外的一个分支未被移除。要删除它,使用:" +msgstr[1] "注意:refs/remotes 层级之外的一些分支未被移除。要删除它们,使用:" #: builtin/remote.c #, c-format diff --git a/po/zh_TW.po b/po/zh_TW.po index f777a0596f..b2a79cdd93 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -13109,7 +13109,7 @@ msgid "" msgid_plural "" "Note: Some branches outside the refs/remotes/ hierarchy were not removed;\n" "to delete them, use:" -msgstr[0] "注意:ref/remotes 層級之外的一個分支未被移除。要刪除它,使用:" +msgstr[0] "注意:refs/remotes 層級之外的一個分支未被移除。要刪除它,使用:" #: builtin/remote.c #, c-format diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh index 54e2281259..e68f7bec8e 100755 --- a/t/t6300-for-each-ref.sh +++ b/t/t6300-for-each-ref.sh @@ -841,7 +841,7 @@ test_expect_success 'err on bad describe atom arg' ' EOF test_must_fail git for-each-ref \ --format="%(describe:tags,qux=1,abbrev=14)" \ - ref/heads/master 2>actual && + refs/heads/master 2>actual && test_cmp expect actual ) '
Patrick Steinhardt <ps@pks.im> writes: > On Fri, Dec 15, 2023 at 02:28:00PM -0800, Junio C Hamano wrote: >> There is no 'ref/notes/' hierarchy. '[format] notes = foo' uses notes >> that are found in 'refs/notes/foo'. >> >> Signed-off-by: Junio C Hamano <gitster@pobox.com> >> --- >> * According to my eyeballing "git grep refs/ Documentation" result, >> this was the only remaining mention of "ref/" in Documentation/ >> hierarchy that misspells "refs/". > > This made me look for additional instances where we were referring to > "ref/". Turns out it's only a very limited set, see the below diff. Yup, I did the same grep, but I tend to avoid churning what we published long ago (and kept in Documentation/RelNotes/), my patches only covered documents that are still relevant. > the translation changes with a big grain of salt though, Hopefully pinging Jiang would be sufficient to ask help from the French, Chinese, and Taiwaneese translation teams. > diff --git a/po/fr.po b/po/fr.po > index ee2e610ef1..744550b056 100644 > --- a/po/fr.po > +++ b/po/fr.po > @@ -19773,7 +19773,7 @@ msgid "" > "Neither worked, so we gave up. You must fully qualify the ref." > msgstr "" > "La destination que vous avez fournie n'est pas un nom de référence complète\n" > -"(c'est-à-dire commençant par \"ref/\"). Essai d'approximation par :\n" > +"(c'est-à-dire commençant par \"refs/\"). Essai d'approximation par :\n" > "\n" > "- Recherche d'une référence qui correspond à '%s' sur le serveur distant.\n" > "- Vérification si la <source> en cours de poussée ('%s')\n" > diff --git a/po/zh_CN.po b/po/zh_CN.po > index 86402725b2..eb47e8f9b7 100644 > --- a/po/zh_CN.po > +++ b/po/zh_CN.po > @@ -13224,8 +13224,8 @@ msgid "" > msgid_plural "" > "Note: Some branches outside the refs/remotes/ hierarchy were not removed;\n" > "to delete them, use:" > -msgstr[0] "注意:ref/remotes 层级之外的一个分支未被移除。要删除它,使用:" > -msgstr[1] "注意:ref/remotes 层级之外的一些分支未被移除。要删除它们,使用:" > +msgstr[0] "注意:refs/remotes 层级之外的一个分支未被移除。要删除它,使用:" > +msgstr[1] "注意:refs/remotes 层级之外的一些分支未被移除。要删除它们,使用:" > > #: builtin/remote.c > #, c-format > diff --git a/po/zh_TW.po b/po/zh_TW.po > index f777a0596f..b2a79cdd93 100644 > --- a/po/zh_TW.po > +++ b/po/zh_TW.po > @@ -13109,7 +13109,7 @@ msgid "" > msgid_plural "" > "Note: Some branches outside the refs/remotes/ hierarchy were not removed;\n" > "to delete them, use:" > -msgstr[0] "注意:ref/remotes 層級之外的一個分支未被移除。要刪除它,使用:" > +msgstr[0] "注意:refs/remotes 層級之外的一個分支未被移除。要刪除它,使用:" > > #: builtin/remote.c > #, c-format > Also, the test is > interesting because it would fail even if we didn't pass an invalid atom > to git-for-each-ref(1). It is interesting but not surprising. It is not an error to use ref patterns that do not match any ref. It is a mere pattern to filtering what are in refs/ for the ones to be output. > diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh > index 54e2281259..e68f7bec8e 100755 > --- a/t/t6300-for-each-ref.sh > +++ b/t/t6300-for-each-ref.sh > @@ -841,7 +841,7 @@ test_expect_success 'err on bad describe atom arg' ' > EOF > test_must_fail git for-each-ref \ > --format="%(describe:tags,qux=1,abbrev=14)" \ > - ref/heads/master 2>actual && > + refs/heads/master 2>actual && > test_cmp expect actual > ) > ' The "for-each-ref" family's "--format" string is first parsed and sanity-checked before it is applied. The bogus ref pattern may not yield any ref to apply the format string, but we do not optimize out the parsing and checking, even though we could, as it would be optimizing for a wrong case. So regardless of the ref pattern at the end of the command line does not make a difference to the outcome of this test.
On Tue, Dec 19, 2023 at 12:16 AM Junio C Hamano <gitster@pobox.com> wrote: > > Patrick Steinhardt <ps@pks.im> writes: > > the translation changes with a big grain of salt though, > > Hopefully pinging Jiang would be sufficient to ask help from the > French, Chinese, and Taiwaneese translation teams. The l10n team has a command line tool called git-po-helper that can check for spelling errors in translations, such as mismatched command names, configuration variables. A new pattern will be added to find mismatched reference prefixes, and the following typos will be fixed during the next localization window. > > diff --git a/po/fr.po b/po/fr.po > > index ee2e610ef1..744550b056 100644 > > --- a/po/fr.po > > +++ b/po/fr.po > > @@ -19773,7 +19773,7 @@ msgid "" > > "Neither worked, so we gave up. You must fully qualify the ref." > > msgstr "" > > "La destination que vous avez fournie n'est pas un nom de référence complète\n" > > -"(c'est-à-dire commençant par \"ref/\"). Essai d'approximation par :\n" > > +"(c'est-à-dire commençant par \"refs/\"). Essai d'approximation par :\n" > > "\n" > > "- Recherche d'une référence qui correspond à '%s' sur le serveur distant.\n" > > "- Vérification si la <source> en cours de poussée ('%s')\n" > > diff --git a/po/zh_CN.po b/po/zh_CN.po > > index 86402725b2..eb47e8f9b7 100644 > > --- a/po/zh_CN.po > > +++ b/po/zh_CN.po > > @@ -13224,8 +13224,8 @@ msgid "" > > msgid_plural "" > > "Note: Some branches outside the refs/remotes/ hierarchy were not removed;\n" > > "to delete them, use:" > > -msgstr[0] "注意:ref/remotes 层级之外的一个分支未被移除。要删除它,使用:" > > -msgstr[1] "注意:ref/remotes 层级之外的一些分支未被移除。要删除它们,使用:" > > +msgstr[0] "注意:refs/remotes 层级之外的一个分支未被移除。要删除它,使用:" > > +msgstr[1] "注意:refs/remotes 层级之外的一些分支未被移除。要删除它们,使用:" > > > > #: builtin/remote.c > > #, c-format > > diff --git a/po/zh_TW.po b/po/zh_TW.po > > index f777a0596f..b2a79cdd93 100644 > > --- a/po/zh_TW.po > > +++ b/po/zh_TW.po > > @@ -13109,7 +13109,7 @@ msgid "" > > msgid_plural "" > > "Note: Some branches outside the refs/remotes/ hierarchy were not removed;\n" > > "to delete them, use:" > > -msgstr[0] "注意:ref/remotes 層級之外的一個分支未被移除。要刪除它,使用:" > > +msgstr[0] "注意:refs/remotes 層級之外的一個分支未被移除。要刪除它,使用:" > > > > #: builtin/remote.c > > #, c-format
diff --git c/Documentation/config/format.txt w/Documentation/config/format.txt index c98412b697..7410e930e5 100644 --- c/Documentation/config/format.txt +++ w/Documentation/config/format.txt @@ -119,7 +119,7 @@ format.notes:: `--notes=<ref>`, where `ref` is the non-boolean value. Defaults to false. + -If one wishes to use the ref `ref/notes/true`, please use that literal +If one wishes to use the ref `refs/notes/true`, please use that literal instead. + This configuration can be specified multiple times in order to allow
There is no 'ref/notes/' hierarchy. '[format] notes = foo' uses notes that are found in 'refs/notes/foo'. Signed-off-by: Junio C Hamano <gitster@pobox.com> --- * According to my eyeballing "git grep refs/ Documentation" result, this was the only remaining mention of "ref/" in Documentation/ hierarchy that misspells "refs/". Documentation/config/format.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)