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

Working patterns

From
Dale R. Worley <worley@alum.mit.edu>
Date
Oct 23, 2013, 20:23 UTC
Message-ID
<201310232023.r9NKNr5v012288@freeze.ariadne.com>
Show 11 quoted lines
> The pattern I use is to have this:
> 
>         /repository/.git
> 		with core.worktree = /working
>         /working/...
> 
> then
> 
>         cd /repository
>         git add /working/x/y
>         git ...

The point I'm trying to make is that it appears that all of the Git commands implemented as programs use the same code at the beginning to determine the location of the Git repository and the root directory of the work tree -- to determine GIT_DIR and GIT_WORK_TREE effectively. And the code works with my work pattern, which seems intuitively correct to me.

It seems to me that this code should implement the design, and the design should match what the code does.

However, the parallel code in the Git commands that are scripts, which seems to be in git-sh-setup, does not implement the same design as the C code does.

It seems to me that the two sets of Git commands should be invokable under the same circumstances, that there is a design specification as to how Git can be invoked, and both implementations should match that.

Dale
Next: Junio C Hamano
Message 1 of 2 in “Working patterns”
  1. Dale R. WorleyOct 23, 2013
  2. Junio C HamanoOct 23, 2013

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.