mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <>
To: "Érico Rolim" <>
Subject: Re: [BUG] segmentation fault in git-diff
Date: Thu, 09 Apr 2020 15:45:04 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <> (=?utf-8?Q?=22=C3=89rico?= Rolim"'s message of "Thu, 9 Apr 2020 19:22:34 -0300")

Érico Rolim <> writes:

> I have found a bug in the git-diff utility, which is reproducible in
> the next branch. In any repository, if I run
>     git diff :/any/path/
> (The important part is the trailing forward slash. No slash will
> generate either a valid diff or an error message about the path not
> being known. ":/" also works without issue)

This is 'next' running for me:

    $ git diff :/any/path
    fatal: ambiguous argument ':/any/path': unknown revision or path not in the working tree.
    Use '--' to separate paths from revisions, like this:
    'git <command> [<revision>...] -- [<file>...]'

If looking for a commit that has a string "any/path" in its commit
message may be consuming stack resources that are proportional to
the depth of the history, however, I can imagine that it might run
out of the memory and die, though.  Another thing that may be
interesting to try is to use "git rev-parse :/any/path" in the same
repository you are having trouble with.  If the "string :/any/path to
a revision" logic is where it is dying, it would die the same way.


  reply	other threads:[~2020-04-09 22:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-09 22:22 [BUG] segmentation fault in git-diff Érico Rolim
2020-04-09 22:45 ` Junio C Hamano [this message]
2020-04-09 22:47   ` Junio C Hamano
2020-04-09 22:57     ` Junio C Hamano
2020-04-09 23:37       ` Junio C Hamano
2020-04-09 23:41       ` Jeff King
2020-04-10  0:03         ` Re* " Junio C Hamano
2020-04-10  1:42           ` Érico Rolim
2020-04-10  3:04           ` Jeff King
2020-04-10  5:39             ` Junio C Hamano

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:

  List information:

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

  git send-email \ \ \ \ \

* 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

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).