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

Re: [PATCH] new test from the submodule chapter of the user manual

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Sep 20, 2007, 18:47 UTC
Message-ID
<Pine.LNX.4.64.0709201946410.28395@racer.site>
In-Reply-To
<20070920175952.GC30391@tasint.org>
Hi,
On Thu, 20 Sep 2007, Joel Becker wrote:
Show 15 quoted lines
> On Thu, Sep 20, 2007 at 07:08:31PM +0200, Miklos Vajna wrote:
> > +test_expect_success "create the submodules" '
> > +	for i in a b c d
> > +	do
> > +		mkdir $i &&
> > +		cd $i &&
> > +		git init &&
> > +		echo "module $i" > $i.txt &&
> > +		git add $i.txt &&
> > +		git commit -m "Initial commit, submodule $i" &&
> > +		cd ..
> > +	done
> 
> 	Silly question: why use the '&&' when you can 'set -e'?  As it
> currently stands, a failure will still go back around the loop...

A "set -e" will make the script exit AFAIR. That's not what we want. A simple "|| break" after the "cd .." will work, though.

Ciao, Dscho

Previous: Joel BeckerNext: Miklos Vajna
Message 18 of 28 in “[rfc] git submodules howto”
  1. Miklos VajnaSep 18, 2007
  2. Johannes SchindelinSep 18, 2007
  3. Michael SmithSep 18, 2007
  4. J. Bruce FieldsSep 18, 2007
  5. Miklos VajnaSep 18, 2007
  6. J. Bruce FieldsSep 18, 2007
  7. Miklos VajnaSep 18, 2007
  8. Michael SmithSep 18, 2007
  9. User Manual: add a chapter for submodulesMiklos Vajna, Sep 19, 2007
  10. Junio C HamanoSep 19, 2007
  11. J. Bruce FieldsSep 19, 2007
  12. User Manual: add a chapter for submodulesMiklos Vajna, Sep 20, 2007
  13. User Manual: add a chapter for submodulesMiklos Vajna, Sep 20, 2007
  14. Junio C HamanoSep 20, 2007
  15. Johannes SchindelinSep 20, 2007
  16. new test from the submodule chapter of the user manualMiklos Vajna, Sep 20, 2007
  17. Joel BeckerSep 20, 2007
  18. Johannes SchindelinSep 20, 2007
  19. Miklos VajnaSep 20, 2007
  20. Joel BeckerSep 20, 2007
  21. Junio C HamanoSep 20, 2007
  22. new test from the submodule chapter of the user manualMiklos Vajna, Sep 21, 2007
  23. Junio C HamanoSep 21, 2007
  24. new test from the submodule chapter of the user manualMiklos Vajna, Sep 22, 2007
  25. Miklos VajnaSep 20, 2007
  26. Sven VerdoolaegeSep 19, 2007
  27. Uwe Kleine-KönigSep 24, 2007
  28. Miklos VajnaSep 24, 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.