# [PATCH] blame: display a more helpful error message if the file was deleted

2 messages from 2016-01-29 to 2016-01-29. Participants: Alex Henrie.
Thread: https://gitlist.dev/t/41283

## Alex Henrie, 2016-01-29 03:09

Subject: [PATCH] blame: display a more helpful error message if the file was deleted
Message-ID: <1454036971-26287-1-git-send-email-alexhenrie24@gmail.com>
URL: https://gitlist.dev/e/1454036971-26287-1-git-send-email-alexhenrie24%40gmail.com

```
`git blame 22414770 generate-cmdlist.perl` currently results in:
    fatal: cannot stat path '22414770': No such file or directory

This patch changes the error message to:
    fatal: ambiguous argument 'generate-cmdlist.perl': unknown revision
    or path not in the working tree.
    Use '--' to separate paths from revisions, like this:
    'git <command> [<revision>...] -- [<file>...]'"

That way, the user knows to rewrite the command as
`git blame 22414770 -- generate-cmdlist.perl`.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
---
 builtin/blame.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/builtin/blame.c b/builtin/blame.c
index 55bf5fa..9461a73 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -2704,8 +2704,6 @@ parse_done:
 		argv[argc - 1] = "--";
 
 		setup_work_tree();
-		if (!file_exists(path))
-			die_errno("cannot stat path '%s'", path);
 	}
 
 	revs.disable_stdin = 1;
-- 
2.7.0

```

## Alex Henrie, 2016-01-29 03:10

Subject: Re: [PATCH] blame: display a more helpful error message if the file was deleted
Message-ID: <CAMMLpeSkBxUwH1P=rROVVXK=Z+3V=9mfhqxp8gcx9_D6eU3dTA@mail.gmail.com>
URL: https://gitlist.dev/e/CAMMLpeSkBxUwH1P%3DrROVVXK%3DZ%2B3V%3D9mfhqxp8gcx9_D6eU3dTA%40mail.gmail.com
In-Reply-To: <1454036971-26287-1-git-send-email-alexhenrie24@gmail.com>

```
Sorry, wrong patch...this issue has already been fixed

-Alex

```
