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

Re: Git rebase --exec cannot run git commands affecting other repos

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 10, 2019, 18:26 UTC
Message-ID
<xmqqlg3s2wu8.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20190110161904.23fwbrgg7blyx3nj@uh-nuc001>
Samir Benmendil <me@rmz.io> writes:
> It is impossible to run git commands affecting a different repo from
> within a `git rebase --exec` because in that environment the `GIT_DIR`
> and `GIT_WORK_TREE` variables are set and inherited by any commands
> run as part of `git rebase --exec`.

If the user wants to work in a different repository, the environments that tells Git about the original repository can be unset to do so, which is a very much deliberately designed behaviour, primarily to help those who run "git rebase" from a subdirectory of the project.

Previous: Samir BenmendilNext: Samir Benmendil
Message 2 of 4 in “Git rebase --exec cannot run git commands affecting other repos”
  1. Samir BenmendilJan 10, 2019
  2. Junio C HamanoJan 10, 2019
  3. Samir BenmendilJan 10, 2019
  4. Jeff KingJan 11, 2019

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.