[bug] git-rev-parse sometimes appends subdirectories to result

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux