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

Re: [PATCH] git-submodule.sh: avoid "test <cond> -a/-o <cond>"

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 10, 2014, 15:36 UTC
Message-ID
<xmqqtx7sai9t.fsf@gitster.dls.corp.google.com>
In-Reply-To
<53972229.5040104@viscovery.net>
Johannes Sixt <j.sixt@viscovery.net> writes:
Show 16 quoted lines
> Am 6/10/2014 16:55, schrieb Junio C Hamano:
>> Elia Pinto <gitter.spiros@gmail.com> writes:
>> 
>>> @@ -832,7 +832,7 @@ Maybe you want to use 'update --init'?")"
>>>  			continue
>>>  		fi
>>>  
>>> -		if ! test -d "$sm_path"/.git -o -f "$sm_path"/.git
>>> +		if ! test -d "$sm_path"/.git || test -f "$sm_path"/.git
>> 
>> Which part of test conditions does that "!" apply in the original,
>> and in the updated? 
>> 
>> I think the new test after || also needs negation, no?
>
> Not just that; the || must be turned into && as well.
I think our mails crossed ;-)
Previous: Johannes Sixt
Message 8 of 8 in “git-submodule.sh: avoid "test <cond> -a/-o <cond>"”
  1. git-submodule.sh: avoid "test <cond> -a/-o <cond>"Elia Pinto, Jun 10, 2014
  2. Junio C HamanoJun 10, 2014
  3. Torsten BögershausenJun 10, 2014
  4. Junio C HamanoJun 10, 2014
  5. Junio C HamanoJun 10, 2014
  6. Junio C HamanoJun 10, 2014
  7. Johannes SixtJun 10, 2014
  8. Junio C HamanoJun 10, 2014

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.