From: "Kristoffer Haugsbakk" <code@khaugsbakk.name>
To: "Jeff King" <peff@peff.net>
Cc: git@vger.kernel.org, "ks1322 ks1322" <ks1322@gmail.com>
Subject: Re: [PATCH] grep: die gracefully when outside repository
Date: Sun, 15 Oct 2023 10:00:20 +0200 [thread overview]
Message-ID: <b953efce-da38-4dbc-9032-985481f3d721@app.fastmail.com> (raw)
In-Reply-To: <20231015032636.GC554702@coredump.intra.peff.net>
On Sun, Oct 15, 2023, at 05:26, Jeff King wrote:
> Is it even reasonable for "grep --no-index" to care about leaving the
> tree in the first place? That is, is there a reason we should not allow:
>
> git grep --no-index foo ../bar
>
> ?
On second thought yeah, it doesn't make sense. We are outside of any
repository already so what does it matter where the file is relative to
the current working directory?
It seems that `pathspec.c:init_pathspec_item` should let you through in
this case.
--
Kristoffer Haugsbakk
next prev parent reply other threads:[~2023-10-15 8:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-14 15:42 Bug: git grep --no-index 123 /dev/stdin crashes with SIGABRT ks1322 ks1322
2023-10-14 18:12 ` Kristoffer Haugsbakk
2023-10-14 19:37 ` Kristoffer Haugsbakk
2023-10-14 21:02 ` [PATCH] grep: die gracefully when outside repository Kristoffer Haugsbakk
2023-10-15 3:26 ` Jeff King
2023-10-15 8:00 ` Kristoffer Haugsbakk [this message]
2023-10-15 17:57 ` Junio C Hamano
2023-10-17 16:42 ` Junio C Hamano
2023-10-17 19:51 ` Kristoffer Haugsbakk
2023-10-17 20:25 ` Junio C Hamano
2023-10-17 20:39 ` Junio C Hamano
2023-10-20 16:40 ` [PATCH v2] " Kristoffer Haugsbakk
2023-10-20 17:05 ` Eric Sunshine
2023-10-20 18:06 ` Junio C Hamano
2023-10-20 18:04 ` [PATCH v3] " Kristoffer Haugsbakk
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=b953efce-da38-4dbc-9032-985481f3d721@app.fastmail.com \
--to=code@khaugsbakk.name \
--cc=git@vger.kernel.org \
--cc=ks1322@gmail.com \
--cc=peff@peff.net \
/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).