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
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Mar 27, 2017, 18:05 UTC
Message-ID
<CACBZZX5nMuQ7jumdxShynaQ_F8Av3fudbbBZ4iG2Jv9wcjh5_g@mail.gmail.com>
In-Reply-To
<xmqqshly1um4.fsf@gitster.mtv.corp.google.com>
On Mon, Mar 27, 2017 at 7:45 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 87 quoted lines
> Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
>
>> 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.
>
>> @@ -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.
All of the above sounds good, thanks for fixing it up.
Previous: Junio C HamanoNext: Ævar Arnfjörð Bjarmason
Message 12 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.