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

Re: [PATCH] diff: add tests for --relative without optional prefix value

From
Jacob Keller <jacob.keller@gmail.com>
Date
Dec 7, 2017, 19:54 UTC
Message-ID
<CA+P7+xom-R3JX1ghZLDciRX=5zsJs=ngCX9iM=Y8m8TN5TX_=g@mail.gmail.com>
In-Reply-To
<xmqq374me4a7.fsf@gitster.mtv.corp.google.com>
On Thu, Dec 7, 2017 at 11:17 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 18 quoted lines
> Jacob Keller <jacob.e.keller@intel.com> writes:
>
>>  for type in diff numstat stat raw; do
>> -     check_$type file2 --relative=subdir/
>> -     check_$type file2 --relative=subdir
>> -     check_$type dir/file2 --relative=sub
>> +     check_$type . file2 --relative=subdir/
>> +     check_$type . file2 --relative=subdir
>> +     check_$type . dir/file2 --relative=sub
>> +     check_$type subdir file2 --relative
>
> OK, I didn't think it would be sensible to unconditionally pass the
> directory and use "-C ." as a no-op.  It looks good.
>
> I think the new one should go before the dir/file2 test; all three
> earlier tests (including this new one) are about taking a patch
> relative to subdir/ spelled in different ways, and the one about
> dir/file2 alone is different.

Yea, your patch looked fine to me, minus the use of subshells where we could avoid it.

I'm fine taking your version.

Thanks, Jake

Previous: Junio C HamanoNext: Jeff King
Message 3 of 7 in “diff: add tests for --relative without optional prefix value”
  1. diff: add tests for --relative without optional prefix valueJacob Keller, Dec 7, 2017
  2. Junio C HamanoDec 7, 2017
  3. Jacob KellerDec 7, 2017
  4. Jeff KingDec 7, 2017
  5. Jacob KellerDec 7, 2017
  6. Junio C HamanoDec 7, 2017
  7. Jacob KellerDec 7, 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.