git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Working patterns
@ 2013-10-23 20:23 Dale R. Worley
  2013-10-23 21:44 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Dale R. Worley @ 2013-10-23 20:23 UTC (permalink / raw)
  To: git

> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Working patterns
  2013-10-23 20:23 Working patterns Dale R. Worley
@ 2013-10-23 21:44 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2013-10-23 21:44 UTC (permalink / raw)
  To: Dale R. Worley; +Cc: git

worley@alum.mit.edu (Dale R. Worley) writes:

> 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.

As far as I know, the design for any (be it script or command) is
that they should be able to run from the top-level and from any
subdirectory within, but running from outside the top-level of the
working tree has never been part of the design goal.  If some
commands tolerated it, that was by mere accident and not by design.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-10-23 21:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-23 20:23 Working patterns Dale R. Worley
2013-10-23 21:44 ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).