How can I debug git/git-shell related problems?

前端 未结 8 1698
说谎
说谎 2020-11-22 15:16

How can I have some debug information regarding git/git-shell?

I had a problem, that user1 could clone a repository without problem, while user2<

8条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-22 15:30

    Git 2.9.x/2.10 (Q3 2016) adds another debug option: GIT_TRACE_CURL.

    See commit 73e57aa, commit 74c682d (23 May 2016) by Elia Pinto (devzero2000).
    Helped-by: Torsten Bögershausen (tboegi), Ramsay Jones , Junio C Hamano (gitster), Eric Sunshine (sunshineco), and Jeff King (peff).
    (Merged by Junio C Hamano -- gitster -- in commit 2f84df2, 06 Jul 2016)

    http.c: implement the GIT_TRACE_CURL environment variable

    Implement the GIT_TRACE_CURL environment variable to allow a greater degree of detail of GIT_CURL_VERBOSE, in particular the complete transport header and all the data payload exchanged.
    It might be useful if a particular situation could require a more thorough debugging analysis.

    The documentation will state:

    GIT_TRACE_CURL
    

    Enables a curl full trace dump of all incoming and outgoing data, including descriptive information, of the git transport protocol.
    This is similar to doing curl --trace-ascii on the command line.

    This option overrides setting the GIT_CURL_VERBOSE environment variable.


    You can see that new option used in this answer, but also in the Git 2.11 (Q4 2016) tests:

    See commit 14e2411, commit 81590bf, commit 4527aa1, commit 4eee6c6 (07 Sep 2016) by Elia Pinto (devzero2000).
    (Merged by Junio C Hamano -- gitster -- in commit 930b67e, 12 Sep 2016)

    Use the new GIT_TRACE_CURL environment variable instead of the deprecated GIT_CURL_VERBOSE.

    GIT_TRACE_CURL=true git clone --quiet $HTTPD_URL/smart/repo.git
    

提交回复
热议问题