Re: bad error message - Not a git repository (or any of the parent directories): .git

2019-10-04 Thread Johannes Schindelin
Hi Alexander,

On Thu, 3 Oct 2019, Alexander Mills wrote:

> when running git commands outside of a git repo, we often see:
>
> fatal: Not a git repository (or any of the parent directories): .git
>
> such a lame message lol.

An equally ornery response might point out that reporting this as a bug
instead of providing a patch is probably just as "lame"... :-)

> can we get an absolute path on this message in future git versions, eg:
>
> Not a git repository (or any of the parent directories): /home/ubuntu/xyz/.git

Just clone https://github.com/git/git, then look for that error message:

-- snip --
$ git grep -A1 "or any of the parent" \*.[ch]
setup.c:die(_("not a git repository (or any of the 
parent directories): %s"),
setup.c-DEFAULT_GIT_DIR_ENVIRONMENT);
-- snap --

You can then wrap the argument in that second line in `absolute_path()`,
build (using `make -j$(nproc)` on Linux), and test (use
`/path/to/git/bin-wrappers/git` instead of regular `git` to test without
installing). Once everything works as you expect it, commit it.

Please make sure that your commit message focuses on answering the
question "why?" more than on "how?", and that it wraps at <= 76 columns
per line. Also do make sure to add your sign off
(https://git-scm.com/docs/SubmittingPatches#sign-off).

Finally send the patch to the mailing list for review. You can use
GitGitGadget (https://gitgitgadget.github.io), submitGit
(https://submitgit.herokuapp.com) or send it manually
(https://github.com/git-for-windows/git/blob/master/CONTRIBUTING.md#submit-your-patch).

Ciao,
Johannes

> ty
>
> -alex
>
> --
> Alexander D. Mills
> New cell phone # (415)730-1805
> alexander.d.mi...@gmail.com
>
> www.linkedin.com/pub/alexander-mills/b/7a5/418/
>


bad error message - Not a git repository (or any of the parent directories): .git

2019-10-03 Thread Alexander Mills
when running git commands outside of a git repo, we often see:

fatal: Not a git repository (or any of the parent directories): .git

such a lame message lol.
can we get an absolute path on this message in future git versions, eg:

Not a git repository (or any of the parent directories): /home/ubuntu/xyz/.git

ty

-alex

-- 
Alexander D. Mills
New cell phone # (415)730-1805
alexander.d.mi...@gmail.com

www.linkedin.com/pub/alexander-mills/b/7a5/418/