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

Re: [PATCH 1/2] Add Git::config_path()

From
Jakub Narebski <jnareb@gmail.com>
Date
Oct 7, 2011, 21:44 UTC
Message-ID
<201110072344.46556.jnareb@gmail.com>
In-Reply-To
<7vk48gtrh9.fsf@alter.siamese.dyndns.org>
On Mon, 7 Oct 2011, Junio C Hamano wrote:
Show 17 quoted lines
> Jakub Narebski <jnareb@gmail.com> writes:
> 
> > diff --git a/t/t9700-perl-git.sh b/t/t9700-perl-git.sh
> > index 3787186..7558f0c 100755
> > --- a/t/t9700-perl-git.sh
> > +++ b/t/t9700-perl-git.sh
> > @@ -43,7 +43,9 @@ test_expect_success \
> >       git config --add test.booltrue true &&
> >       git config --add test.boolfalse no &&
> >       git config --add test.boolother other &&
> > -     git config --add test.int 2k
> > +     git config --add test.int 2k &&
> > +     git config --add test.path "~/foo" &&
> > +     git config --add test.pathexpanded "$HOME/foo"
> 
> Given that test-lib.sh sets up the $HOME away from unknown place to ensure
> repeatability of tests, I am not sure if this test would ever pass.
Well, it passes.

test-lib.sh sets $HOME to "$TRASH_DIRECTORY", but this value of $HOME is then later seen by "git config --path ..." run by Git::config_path in t9700/test.pl

  char *expand_user_path(const char *path)
  [...]
                if (username_len == 0) {
                        const char *home = getenv("HOME");
                        if (!home)
                                goto return_null;
                        strbuf_add(&user_path, home, strlen(home));
                } else {
  [...]
-- 
Jakub Narebski
Poland
Previous: Junio C HamanoNext: Junio C Hamano
Message 9 of 24 in “git-send-email.perl: expand filename of aliasesfile”
  1. git-send-email.perl: expand filename of aliasesfileCord Seele, Sep 28, 2011
  2. Matthieu MoySep 28, 2011
  3. Cord SeeleSep 28, 2011
  4. Matthieu MoySep 28, 2011
  5. git-send-email: allow filename expansionCord Seele, Sep 30, 2011
  6. 1/2 Add Git::config_path()Cord Seele, Sep 30, 2011
  7. Jakub NarebskiOct 7, 2011
  8. Junio C HamanoOct 7, 2011
  9. Jakub NarebskiOct 7, 2011
  10. Junio C HamanoOct 7, 2011
  11. 2/2 use new Git::config_path() for aliasesfileCord Seele, Sep 30, 2011
  12. Junio C HamanoSep 30, 2011
  13. Cord SeeleSep 30, 2011
  14. Jakub NarebskiSep 30, 2011
  15. Junio C HamanoSep 30, 2011
  16. 3/2 Refactor Git::config_*Jakub Narebski, Oct 7, 2011
  17. Junio C HamanoOct 17, 2011
  18. Jakub NarebskiOct 17, 2011
  19. Junio C HamanoOct 17, 2011
  20. 3/2 Refactor Git::config_*Jakub Narebski, Oct 18, 2011
  21. Junio C HamanoOct 18, 2011
  22. 3/2 Refactor Git::config_*Jakub Narebski, Oct 18, 2011
  23. Junio C HamanoOct 18, 2011
  24. Jakub NarebskiOct 19, 2011

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.