git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: adding file by absolute name -- problem

From
CRCarlos Rica <jasampler@gmail.com>
Date
Apr 23, 2007, 13:39 UTC
Message-ID
<1b46aba20704230639k56fc1839qcad38f1e5ee0e238@mail.gmail.com>
In-Reply-To
<Pine.LNX.4.64.0704231215370.8822@racer.site>
Hi!
2007/4/23, Johannes Schindelin <Johannes.Schindelin@gmx.de>:
Show 10 quoted lines
> 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.

Previous: Julian PhillipsNext: Johannes Schindelin
Message 8 of 9 in “adding file by absolute name -- problem”
  1. Yakov LernerApr 23, 2007
  2. Junio C HamanoApr 23, 2007
  3. Johannes SchindelinApr 23, 2007
  4. Yakov LernerApr 23, 2007
  5. Yakov LernerApr 23, 2007
  6. Johannes SchindelinApr 23, 2007
  7. Julian PhillipsApr 23, 2007
  8. Carlos RicaApr 23, 2007
  9. Johannes SchindelinApr 23, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.