git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: git@vger.kernel.org
Subject: lstat() call in rev-parse.c
Date: Sun, 23 Apr 2006 22:03:46 +1000	[thread overview]
Message-ID: <17483.27938.890830.375324@cargo.ozlabs.ibm.com> (raw)

Why does git-rev-parse do an lstat on some of its arguments, at line
345 of rev-parse.c, and die if the lstat fails?  It doesn't seem to do
anything with the result.

The effect is that if you do "gitk a b", it works as long as a and b
exist (as files or directories), but fails if they don't, and some
users have found this confusing.  Yes they should put in a --, but
it's not obvious to users why this should make it work in the case
when a or b doesn't exist.

(And yes I just took out the git-rev-parse call from gitk, but I'm
going to need to do git-rev-parse --no-refs --no-flags for some
changes I'm doing at the moment.)

Paul.

             reply	other threads:[~2006-04-23 12:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-23 12:03 Paul Mackerras [this message]
2006-04-23 16:19 ` lstat() call in rev-parse.c Linus Torvalds
2006-04-24 23:23   ` Paul Mackerras
2006-04-26 15:28   ` Matthias Lederhofer
2006-04-26 15:43     ` Linus Torvalds
2006-04-26 17:15       ` [PATCH] Fix filename verification when in a subdirectory Linus Torvalds
2006-04-26 18:05         ` Timo Hirvonen
2006-04-26 18:14           ` Linus Torvalds

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

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

  git send-email \
    --in-reply-to=17483.27938.890830.375324@cargo.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=git@vger.kernel.org \
    /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.
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 NNTP newsgroup(s).