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

Re: [PATCH 1/2] git-submodule: move cloning into a separate function

From
LHLars Hjemli <hjemli@gmail.com>
Date
Jun 17, 2007, 15:56 UTC
Message-ID
<8c5c35580706170856n64747190xeaf88fc2deafd273@mail.gmail.com>
In-Reply-To
<20070617143802.GV955MdfPADPa@greensroom.kotnet.org>
On 6/17/07, Sven Verdoolaege <skimo@kotnet.org> wrote:
Show 18 quoted lines
> On Tue, Jun 05, 2007 at 01:13:28PM +0200, Lars Hjemli wrote:
> > +module_clone()
> > +{
> > +     path=$1
> > +     url=$2
> > +
> > +     # If there already is a directory at the submodule path,
> > +     # expect it to be empty (since that is the default checkout
> > +     # action) and try to remove it.
> > +     # Note: if $path is a symlink to a directory the test will
> > +     # succeed but the rmdir will fail. We might want to fix this.
> > +     if test -d "$path"
> > +     then
> > +             rmdir "$path" 2>/dev/null ||
> > +             die "Directory '$path' exist, but is neither empty nor a git repository"
>
> What makes you say that '$path' is not a git repository?
>
The function assumes it's only invoked when no repo is present in $path/.git.
-- 
larsh
Previous: Sven VerdoolaegeNext: Lars Hjemli
Message 9 of 11 in “git-submodule: make it easier to use alternate urls”
  1. 0/2 git-submodule: make it easier to use alternate urlsLars Hjemli, Jun 5, 2007
  2. 1/2 git-submodule: move cloning into a separate functionLars Hjemli, Jun 5, 2007
  3. Johannes SixtJun 5, 2007
  4. 1/2 git-submodule: move cloning into a separate functionLars Hjemli, Jun 5, 2007
  5. Junio C HamanoJun 6, 2007
  6. 1/2 git-submodule: move cloning into a separate functionLars Hjemli, Jun 6, 2007
  7. 2/2 git-submodule: clone during update, not during initLars Hjemli, Jun 6, 2007
  8. Sven VerdoolaegeJun 17, 2007
  9. Lars HjemliJun 17, 2007
  10. 2/2 git-submodule: clone during update, not during initLars Hjemli, Jun 5, 2007
  11. 2/2 git-submodule: clone during update, not during initLars Hjemli, Jun 5, 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.