{"thread":{"id":"35185","subject":"Working patterns","startedAt":"2013-10-23T20:23:53Z","lastAt":"2013-10-23T21:44:19Z","messageCount":2,"participants":["Dale R. Worley","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"229366","messageId":"201310232023.r9NKNr5v012288@freeze.ariadne.com","threadId":"35185","inReplyTo":null,"subject":"Working patterns","fromName":"Dale R. Worley","fromEmail":"worley@alum.mit.edu","sentAt":"2013-10-23T20:23:53Z","receivedAt":"2013-10-23T20:23:53Z","isPatch":false,"sender":{"key":"worley@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/19911107?v=4"},"body":"> The pattern I use is to have this:\n> \n>         /repository/.git\n> \t\twith core.worktree = /working\n>         /working/...\n> \n> then\n> \n>         cd /repository\n>         git add /working/x/y\n>         git ...\n\nThe point I'm trying to make is that it appears that all of the Git\ncommands implemented as programs use the same code at the beginning to\ndetermine the location of the Git repository and the root directory of\nthe work tree -- to determine GIT_DIR and GIT_WORK_TREE effectively.\nAnd the code works with my work pattern, which seems intuitively\ncorrect to me.\n\nIt seems to me that this code should implement the design, and the\ndesign should match what the code does.\n\nHowever, the parallel code in the Git commands that are scripts, which\nseems to be in git-sh-setup, does not implement the same design as the\nC code does.\n\nIt seems to me that the two sets of Git commands should be invokable\nunder the same circumstances, that there is a design specification as\nto how Git can be invoked, and both implementations should match that.\n\nDale\n"},{"id":"229368","messageId":"xmqqa9hzpsr0.fsf@gitster.dls.corp.google.com","threadId":"35185","inReplyTo":"201310232023.r9NKNr5v012288@freeze.ariadne.com","subject":"Re: Working patterns","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-10-23T21:44:19Z","receivedAt":"2013-10-23T21:44:19Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"worley@alum.mit.edu (Dale R. Worley) writes:\n\n> It seems to me that the two sets of Git commands should be invokable\n> under the same circumstances, that there is a design specification as\n> to how Git can be invoked, and both implementations should match that.\n\nAs far as I know, the design for any (be it script or command) is\nthat they should be able to run from the top-level and from any\nsubdirectory within, but running from outside the top-level of the\nworking tree has never been part of the design goal.  If some\ncommands tolerated it, that was by mere accident and not by design.\n"}]}