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

DWIM .git repository discovery

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Sep 26, 2012, 01:49 UTC
Message-ID
<CACsJy8DOtPWgkq=KSHCb=J3qg4o1aPaLo4aj7U5f_qa+kCCipQ@mail.gmail.com>
Hi,

I often find myself attempting to examine another repository, especially in projects that are closely related but put in different git repos. It's usually just a diff or log command

git log --patch ../path/to/another/repo/path/to/file.c

cd'ing out is nuisance for one-shot commands, even setting --git-dir is because i'd need to repeat the path. I think when we detect paths outside repository, we could try to discover new repository that contain those paths, the adjust $GIT_DIR internally to the new repository.

We can't do that now because .git repository and "path outside repository" check occur in two separate stages, the latter after .git is discovered and .git can't be moved once discovered. We might be able to move "path outside repo" check up to discovery phase. But that could be big change.

Does anybody want such a feature, or it's just my itch? It's probably not worth doing because few people need it.

-- 
Duy
Next: Junio C Hamano
Message 1 of 7 in “DWIM .git repository discovery”
  1. Nguyen Thai Ngoc DuySep 26, 2012
  2. Junio C HamanoSep 26, 2012
  3. Michael J GruberSep 26, 2012
  4. Nguyen Thai Ngoc DuySep 26, 2012
  5. Drew NorthupSep 27, 2012
  6. Nguyen Thai Ngoc DuySep 27, 2012
  7. Junio C HamanoSep 27, 2012

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.