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

Re: git-credential-cache--daemon quits on SIGHUP, can we change it to ignore instead?

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 4, 2015, 20:05 UTC
Message-ID
<xmqqlh9arnbz.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20151204190658.GA16692@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 21 quoted lines
> On Fri, Dec 04, 2015 at 10:55:32AM -0800, Junio C Hamano wrote:
>> 
>> I was puzzled that git_config_get_bool() is used here without even
>> checking if we are inside any Git repository and wondered if it was
>> correct....
>
> This probably _does_ trigger setup_git_env() when it was not otherwise
> called, and it will back to looking at ".git/config" for the repo-level
> config. That may fail to find the file if we are in a bare repository,
> or a subdirectory of the working tree. IOW, I suspect this:
>
>   git init --bare foo.git
>   cd foo.git
>   git config credential.helper cache
>   git config credentialcache.ignoreSIGHUP true ;# goes into local config
>   git fetch https://example.com/foo.git
>
> may fail to respect the ignoreSIGHUP option.
>
> I guess the solution would be to setup_git_director_gently() in the
> daemon process.
So I guess I did notice the right breakage ;-)

At least, this won't be a regression but "a new feature initially shipped with a broken corner case", so a follow-up fix is welcome, but not a big deal that I've already merged it to 'master'.

Thanks.
Previous: Jeff KingNext: Jeff King
Message 28 of 29 in “git-credential-cache--daemon quits on SIGHUP, can we change it to ignore instead?”
  1. Noam PostavskyOct 10, 2015
  2. Noam PostavskyOct 18, 2015
  3. Junio C HamanoOct 18, 2015
  4. Noam PostavskyOct 19, 2015
  5. Noam PostavskyOct 21, 2015
  6. Noam PostavskyOct 24, 2015
  7. Junio C HamanoOct 25, 2015
  8. Jeff KingOct 26, 2015
  9. Noam PostavskyOct 27, 2015
  10. Jeff KingOct 27, 2015
  11. Junio C HamanoOct 27, 2015
  12. Junio C HamanoOct 27, 2015
  13. Jeff KingOct 27, 2015
  14. Noam PostavskyOct 28, 2015
  15. Jeff KingOct 30, 2015
  16. Noam PostavskyOct 30, 2015
  17. Jeff KingOct 30, 2015
  18. Noam PostavskyOct 30, 2015
  19. Jeff KingOct 30, 2015
  20. Noam PostavskyNov 9, 2015
  21. Jeff KingNov 9, 2015
  22. Noam PostavskyNov 10, 2015
  23. Jeff KingNov 10, 2015
  24. Jeff KingNov 10, 2015
  25. Noam PostavskyNov 11, 2015
  26. Junio C HamanoDec 4, 2015
  27. Jeff KingDec 4, 2015
  28. Junio C HamanoDec 4, 2015
  29. Jeff KingDec 4, 2015

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.