git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3] rev-parse: match @{upstream}, @{u} and @{push} case-insensitively

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 27, 2017, 17:45 UTC
Message-ID
<xmqqshly1um4.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170327111655.29941-1-avarab@gmail.com>
Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
Show 33 quoted lines
> Before this change:
>
>     |----------------+-----+------+-----|
>     | What?          | CI? | CIP? | AG? |
>     |----------------+-----+------+-----|
>     | sha1           | Y   | -    | N   |
>     | describeOutput | N   | N    | N   |
>     | refname        | N   | N    | N   |
>     | @{<date>}      | Y   | Y    | Y   |
>     | @{<n>}         | N/A | N/A  | N   |
>     | @{-<n>}        | N/A | N/A  | N   |
>     | @{upstream}    | N   | Y    | N   |
>     | @{push}        | N   | Y    | N   |
>     | ^{<type>}      | N   | Y    | N   |
>     | ^{/regex}      | N   | N    | N   |
>     |----------------+-----+------+-----|
>
> After it:
>
>     |----------------+-----+------+-----|
>     | What?          | CI? | CIP? | AG? |
>     |----------------+-----+------+-----|
>     | sha1           | Y   | -    | N   |
>     | describeOutput | N   | N    | N   |
>     | refname        | N   | N    | N   |
>     | @{<date>}      | Y   | Y    | Y   |
>     | @{<n>}         | N/A | N/A  | N   |
>     | @{-<n>}        | N/A | N/A  | N   |
>     | @{upstream}    | Y   | -    | N   |
>     | @{push}        | Y   | -    | N   |
>     | ^{<type>}      | N   | Y    | N   |
>     | ^{/regex}      | N   | N    | N   |
>     |----------------+-----+------+-----|

As we are not touching ^{<type>} or ^{/regex}, and it is obvious numbers do not have cases, I'll trim this down to focus only on things that are relevant while queuing:

    Before this change:
        |----------------+-----+------+-----|
        | What?          | CI? | CIP? | AG? |
        |----------------+-----+------+-----|
        | @{<date>}      | Y   | Y    | Y   |
        | @{upstream}    | N   | Y    | N   |
        | @{push}        | N   | Y    | N   |
        |----------------+-----+------+-----|
    After it:
        |----------------+-----+------+-----|
        | What?          | CI? | CIP? | AG? |
        |----------------+-----+------+-----|
        | @{<date>}      | Y   | Y    | Y   |
        | @{upstream}    | Y   | Y    | N   |
        | @{push}        | Y   | Y    | N   |
        |----------------+-----+------+-----|

should be sufficient to highlight that it was possible to safely make these two things case insensitive, and we made so.

For that matter, I do not know the value of AG? field---it only serves to show that @{<approxidate>} is an odd-man out and cannot be used as a good example to follow, but I am too lazy to remove it ;-)

> Makes sense, replaced that note with that summary. Here's hopefully a
> final v3 with that change. I've omitted the other two patches as noted
> in the discussion about those two, I don't think it makes sense to
> include them.
Thanks.
Show 7 quoted lines
> @@ -122,6 +123,9 @@ refs/remotes/myfork/mybranch
>  Note in the example that we set up a triangular workflow, where we pull
>  from one location and push to another. In a non-triangular workflow,
>  '@\{push}' is the same as '@\{upstream}', and there is no need for it.
> ++
> +This suffix is accepted when spelled in uppercase, and means the same
> +thing no matter the case.

As the above text (including the original) does not explicitly say that lowercase spelling is canonical, the new text is prone to be misinterpreted that only the uppercase version is accepted. I'll do s/is accepted/is also accepted/ while queuing, but please holler if there are better ways to phrase this.

Thanks.
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 11 of 24 in “rev-parse: match @{u}, @{push} and ^{<type>} case-insensitively”
  1. rev-parse: match @{u}, @{push} and ^{<type>} case-insensitivelyÆvar Arnfjörð Bjarmason, Mar 18, 2017
  2. Duy NguyenMar 19, 2017
  3. Ævar Arnfjörð BjarmasonMar 19, 2017
  4. Junio C HamanoMar 19, 2017
  5. Ævar Arnfjörð BjarmasonMar 19, 2017
  6. Junio C HamanoMar 19, 2017
  7. 0/3 rev-parse case insensitivity & @{p} synonymÆvar Arnfjörð Bjarmason, Mar 26, 2017
  8. 1/3 rev-parse: match @{upstream}, @{u} and @{push} case-insensitivelyÆvar Arnfjörð Bjarmason, Mar 26, 2017
  9. Junio C HamanoMar 27, 2017
  10. rev-parse: match @{upstream}, @{u} and @{push} case-insensitivelyÆvar Arnfjörð Bjarmason, Mar 27, 2017
  11. Junio C HamanoMar 27, 2017
  12. Ævar Arnfjörð BjarmasonMar 27, 2017
  13. 2/3 rev-parse: add @{p} as a synonym for @{push}Ævar Arnfjörð Bjarmason, Mar 26, 2017
  14. Jeff KingMar 27, 2017
  15. Ævar Arnfjörð BjarmasonMar 27, 2017
  16. 3/3 rev-parse: match ^{<type>} case-insensitivelyÆvar Arnfjörð Bjarmason, Mar 26, 2017
  17. Junio C HamanoMar 27, 2017
  18. Jeff KingMar 27, 2017
  19. Junio C HamanoMar 27, 2017
  20. Jeff KingMar 27, 2017
  21. Ævar Arnfjörð BjarmasonMar 27, 2017
  22. Ævar Arnfjörð BjarmasonMar 21, 2017
  23. Junio C HamanoMar 21, 2017
  24. Jeff KingMar 21, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.