* adding file by absolute name -- problem
@ 2007-04-23 9:39 Yakov Lerner
2007-04-23 10:04 ` Junio C Hamano
2007-04-23 10:16 ` Johannes Schindelin
0 siblings, 2 replies; 9+ messages in thread
From: Yakov Lerner @ 2007-04-23 9:39 UTC (permalink / raw
To: Git Mailing List
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 ?
(When I cd to repo and fo 'git-add d', it works. But
'git-add `pwd`/d' gives error. I use scrits that wrap git-add
and give it mostly absolute names, and they fail).
Besides, I get infinite loop in git-add (1.5.1.1) when several
absolute names are given to git-add. I am trying to investigate it
Yakov
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: adding file by absolute name -- problem
2007-04-23 9:39 adding file by absolute name -- problem Yakov Lerner
@ 2007-04-23 10:04 ` Junio C Hamano
2007-04-23 10:16 ` Johannes Schindelin
1 sibling, 0 replies; 9+ messages in thread
From: Junio C Hamano @ 2007-04-23 10:04 UTC (permalink / raw
To: Yakov Lerner; +Cc: Git Mailing List
"Yakov Lerner" <iler.ml@gmail.com> writes:
> 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 ?
It's pretty much by design in the sense that none of us felt any
need for accepting absolute pathnames, and I personally still
don't. But I do not have a strong feeling against accepting a
patch series that adds support for accepting absolute pathnames,
as long as it is done cleanly and obviously.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: adding file by absolute name -- problem
2007-04-23 9:39 adding file by absolute name -- problem Yakov Lerner
2007-04-23 10:04 ` Junio C Hamano
@ 2007-04-23 10:16 ` Johannes Schindelin
2007-04-23 10:30 ` Yakov Lerner
2007-04-23 13:39 ` Carlos Rica
1 sibling, 2 replies; 9+ messages in thread
From: Johannes Schindelin @ 2007-04-23 10:16 UTC (permalink / raw
To: Yakov Lerner; +Cc: Git Mailing List
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...
Ciao,
Dscho
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: adding file by absolute name -- problem
2007-04-23 10:16 ` Johannes Schindelin
@ 2007-04-23 10:30 ` Yakov Lerner
2007-04-23 10:32 ` Yakov Lerner
` (2 more replies)
2007-04-23 13:39 ` Carlos Rica
1 sibling, 3 replies; 9+ messages in thread
From: Yakov Lerner @ 2007-04-23 10:30 UTC (permalink / raw
Cc: Git Mailing List
On 4/23/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: adding file by absolute name -- problem
2007-04-23 10:30 ` Yakov Lerner
@ 2007-04-23 10:32 ` Yakov Lerner
2007-04-23 10:51 ` Johannes Schindelin
2007-04-23 11:02 ` Julian Phillips
2 siblings, 0 replies; 9+ messages in thread
From: Yakov Lerner @ 2007-04-23 10:32 UTC (permalink / raw
To: Yakov Lerner; +Cc: Git Mailing List
Typo correction:
> switched from CVS to cvs in this aspect.
Should be
switched from CVS to SVN in this aspect.
Yakov
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: adding file by absolute name -- problem
2007-04-23 10:30 ` Yakov Lerner
2007-04-23 10:32 ` Yakov Lerner
@ 2007-04-23 10:51 ` Johannes Schindelin
2007-04-23 11:02 ` Julian Phillips
2 siblings, 0 replies; 9+ messages in thread
From: Johannes Schindelin @ 2007-04-23 10:51 UTC (permalink / raw
To: Yakov Lerner
Cc: no To-header on input <""@pop.gmx.net>,
Git Mailing List
Hi,
On Mon, 23 Apr 2007, Yakov Lerner wrote:
> CVS did not accept absolute pathnames, and SVN does. It is really convenient.
I do not feel very comfortable with the thought. If you have symbolic
links somewhere along the path, it is easy to get wrong.
This line of thought got me confused: would
$ ln -s /tmp x
$ touch x/y
$ git add x/y
work?
*clicketyclick*
Yes, it does. It ignores the fact that x is not a directory, but a
symbolic link. Lots of opportunities to shoot yourself in the foot.
Think about the consequences of doing something like this in one
repository, where "x" points into another one...
Ciao,
Dscho
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: adding file by absolute name -- problem
2007-04-23 10:30 ` Yakov Lerner
2007-04-23 10:32 ` Yakov Lerner
2007-04-23 10:51 ` Johannes Schindelin
@ 2007-04-23 11:02 ` Julian Phillips
2 siblings, 0 replies; 9+ messages in thread
From: Julian Phillips @ 2007-04-23 11:02 UTC (permalink / raw
To: Yakov Lerner; +Cc: Git Mailing List
On Mon, 23 Apr 2007, Yakov Lerner wrote:
> On 4/23/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> 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.
git () { cd $SRC; ~/bin/git "$@"; } ?
--
Julian
---
Man and wife make one fool.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: adding file by absolute name -- problem
2007-04-23 10:16 ` Johannes Schindelin
2007-04-23 10:30 ` Yakov Lerner
@ 2007-04-23 13:39 ` Carlos Rica
2007-04-23 14:23 ` Johannes Schindelin
1 sibling, 1 reply; 9+ messages in thread
From: Carlos Rica @ 2007-04-23 13:39 UTC (permalink / raw
To: Johannes Schindelin; +Cc: Yakov Lerner, Git Mailing List
Hi!
2007/4/23, Johannes Schindelin <Johannes.Schindelin@gmx.de>:
> 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...
Since it is by design, a posible solution could be support an optional
parameter to give the program the path of the directory (something as
--dir /a/b). Then you could build a command line to be run from
another place, without using absolute paths in the rest of parameters.
Maybe it would be easier to implement by interested people. Anyway, I
don't need this feature, too.
I think that if currently the program does not support absolute paths,
this should be clearly stated in error messages and check for that in
a centralized place.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: adding file by absolute name -- problem
2007-04-23 13:39 ` Carlos Rica
@ 2007-04-23 14:23 ` Johannes Schindelin
0 siblings, 0 replies; 9+ messages in thread
From: Johannes Schindelin @ 2007-04-23 14:23 UTC (permalink / raw
To: Carlos Rica; +Cc: Yakov Lerner, Git Mailing List
Hi,
On Mon, 23 Apr 2007, Carlos Rica wrote:
> Since it is by design, a posible solution could be support an optional
> parameter to give the program the path of the directory (something as
> --dir /a/b).
:-)
You mean something like
git --git-dir /path/to/repo add relative/path/to/file
Hmm?
Ciao,
Dscho
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-04-23 14:23 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-23 9:39 adding file by absolute name -- problem Yakov Lerner
2007-04-23 10:04 ` Junio C Hamano
2007-04-23 10:16 ` Johannes Schindelin
2007-04-23 10:30 ` Yakov Lerner
2007-04-23 10:32 ` Yakov Lerner
2007-04-23 10:51 ` Johannes Schindelin
2007-04-23 11:02 ` Julian Phillips
2007-04-23 13:39 ` Carlos Rica
2007-04-23 14:23 ` Johannes Schindelin
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).