{"thread":{"id":"52744","subject":"[bug] git-rev-parse sometimes appends subdirectories to result","startedAt":"2020-02-03T20:15:05Z","lastAt":"2020-02-03T20:46:09Z","messageCount":2,"participants":["masukomi"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"391051","messageId":"CAG4-5WdTkFyCa_MqiRchR9GZgC_NEWdgobPfRfxYhTVqzVCCQw@mail.gmail.com","threadId":"52744","inReplyTo":null,"subject":"[bug] git-rev-parse sometimes appends subdirectories to result","fromName":"masukomi","fromEmail":"masukomi@masukomi.org","sentAt":"2020-02-03T20:14:50Z","receivedAt":"2020-02-03T20:15:05Z","isPatch":false,"sender":{"key":"masukomi@masukomi.org","avatar":null},"body":"Expected behavior\n\nNo matter what subdirectory of my repo I am in git rev-parse\n--show-toplevel will always return the same result\n\nActual behavior\n\nDepending on what subdirectories you are in it will sometimes (not\nalways) start appending those subdirectories to the path.\n\nReproduction\n\nMy git repo root is at\n\n/Users/masukomi/workspace/private_comments\n\nIf i run git rev-parse --show-toplevel within that directory it\nreturns the correct (identical) path.\nIf i run it within /Users/masukomi/workspace/private_comments/src it\nreturns the correct path (without the /src)\nIf I run it within\n/Users/masukomi/workspace/private_comments/src/tests it suddenly\nstarts returning\n\n/Users/masukomi/workspace/private_comments/src/tests\n\nNotes\n\nGit 2.25.0\nmacOS 10.15.3\ninstalled via homebrew.\nno submodules present.\n\n\n\n- Kay Rhodes\nhttps://masukomi.org\n"},{"id":"391055","messageId":"CAG4-5Weaby9OZ+ORMmHiukeG39vAber7PibUWPKKo0mnQ3nEgQ@mail.gmail.com","threadId":"52744","inReplyTo":"CAG4-5WdTkFyCa_MqiRchR9GZgC_NEWdgobPfRfxYhTVqzVCCQw@mail.gmail.com","subject":"Re: [bug] git-rev-parse sometimes appends subdirectories to result","fromName":"masukomi","fromEmail":"masukomi@masukomi.org","sentAt":"2020-02-03T20:45:54Z","receivedAt":"2020-02-03T20:46:09Z","isPatch":false,"sender":{"key":"masukomi@masukomi.org","avatar":null},"body":"Nevermind. False alarm.\n\nThere's a .git directory in the subdirectory src/tests\n\nI _thought_ i had checked for that, but I dunno... apparently i didn't\ncheck well.\n\nIt is working as expected.\n\n\n\n\n- Kay Rhodes\nhttps://masukomi.org\n\nOn Mon, Feb 3, 2020 at 3:14 PM masukomi <masukomi@masukomi.org> wrote:\n>\n> Expected behavior\n>\n> No matter what subdirectory of my repo I am in git rev-parse\n> --show-toplevel will always return the same result\n>\n> Actual behavior\n>\n> Depending on what subdirectories you are in it will sometimes (not\n> always) start appending those subdirectories to the path.\n>\n> Reproduction\n>\n> My git repo root is at\n>\n> /Users/masukomi/workspace/private_comments\n>\n> If i run git rev-parse --show-toplevel within that directory it\n> returns the correct (identical) path.\n> If i run it within /Users/masukomi/workspace/private_comments/src it\n> returns the correct path (without the /src)\n> If I run it within\n> /Users/masukomi/workspace/private_comments/src/tests it suddenly\n> starts returning\n>\n> /Users/masukomi/workspace/private_comments/src/tests\n>\n> Notes\n>\n> Git 2.25.0\n> macOS 10.15.3\n> installed via homebrew.\n> no submodules present.\n>\n>\n>\n> - Kay Rhodes\n> https://masukomi.org\n"}]}