git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: masukomi <masukomi@masukomi.org>
To: git@vger.kernel.org
Subject: Re: [bug] git-rev-parse sometimes appends subdirectories to result
Date: Mon, 3 Feb 2020 15:45:54 -0500	[thread overview]
Message-ID: <CAG4-5Weaby9OZ+ORMmHiukeG39vAber7PibUWPKKo0mnQ3nEgQ@mail.gmail.com> (raw)
In-Reply-To: <CAG4-5WdTkFyCa_MqiRchR9GZgC_NEWdgobPfRfxYhTVqzVCCQw@mail.gmail.com>

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

      reply	other threads:[~2020-02-03 20:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-03 20:14 [bug] git-rev-parse sometimes appends subdirectories to result masukomi
2020-02-03 20:45 ` masukomi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAG4-5Weaby9OZ+ORMmHiukeG39vAber7PibUWPKKo0mnQ3nEgQ@mail.gmail.com \
    --to=masukomi@masukomi.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).