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

Re: [PATCH] diff-cache path restriction fix.

From
Linus Torvalds <torvalds@osdl.org>
Date
May 25, 2005, 01:24 UTC
Message-ID
<Pine.LNX.4.58.0505241814220.2307@ppc970.osdl.org>
In-Reply-To
<7vekbwru6x.fsf@assigned-by-dhcp.cox.net>
On Tue, 24 May 2005, Junio C Hamano wrote:
Show 6 quoted lines
> >>>>> "LT" == Linus Torvalds <torvalds@osdl.org> writes:
> 
> LT> No, it's more broken than that.
> 
> I'll take a look at this later and submit an update, but an OT
> point I feel I should address.
I checked in the fixed arg parsing already ;)
Show 5 quoted lines
> The comparison lists things in the ascending order from left to
> right.  The fact that 1 comes before argc on that line of code
> visually makes it obvious that I am talking about argc being
> larger than one and that is the reason.  I'd write (argc < 4)
> not (4 > argc) for the same reason.
Hmm. According to that logic, ">" and ">=" is superfluous.

Also, what language do you actually speak? Every human language I know (admittedly, apart from Finnish they are all related) tends to say things like "if you have more than four children, you're in trouble", rather than saying "if four is less than the number of children you have".

Notice? People compare something _to_ a number. They don't compare a number to something. We say "if more than four", we don't say "if four is less".

Sadly, I can't get google to match "1 < x" and "x > 1" (it just considers all special characters to be basically whitespace, so "1 < x" matches "1 x" and "1.x" according to google. Usually google is a good way to get a feel for how common some phrase is, but not on things like this.

		Linus
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 17 in “diff-cache path restriction fix.”
  1. diff-cache path restriction fix.Junio C Hamano, May 25, 2005
  2. Linus TorvaldsMay 25, 2005
  3. Junio C HamanoMay 25, 2005
  4. Linus TorvaldsMay 25, 2005
  5. Junio C HamanoMay 25, 2005
  6. Russ AllberyMay 25, 2005
  7. Junio C HamanoMay 25, 2005
  8. Linus TorvaldsMay 25, 2005
  9. Junio C HamanoMay 25, 2005
  10. Ingo MolnarMay 25, 2005
  11. Linus TorvaldsMay 25, 2005
  12. Junio C HamanoMay 25, 2005
  13. Thomas GlanzmannMay 25, 2005
  14. Matthias UrlichsMay 25, 2005
  15. [OT] if (4 < number_of_children) you're in troubleJunio C Hamano, May 28, 2005
  16. Ingo MolnarMay 25, 2005
  17. Florian WeimerMay 25, 2005

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.