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

Re: [PATCH 2/5] Add platform-independent .git "symlink"

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 18, 2008, 13:35 UTC
Message-ID
<alpine.LSU.1.00.0802181334010.30505@racer.site>
In-Reply-To
<8c5c35580802180518x5c392bddya21c48ea4db9a7cd@mail.gmail.com>
Hi,
On Mon, 18 Feb 2008, Lars Hjemli wrote:
Show 11 quoted lines
> On Feb 18, 2008 1:34 PM, Johannes Schindelin 
> <Johannes.Schindelin@gmx.de> wrote:
> >
> > [* snip *]
> >
> > So maybe we can just scratch all that, and I agree that an invalid 
> > .git file means "no repository" (as opposed to "no valid repository").
> >
> > In that case, you might want to test for that, too...
> 
> I think I do, did you find a loophole in the testing?

I meant writing a readable, but invalid .git file. Then testing that Git die()s with the correct message.

Show 11 quoted lines
> > Speaking about tests:
> >
> > > +test_expect_success 'setup' '
> > > +       REAL="$(pwd)/.real" &&
> > > +       mv .git "$REAL" &&
> > > +       echo "gitdir: $REAL" >.git
> > > +'
> >
> > Let's not do this.  It would clutter the t/ directory unnecessarily.
> 
> What do you mean? The test just moves t/trash/.git to t/trash/.real...
Oh, well.  I'll go and buy me some new glasses.

Thanks, Dscho

Previous: Jakub NarebskiNext: Lars Hjemli
Message 10 of 18 in “Introduce the .gitfile”
  1. 0/5 Introduce the .gitfileLars Hjemli, Feb 18, 2008
  2. 1/5 Simplify setup of $GIT_DIR in git-sh-setup.shLars Hjemli, Feb 18, 2008
  3. 2/5 Add platform-independent .git "symlink"Lars Hjemli, Feb 18, 2008
  4. 3/5 Teach resolve_gitlink_ref() about the .git fileLars Hjemli, Feb 18, 2008
  5. 4/5 git-submodule: prepare for the .git-fileLars Hjemli, Feb 18, 2008
  6. 5/5 Teach GIT-VERSION-GEN about the .git fileLars Hjemli, Feb 18, 2008
  7. Johannes SchindelinFeb 18, 2008
  8. Lars HjemliFeb 18, 2008
  9. Jakub NarebskiFeb 18, 2008
  10. Johannes SchindelinFeb 18, 2008
  11. Lars HjemliFeb 18, 2008
  12. 2/5 Add platform-independent .git "symlink"Lars Hjemli, Feb 18, 2008
  13. Johannes SchindelinFeb 18, 2008
  14. Johannes SchindelinFeb 18, 2008
  15. Lars HjemliFeb 18, 2008
  16. Johannes SchindelinFeb 18, 2008
  17. Lars HjemliFeb 18, 2008
  18. Johannes SchindelinFeb 18, 2008

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.