git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Impossible to change working directory

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 29, 2016, 23:24 UTC
Message-ID
<xmqq37kicmsb.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<A99D7D06-8214-4C09-BCB2-E4FCE75FF317@sebastian-feldmann.info>
Sebastian Feldmann <sf@sebastian-feldmann.info> writes:
> the script fails because changing the current working directory fails.
> If I echo the current working directory it always echoes the root repository path
>
> Is this expected behavior?
Yes, we always go to the top before doing anything.

If you echo environment variables Git may set up for you, what do you see? Do you see GIT_PREFIX that you can use to tell where you came from, or something like that?

Previous: Sebastian FeldmannNext: Torsten Bögershausen
Message 2 of 3 in “Impossible to change working directory”
  1. Sebastian FeldmannSep 29, 2016
  2. Junio C HamanoSep 29, 2016
  3. Torsten BögershausenOct 1, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.