git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [bug] git-rev-parse sometimes appends subdirectories to result
@ 2020-02-03 20:14 masukomi
  2020-02-03 20:45 ` masukomi
  0 siblings, 1 reply; 2+ messages in thread
From: masukomi @ 2020-02-03 20:14 UTC (permalink / raw)
  To: git

Expected behavior

No matter what subdirectory of my repo I am in git rev-parse
--show-toplevel will always return the same result

Actual behavior

Depending on what subdirectories you are in it will sometimes (not
always) start appending those subdirectories to the path.

Reproduction

My git repo root is at

/Users/masukomi/workspace/private_comments

If i run git rev-parse --show-toplevel within that directory it
returns the correct (identical) path.
If i run it within /Users/masukomi/workspace/private_comments/src it
returns the correct path (without the /src)
If I run it within
/Users/masukomi/workspace/private_comments/src/tests it suddenly
starts returning

/Users/masukomi/workspace/private_comments/src/tests

Notes

Git 2.25.0
macOS 10.15.3
installed via homebrew.
no submodules present.



- Kay Rhodes
https://masukomi.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [bug] git-rev-parse sometimes appends subdirectories to result
  2020-02-03 20:14 [bug] git-rev-parse sometimes appends subdirectories to result masukomi
@ 2020-02-03 20:45 ` masukomi
  0 siblings, 0 replies; 2+ messages in thread
From: masukomi @ 2020-02-03 20:45 UTC (permalink / raw)
  To: git

Nevermind. False alarm.

There's a .git directory in the subdirectory src/tests

I _thought_ i had checked for that, but I dunno... apparently i didn't
check well.

It is working as expected.




- Kay Rhodes
https://masukomi.org

On Mon, Feb 3, 2020 at 3:14 PM masukomi <masukomi@masukomi.org> wrote:
>
> Expected behavior
>
> No matter what subdirectory of my repo I am in git rev-parse
> --show-toplevel will always return the same result
>
> Actual behavior
>
> Depending on what subdirectories you are in it will sometimes (not
> always) start appending those subdirectories to the path.
>
> Reproduction
>
> My git repo root is at
>
> /Users/masukomi/workspace/private_comments
>
> If i run git rev-parse --show-toplevel within that directory it
> returns the correct (identical) path.
> If i run it within /Users/masukomi/workspace/private_comments/src it
> returns the correct path (without the /src)
> If I run it within
> /Users/masukomi/workspace/private_comments/src/tests it suddenly
> starts returning
>
> /Users/masukomi/workspace/private_comments/src/tests
>
> Notes
>
> Git 2.25.0
> macOS 10.15.3
> installed via homebrew.
> no submodules present.
>
>
>
> - Kay Rhodes
> https://masukomi.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-03 20:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-03 20:14 [bug] git-rev-parse sometimes appends subdirectories to result masukomi
2020-02-03 20:45 ` masukomi

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