Re: Working patterns

2013-10-23 Thread Junio C Hamano
wor...@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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Working patterns

2013-10-23 Thread Dale R. Worley
> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html