Re: adding file by absolute name -- problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/23/07, Johannes Schindelin <Johannes.Schindelin@xxxxxx> wrote:
Hi,

On Mon, 23 Apr 2007, Yakov Lerner wrote:

> When I give absolute pathname /a/b/repo/d to git add, it
> mostly does not work. I get errors from git-add. Is it by design ?

AFAICT it is by design. I fail to see why absolute paths should be
supported, too. You are supposed to be _in_ the working directory when
adding files...

Let's say I have $SRC that points to the dir of sources. Let's say
I am testing the software, somewhere under /tmp. I edit sources as
'vi $SRC/something' and I am not in $SRC. I could do 'make -C $SRC' and
I can do everything (incl checkins) without switching cwd back and
forth all the time.

CVS did not accept absolute pathnames, and SVN does. It is really convenient.
I felt perceptible added comfort when I switched from CVS to cvs in this aspect.
CVS's way of not accepting abs paths was not convenient.

But talking about implementation. How would I, generically,  go about
finding the base .git when absolute path is given ? Is dropping basenmes
one-by-one and checking for .git a good method ? Or just demand that GITDIR
be set when absolute name is given ?

Yakov
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]