git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "René Scharfe" <l.s.r@web.de>
Cc: rsbecker@nexbridge.com, git@vger.kernel.org
Subject: Re: [BUG] Git 2.38.0-rc1 t1800 message text comparison
Date: Tue, 06 Jun 2023 09:31:08 +0900	[thread overview]
Message-ID: <xmqqwn0h4ek3.fsf@gitster.g> (raw)
In-Reply-To: <28d808e4-77b4-d91e-8a86-c21287019b56@web.de> ("René Scharfe"'s message of "Sun, 4 Jun 2023 22:55:54 +0200")

René Scharfe <l.s.r@web.de> writes:

> What's the significance of "run" and "exec" here?  Why do we have both
> variants?  Is it to tell apart errors of the actual execve(2) call from
> those in code leading up to it (e.g. when searching the executable in
> $PATH)?  But at this point we are after the call, so why is ENOENT
> from execve(2) a "run" thing, not an "exec" thing?

I was reading output from

    $ git log --reverse -p -SNOENT 7e5d776854e.. run-command.c

45c0961c (run_command(): handle missing command errors more
gracefully, 2009-01-28) explains how we use NOENT to tell between
"we failed to run the command requested because it did not even
exist" and "we failed to run the command and the reason why it
failed is *not* because it did not exist" (the distinction matters
to implement "run command X on $PATH").  To further that, 38f865c2
(run-command: treat inaccessible directories as ENOENT, 2012-03-30)
and a7855083 (sane_execvp(): ignore non-directory on $PATH,
2012-07-31) dealt corner cases where entries on $PATH were
unreadable or were non-directories, but the idea should be the same.

All of the above matters purely when we fail silently (because we
expect only some directories on $PATH contain the command), and I
suspect that the phrasing differences when we _do_ tell the human
user what we failed to run does not matter all that much.


  reply	other threads:[~2023-06-06  0:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22 19:01 [BUG] Git 2.28.0-rc1 t1800 message text comparison rsbecker
2022-09-22 19:02 ` [BUG] Git 2.38.0-rc1 " rsbecker
2022-09-23 20:43 ` rsbecker
2022-12-14  5:53   ` rsbecker
2023-05-22 20:39     ` René Scharfe
2023-05-22 20:49       ` rsbecker
2023-05-22 21:13         ` rsbecker
2023-06-04 12:13           ` René Scharfe
2023-06-04 20:55             ` René Scharfe
2023-06-06  0:31               ` Junio C Hamano [this message]
2023-06-10 14:51                 ` [PATCH 1/2] t1800: loosen matching of error message for bad shebang René Scharfe
2023-06-12 18:01                   ` Junio C Hamano
2023-06-10 14:51                 ` [PATCH 2/2] run-command: report exec error even on ENOENT René Scharfe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqwn0h4ek3.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=l.s.r@web.de \
    --cc=rsbecker@nexbridge.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).