Git development
 help / color / mirror / Atom feed
* Re: Issues with git clone over HTTP/2 and closed connections
From: David Härdeman @ 2023-09-24 14:47 UTC (permalink / raw)
  To: Jeff King; +Cc: git
In-Reply-To: <20230924035022.GA1503477@coredump.intra.peff.net>

September 24, 2023 at 5:50 AM, "Jeff King" <peff@peff.net> wrote:
> On Sat, Sep 23, 2023 at 12:58:09PM +0000, David Härdeman wrote:
>> From what I understand, git should close the connection, try to open a
>>  new one and resume the clone operation before erroring out (because
>>  the GOAWAY message could mean anything).
>>  
>>  Is this a known bug and is it something that would need to be fixed in
>>  libcurl or in git?
>> 
> 
> I don't think we've heard of such a problem before with Git. I don't
> know enough about GOAWAY to comment on the correct behavior, but this is
> almost certainly a curl issue, not a Git one. All of the connection
> handling, reuse, etc, is happening invisibly at the curl layer.
> 
> It's probably worth poking around libcurl's issue tracker. This seems
> like it might be related:
> 
>  https://github.com/curl/curl/issues/11859

Yeah, looks very relevant. I'll keep an eye on that issue instead.

Thanks for the prompt feedback.

> And one final comment: 2000 is a lot of requests for one clone. That
> plus the error you are seeing from Git makes me think you're using the
> "dumb" http protocol (i.e., your webserver is not set up to run the
> server side of Git's smart protocol, so it is just serving files
> blindly).

Yeah, thanks for the advice...I've already sorted this out so that I'm not
affected, but I wanted to make sure that I posted the bug report before I
forgot all the details.

Cheers,
David

^ permalink raw reply

* Re: [PATCH v7 2/3] unit tests: add TAP unit test framework
From: phillip.wood123 @ 2023-09-24 13:57 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Josh Steadmon, git, linusa, calvinwan, rsbecker
In-Reply-To: <xmqqa5te0y9r.fsf@gitster.g>

Hi Junio

On 22/09/2023 21:05, Junio C Hamano wrote:
> It seems this got stuck during Josh's absense and I didn't ping it
> further, but I should have noticed that you are the author of this
> patch, and pinged you in the meantime.

Sorry I meant to reply when I saw your first message but then didn't get 
round to it.

> Any thought on the "polarity" of the return values from the
> assertion?  I still find it confusing and hard to follow.

When I was writing this I was torn between whether to follow our usual 
convention of returning zero for success and minus one for failure or to 
return one for success and zero for failure. In the end I decided to go 
with the former but I tend to agree with you that the latter would be 
easier to understand.

>>> +test_expect_success 'TAP output from unit tests' '
>>> [...]
>>> +	ok 19 - test with no checks returns -1
>>> +	1..19
>>> +	EOF
>>
>> Presumably t-basic will serve as a catalog of check_* functions and
>> the test binary, together with this test piece, will keep growing as
>> we gain features in the unit tests infrastructure.  I wonder how
>> maintainable the above is, though.  When we acquire new test, we
>> would need to renumber.  What if multiple developers add new
>> features to the catalog at the same time?

I think we could just add new tests to the end so we'd only need to 
change the "1..19" line. That will become a source of merge conflicts if 
multiple developers add new features at the same time though. Having 
several unit test programs called from separate tests in t0080 might 
help with that.

>>> diff --git a/t/unit-tests/.gitignore b/t/unit-tests/.gitignore
>>> new file mode 100644
>>> index 0000000000..e292d58348
>>> --- /dev/null
>>> +++ b/t/unit-tests/.gitignore
>>> @@ -0,0 +1,2 @@
>>> +/t-basic
>>> +/t-strbuf
>>
>> Also, can we come up with some naming convention so that we do not
>> have to keep adding to this file every time we add a new test
>> script?

Perhaps we should put the unit test binaries in a separate directory so 
we can just add that directory to .gitignore.

Best Wishes

Phillip

^ permalink raw reply

* Re: [PATCH v2 3/3] archive: support remote archive from stateless transport
From: Phillip Wood @ 2023-09-24 13:41 UTC (permalink / raw)
  To: Jiang Xin, Git List, Junio C Hamano, Brandon Williams,
	Ilari Liusvaara
  Cc: Jiang Xin
In-Reply-To: <20230923152201.14741-4-worldhello.net@gmail.com>

On 23/09/2023 16:22, Jiang Xin wrote:
> From: Jiang Xin <zhiyou.jx@alibaba-inc.com>
> 
> Even though we can establish a stateless connection, we still cannot
> archive the remote repository using a stateless HTTP protocol. Try the
> following steps to make it work.
> 
>   1. Add support for "git-upload-archive" service in "http-backend".
> 
>   2. Use the URL ".../info/refs?service=git-upload-pack" to detect the
>      protocol version, instead of use the "git-upload-archive" service.
> 
>   3. "git-archive" does not expect to see protocol version and
>      capabilities when connecting to remote-helper, so do not send them
>      in "remote-curl.c" for the "git-upload-archive" service.

I'm not familiar enough with the server side of git to comment on 
whether this patch is a good idea, but I did notice one C language issue 
below.

>   static struct string_list *get_parameters(void)
> @@ -639,10 +640,19 @@ static void check_content_type(struct strbuf *hdr, const char *accepted_type)
>   
>   static void service_rpc(struct strbuf *hdr, char *service_name)
>   {
> -	const char *argv[] = {NULL, "--stateless-rpc", ".", NULL};

In the pre-image argv[0] is initialized to NULL

> +	const char *argv[4];

In the post-image argv is not initialized and the first element is not 
set in the code below.

>   	struct rpc_service *svc = select_service(hdr, service_name);
>   	struct strbuf buf = STRBUF_INIT;
>   
> +	if (!strcmp(service_name, "git-upload-archive")) {
> +		argv[1] = ".";
> +		argv[2] = NULL;
> +	} else {
> +		argv[1] = "--stateless-rpc";
> +		argv[2] = ".";
> +		argv[3] = NULL;
> +	}

Best Wishes

Phillip


^ permalink raw reply

* [PATCH v2 2/4] doc: update links to current pages
From: Josh Soref via GitGitGadget @ 2023-09-24 10:57 UTC (permalink / raw)
  To: git; +Cc: Josh Soref, Josh Soref
In-Reply-To: <pull.1589.v2.git.1695553041.gitgitgadget@gmail.com>

From: Josh Soref <jsoref@gmail.com>

It's somewhat traditional to respect sites' self-identification.

Signed-off-by: Josh Soref <jsoref@gmail.com>
---
 Documentation/CodingGuidelines     | 2 +-
 Documentation/RelNotes/1.6.2.txt   | 2 +-
 Documentation/RelNotes/1.6.3.txt   | 2 +-
 Documentation/RelNotes/1.6.4.txt   | 2 +-
 Documentation/RelNotes/1.6.5.txt   | 2 +-
 Documentation/RelNotes/1.6.6.txt   | 2 +-
 Documentation/git-cvsimport.txt    | 2 +-
 Documentation/git-format-patch.txt | 2 +-
 Documentation/git.txt              | 2 +-
 git-gui/git-gui.sh                 | 2 +-
 gitk-git/gitk                      | 2 +-
 gitweb/static/js/lib/common-lib.js | 2 +-
 http.c                             | 2 +-
 imap-send.c                        | 2 +-
 json-writer.h                      | 2 +-
 15 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index 94d4d869039..81afc0b8df3 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -518,7 +518,7 @@ For Perl programs:
 
 For Python scripts:
 
- - We follow PEP-8 (http://www.python.org/dev/peps/pep-0008/).
+ - We follow PEP-8 (https://peps.python.org/pep-0008/).
 
  - As a minimum, we aim to be compatible with Python 2.7.
 
diff --git a/Documentation/RelNotes/1.6.2.txt b/Documentation/RelNotes/1.6.2.txt
index 980adfb3154..166d73c60fb 100644
--- a/Documentation/RelNotes/1.6.2.txt
+++ b/Documentation/RelNotes/1.6.2.txt
@@ -10,7 +10,7 @@ To ease the transition plan, the receiving repository of such a
 push running this release will issue a big warning when the
 configuration variable is missing.  Please refer to:
 
-  http://git.or.cz/gitwiki/GitFaq#non-bare
+  https://archive.kernel.org/oldwiki/git.wiki.kernel.org/index.php/GitFaq.html#non-bare
   https://lore.kernel.org/git/7vbptlsuyv.fsf@gitster.siamese.dyndns.org/
 
 for more details on the reason why this change is needed and the
diff --git a/Documentation/RelNotes/1.6.3.txt b/Documentation/RelNotes/1.6.3.txt
index 4bcff945e01..bbf177fc3c5 100644
--- a/Documentation/RelNotes/1.6.3.txt
+++ b/Documentation/RelNotes/1.6.3.txt
@@ -10,7 +10,7 @@ To ease the transition plan, the receiving repository of such a
 push running this release will issue a big warning when the
 configuration variable is missing.  Please refer to:
 
-  http://git.or.cz/gitwiki/GitFaq#non-bare
+  https://archive.kernel.org/oldwiki/git.wiki.kernel.org/index.php/GitFaq.html#non-bare
   https://lore.kernel.org/git/7vbptlsuyv.fsf@gitster.siamese.dyndns.org/
 
 for more details on the reason why this change is needed and the
diff --git a/Documentation/RelNotes/1.6.4.txt b/Documentation/RelNotes/1.6.4.txt
index a2a34b43a75..0fccfb0bf0b 100644
--- a/Documentation/RelNotes/1.6.4.txt
+++ b/Documentation/RelNotes/1.6.4.txt
@@ -10,7 +10,7 @@ To ease the transition plan, the receiving repository of such a
 push running this release will issue a big warning when the
 configuration variable is missing.  Please refer to:
 
-  http://git.or.cz/gitwiki/GitFaq#non-bare
+  https://archive.kernel.org/oldwiki/git.wiki.kernel.org/index.php/GitFaq.html#non-bare
   https://lore.kernel.org/git/7vbptlsuyv.fsf@gitster.siamese.dyndns.org/
 
 for more details on the reason why this change is needed and the
diff --git a/Documentation/RelNotes/1.6.5.txt b/Documentation/RelNotes/1.6.5.txt
index 6c7f7da7eb9..79cb1b2b6df 100644
--- a/Documentation/RelNotes/1.6.5.txt
+++ b/Documentation/RelNotes/1.6.5.txt
@@ -21,7 +21,7 @@ To ease the transition plan, the receiving repository of such a
 push running this release will issue a big warning when the
 configuration variable is missing.  Please refer to:
 
-  http://git.or.cz/gitwiki/GitFaq#non-bare
+  https://archive.kernel.org/oldwiki/git.wiki.kernel.org/index.php/GitFaq.html#non-bare
   https://lore.kernel.org/git/7vbptlsuyv.fsf@gitster.siamese.dyndns.org/
 
 for more details on the reason why this change is needed and the
diff --git a/Documentation/RelNotes/1.6.6.txt b/Documentation/RelNotes/1.6.6.txt
index 3ed1e014337..88b86a827e8 100644
--- a/Documentation/RelNotes/1.6.6.txt
+++ b/Documentation/RelNotes/1.6.6.txt
@@ -63,7 +63,7 @@ users will fare this time.
 
    Please refer to:
 
-   http://git.or.cz/gitwiki/GitFaq#non-bare
+   https://archive.kernel.org/oldwiki/git.wiki.kernel.org/index.php/GitFaq.html#non-bare
    https://lore.kernel.org/git/7vbptlsuyv.fsf@gitster.siamese.dyndns.org/
 
    for more details on the reason why this change is needed and the
diff --git a/Documentation/git-cvsimport.txt b/Documentation/git-cvsimport.txt
index e107ae930de..90fdc2551a3 100644
--- a/Documentation/git-cvsimport.txt
+++ b/Documentation/git-cvsimport.txt
@@ -22,7 +22,7 @@ DESCRIPTION
 deprecated; it does not work with cvsps version 3 and later.  If you are
 performing a one-shot import of a CVS repository consider using
 http://cvs2svn.tigris.org/cvs2git.html[cvs2git] or
-http://www.catb.org/esr/cvs-fast-export/[cvs-fast-export].
+https://gitlab.com/esr/cvs-fast-export[cvs-fast-export].
 
 Imports a CVS repository into Git. It will either create a new
 repository, or incrementally import into an existing one.
diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt
index 06aa8bf0741..8ccc1973b80 100644
--- a/Documentation/git-format-patch.txt
+++ b/Documentation/git-format-patch.txt
@@ -610,7 +610,7 @@ Approach #3 (external editor)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 The following Thunderbird extensions are needed:
-AboutConfig from http://aboutconfig.mozdev.org/ and
+AboutConfig from https://mjg.github.io/AboutConfig/ and
 External Editor from https://globs.org/articles.php?lng=en&pg=8
 
 1. Prepare the patch as a text file using your method of choice.
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 11228956cd5..c7292eb25d0 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -1061,7 +1061,7 @@ Authors
 -------
 Git was started by Linus Torvalds, and is currently maintained by Junio
 C Hamano. Numerous contributions have come from the Git mailing list
-<git@vger.kernel.org>.  http://www.openhub.net/p/git/contributors/summary
+<git@vger.kernel.org>.  https://openhub.net/p/git/contributors/summary
 gives you a more complete list of contributors.
 
 If you have a clone of git.git itself, the
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index 1d6102e0674..4a11d590b68 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -2390,7 +2390,7 @@ proc do_quit {{rc {1}}} {
 	set ret_code $rc
 
 	# Briefly enable send again, working around Tk bug
-	# http://sourceforge.net/tracker/?func=detail&atid=112997&aid=1821174&group_id=12997
+	# https://sourceforge.net/p/tktoolkit/bugs/2343/
 	tk appname [appname]
 
 	destroy .
diff --git a/gitk-git/gitk b/gitk-git/gitk
index 1db46977df0..7a087f123d7 100755
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -12472,7 +12472,7 @@ if {[tk windowingsystem] eq "aqua"} {
 
 catch {
     # follow the XDG base directory specification by default. See
-    # http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
+    # https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
     if {[info exists env(XDG_CONFIG_HOME)] && $env(XDG_CONFIG_HOME) ne ""} {
         # XDG_CONFIG_HOME environment variable is set
         set config_file [file join $env(XDG_CONFIG_HOME) git gitk]
diff --git a/gitweb/static/js/lib/common-lib.js b/gitweb/static/js/lib/common-lib.js
index 17b1796496d..99e3eb8c3d9 100644
--- a/gitweb/static/js/lib/common-lib.js
+++ b/gitweb/static/js/lib/common-lib.js
@@ -137,7 +137,7 @@ function addCssRule(selector, style) {
  *   http://www.dustindiaz.com/getelementsbyclass/
  *   https://stackoverflow.com/questions/1818865/do-we-have-getelementsbyclassname-in-javascript
  *
- * See also http://ejohn.org/blog/getelementsbyclassname-speed-comparison/
+ * See also https://johnresig.com/blog/getelementsbyclassname-speed-comparison/
  *
  * @param {String} class: name of _single_ class to find
  * @param {String} [taghint] limit search to given tags
diff --git a/http.c b/http.c
index e138b4b96fb..33c6011e8d8 100644
--- a/http.c
+++ b/http.c
@@ -1877,7 +1877,7 @@ static void write_accept_language(struct strbuf *buf)
 	 * MAX_DECIMAL_PLACES must not be larger than 3. If it is larger than
 	 * that, q-value will be smaller than 0.001, the minimum q-value the
 	 * HTTP specification allows. See
-	 * http://tools.ietf.org/html/rfc7231#section-5.3.1 for q-value.
+	 * https://datatracker.ietf.org/doc/html/rfc7231#section-5.3.1 for q-value.
 	 */
 	const int MAX_DECIMAL_PLACES = 3;
 	const int MAX_LANGUAGE_TAGS = 1000;
diff --git a/imap-send.c b/imap-send.c
index 3b2077e39b2..448ca64c052 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -860,7 +860,7 @@ static void imap_close_store(struct imap_store *ctx)
 
 /*
  * hexchar() and cram() functions are based on the code from the isync
- * project (http://isync.sf.net/).
+ * project (https://isync.sourceforge.io/).
  */
 static char hexchar(unsigned int b)
 {
diff --git a/json-writer.h b/json-writer.h
index de140e54c98..04413bd1afd 100644
--- a/json-writer.h
+++ b/json-writer.h
@@ -4,7 +4,7 @@
 /*
  * JSON data structures are defined at:
  * [1] https://www.ietf.org/rfc/rfc7159.txt
- * [2] http://json.org/
+ * [2] https://www.json.org/
  *
  * The JSON-writer API allows one to build JSON data structures using a
  * simple wrapper around a "struct strbuf" buffer.  It is intended as a
-- 
gitgitgadget


^ permalink raw reply related

* [PATCH v2 3/4] doc: update links for andre-simon.de
From: Josh Soref via GitGitGadget @ 2023-09-24 10:57 UTC (permalink / raw)
  To: git; +Cc: Josh Soref, Josh Soref
In-Reply-To: <pull.1589.v2.git.1695553041.gitgitgadget@gmail.com>

From: Josh Soref <jsoref@gmail.com>

Beyond the fact that it's somewhat traditional to respect sites'
self-identification, it's helpful for links to point to the things
that people expect them to reference. Here that means linking to
specific pages instead of a domain.

Signed-off-by: Josh Soref <jsoref@gmail.com>
---
 Documentation/gitweb.conf.txt | 2 +-
 gitweb/INSTALL                | 2 +-
 gitweb/gitweb.perl            | 4 ++--
 gitweb/static/gitweb.css      | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Documentation/gitweb.conf.txt b/Documentation/gitweb.conf.txt
index 1edabdfef36..417289dcd17 100644
--- a/Documentation/gitweb.conf.txt
+++ b/Documentation/gitweb.conf.txt
@@ -242,7 +242,7 @@ $mimetypes_file::
 
 $highlight_bin::
 	Path to the highlight executable to use (it must be the one from
-	http://www.andre-simon.de[] due to assumptions about parameters and output).
+	http://andre-simon.de/zip/download.php[] due to assumptions about parameters and output).
 	By default set to 'highlight'; set it to full path to highlight
 	executable if it is not installed on your web server's PATH.
 	Note that 'highlight' feature must be set for gitweb to actually
diff --git a/gitweb/INSTALL b/gitweb/INSTALL
index a58e6b3c44b..0f8bc39ad84 100644
--- a/gitweb/INSTALL
+++ b/gitweb/INSTALL
@@ -203,7 +203,7 @@ You can specify the following configuration variables when building GIT:
    created.  [Default: /etc/gitweb.conf]
  * HIGHLIGHT_BIN
    Path to the highlight executable to use (must be the one from
-   http://www.andre-simon.de due to assumptions about parameters and output).
+   http://andre-simon.de/zip/download.php due to assumptions about parameters and output).
    Useful if highlight is not installed on your webserver's PATH.
    [Default: highlight]
 
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index d23468690ed..b6659410ef1 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -197,7 +197,7 @@ our @diff_opts = ('-M'); # taken from git_commit
 our $prevent_xss = 0;
 
 # Path to the highlight executable to use (must be the one from
-# http://www.andre-simon.de due to assumptions about parameters and output).
+# http://andre-simon.de/zip/download.php due to assumptions about parameters and output).
 # Useful if highlight is not installed on your webserver's PATH.
 # [Default: highlight]
 our $highlight_bin = "++HIGHLIGHT_BIN++";
@@ -269,7 +269,7 @@ our %avatar_size = (
 # Leave it undefined (or set to 'undef') to turn off load checking.
 our $maxload = 300;
 
-# configuration for 'highlight' (http://www.andre-simon.de/)
+# configuration for 'highlight' (http://andre-simon.de/doku/highlight/en/highlight.php)
 # match by basename
 our %highlight_basename = (
 	#'Program' => 'py',
diff --git a/gitweb/static/gitweb.css b/gitweb/static/gitweb.css
index 32126010326..48d2e510154 100644
--- a/gitweb/static/gitweb.css
+++ b/gitweb/static/gitweb.css
@@ -667,7 +667,7 @@ div.remote {
 }
 
 
-/* Style definition generated by highlight 2.4.5, http://www.andre-simon.de/ */
+/* Style definition generated by highlight 2.4.5, http://andre-simon.de/doku/highlight/en/highlight.php */
 
 /* Highlighting theme definition: */
 
-- 
gitgitgadget


^ permalink raw reply related

* [PATCH v2 1/4] doc: switch links to https
From: Josh Soref via GitGitGadget @ 2023-09-24 10:57 UTC (permalink / raw)
  To: git; +Cc: Josh Soref, Josh Soref
In-Reply-To: <pull.1589.v2.git.1695553041.gitgitgadget@gmail.com>

From: Josh Soref <jsoref@gmail.com>

It's somewhat traditional to respect sites' self-identification.

Signed-off-by: Josh Soref <jsoref@gmail.com>
---
 Documentation/CodingGuidelines                         | 2 +-
 Documentation/MyFirstContribution.txt                  | 2 +-
 Documentation/git-cvsimport.txt                        | 2 +-
 Documentation/git-format-patch.txt                     | 2 +-
 Documentation/git-imap-send.txt                        | 2 +-
 Documentation/git-send-email.txt                       | 2 +-
 Documentation/gitcore-tutorial.txt                     | 2 +-
 Documentation/gitprotocol-http.txt                     | 4 ++--
 Documentation/gitweb.conf.txt                          | 2 +-
 Documentation/gitweb.txt                               | 2 +-
 Documentation/howto/keep-canonical-history-correct.txt | 2 +-
 Documentation/signoff-option.txt                       | 2 +-
 INSTALL                                                | 2 +-
 Makefile                                               | 4 ++--
 README.md                                              | 2 +-
 git-cvsimport.perl                                     | 2 +-
 git-gui/git-gui.sh                                     | 4 ++--
 git-gui/lib/encoding.tcl                               | 2 +-
 git-gui/po/README                                      | 2 +-
 git-instaweb.sh                                        | 4 ++--
 gitk-git/gitk                                          | 2 +-
 gitweb/gitweb.perl                                     | 4 ++--
 gitweb/static/js/lib/common-lib.js                     | 8 ++++----
 graph.h                                                | 4 ++--
 imap-send.c                                            | 2 +-
 json-writer.h                                          | 2 +-
 kwset.c                                                | 2 +-
 kwset.h                                                | 2 +-
 list.h                                                 | 2 +-
 perl/FromCPAN/Error.pm                                 | 2 +-
 perl/Git/SVN.pm                                        | 2 +-
 protocol.h                                             | 2 +-
 sh-i18n--envsubst.c                                    | 4 ++--
 t/README                                               | 4 ++--
 t/helper/test-regex.c                                  | 2 +-
 t/perf/perf-lib.sh                                     | 2 +-
 t/t9114-git-svn-dcommit-merge.sh                       | 2 +-
 t/t9801-git-p4-branch.sh                               | 2 +-
 t/test-lib-functions.sh                                | 2 +-
 t/test-lib-github-workflow-markup.sh                   | 2 +-
 t/test-lib-junit.sh                                    | 2 +-
 t/test-lib.sh                                          | 2 +-
 trace.c                                                | 2 +-
 utf8.c                                                 | 2 +-
 utf8.h                                                 | 6 +++---
 45 files changed, 58 insertions(+), 58 deletions(-)

diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index 65af8d82ced..94d4d869039 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -24,7 +24,7 @@ code.  For Git in general, a few rough rules are:
 
    "Once it _is_ in the tree, it's not really worth the patch noise to
    go and fix it up."
-   Cf. http://lkml.iu.edu/hypermail/linux/kernel/1001.3/01069.html
+   Cf. https://lkml.iu.edu/hypermail/linux/kernel/1001.3/01069.html
 
  - Log messages to explain your changes are as important as the
    changes themselves.  Clearly written code and in-code comments
diff --git a/Documentation/MyFirstContribution.txt b/Documentation/MyFirstContribution.txt
index 62d11a5cd7f..710a1f9d915 100644
--- a/Documentation/MyFirstContribution.txt
+++ b/Documentation/MyFirstContribution.txt
@@ -832,7 +832,7 @@ Johannes Schindelin to make life as a Git contributor easier for those used to
 the GitHub PR workflow. It allows contributors to open pull requests against its
 mirror of the Git project, and does some magic to turn the PR into a set of
 emails and send them out for you. It also runs the Git continuous integration
-suite for you. It's documented at http://gitgitgadget.github.io.
+suite for you. It's documented at https://gitgitgadget.github.io/.
 
 [[create-fork]]
 === Forking `git/git` on GitHub
diff --git a/Documentation/git-cvsimport.txt b/Documentation/git-cvsimport.txt
index b3f27671a0c..e107ae930de 100644
--- a/Documentation/git-cvsimport.txt
+++ b/Documentation/git-cvsimport.txt
@@ -221,7 +221,7 @@ Problems related to tags:
 If you suspect that any of these issues may apply to the repository you
 want to import, consider using cvs2git:
 
-* cvs2git (part of cvs2svn), `http://subversion.apache.org/`
+* cvs2git (part of cvs2svn), `https://subversion.apache.org/`
 
 GIT
 ---
diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt
index 711823a7f4e..06aa8bf0741 100644
--- a/Documentation/git-format-patch.txt
+++ b/Documentation/git-format-patch.txt
@@ -611,7 +611,7 @@ Approach #3 (external editor)
 
 The following Thunderbird extensions are needed:
 AboutConfig from http://aboutconfig.mozdev.org/ and
-External Editor from http://globs.org/articles.php?lng=en&pg=8
+External Editor from https://globs.org/articles.php?lng=en&pg=8
 
 1. Prepare the patch as a text file using your method of choice.
 
diff --git a/Documentation/git-imap-send.txt b/Documentation/git-imap-send.txt
index f7b18515141..c8a89d7243b 100644
--- a/Documentation/git-imap-send.txt
+++ b/Documentation/git-imap-send.txt
@@ -135,7 +135,7 @@ flames ridiculing you if you don't check this.
 
 Thunderbird in particular is known to be problematic.  Thunderbird
 users may wish to visit this web page for more information:
-  http://kb.mozillazine.org/Plain_text_e-mail_-_Thunderbird#Completely_plain_email
+  https://kb.mozillazine.org/Plain_text_e-mail_-_Thunderbird#Completely_plain_email
 
 SEE ALSO
 --------
diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index 492a82323da..23c75d26f93 100644
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -453,7 +453,7 @@ have been specified, in which case default to 'compose'.
 			998 characters unless a suitable transfer encoding
 			('auto', 'base64', or 'quoted-printable') is used;
 			this is due to SMTP limits as described by
-			http://www.ietf.org/rfc/rfc5322.txt.
+			https://www.ietf.org/rfc/rfc5322.txt.
 --
 +
 Default is the value of `sendemail.validate`; if this is not set,
diff --git a/Documentation/gitcore-tutorial.txt b/Documentation/gitcore-tutorial.txt
index c0b95256cc8..2122aeb9769 100644
--- a/Documentation/gitcore-tutorial.txt
+++ b/Documentation/gitcore-tutorial.txt
@@ -1089,7 +1089,7 @@ the remote repository URL in the local repository's config file
 like this:
 
 ------------------------------------------------
-$ git config remote.linus.url http://www.kernel.org/pub/scm/git/git.git/
+$ git config remote.linus.url https://git.kernel.org/pub/scm/git/git.git/
 ------------------------------------------------
 
 and use the "linus" keyword with 'git pull' instead of the full URL.
diff --git a/Documentation/gitprotocol-http.txt b/Documentation/gitprotocol-http.txt
index ccc13f0a407..7533f0e61b7 100644
--- a/Documentation/gitprotocol-http.txt
+++ b/Documentation/gitprotocol-http.txt
@@ -529,8 +529,8 @@ TODO: Document this further.
 REFERENCES
 ----------
 
-http://www.ietf.org/rfc/rfc1738.txt[RFC 1738: Uniform Resource Locators (URL)]
-http://www.ietf.org/rfc/rfc2616.txt[RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1]
+https://www.ietf.org/rfc/rfc1738.txt[RFC 1738: Uniform Resource Locators (URL)]
+https://www.ietf.org/rfc/rfc2616.txt[RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1]
 
 SEE ALSO
 --------
diff --git a/Documentation/gitweb.conf.txt b/Documentation/gitweb.conf.txt
index 34b1d6e2243..1edabdfef36 100644
--- a/Documentation/gitweb.conf.txt
+++ b/Documentation/gitweb.conf.txt
@@ -820,7 +820,7 @@ filesystem (i.e. "$projectroot/$project"), `%h` to the current hash
 (\'h' gitweb parameter) and `%b` to the current hash base
 (\'hb' gitweb parameter); `%%` expands to \'%'.
 +
-For example, at the time this page was written, the http://repo.or.cz[]
+For example, at the time this page was written, the https://repo.or.cz[]
 Git hosting site set it to the following to enable graphical log
 (using the third party tool *git-browser*):
 +
diff --git a/Documentation/gitweb.txt b/Documentation/gitweb.txt
index af6bf3c45ec..434893595a4 100644
--- a/Documentation/gitweb.txt
+++ b/Documentation/gitweb.txt
@@ -28,7 +28,7 @@ Gitweb provides a web interface to Git repositories.  Its features include:
   revisions one at a time, viewing the history of the repository.
 * Finding commits which commit messages matches given search term.
 
-See http://repo.or.cz/w/git.git/tree/HEAD:/gitweb/[] for gitweb source code,
+See https://repo.or.cz/w/git.git/tree/HEAD:/gitweb/[] for gitweb source code,
 browsed using gitweb itself.
 
 
diff --git a/Documentation/howto/keep-canonical-history-correct.txt b/Documentation/howto/keep-canonical-history-correct.txt
index 35d48ef714e..5f800fd85a3 100644
--- a/Documentation/howto/keep-canonical-history-correct.txt
+++ b/Documentation/howto/keep-canonical-history-correct.txt
@@ -213,4 +213,4 @@ The procedure will result in a history that looks like this:
 		 B0--B1---------B2
 ------------
 
-See also http://git-blame.blogspot.com/2013/09/fun-with-first-parent-history.html
+See also https://git-blame.blogspot.com/2013/09/fun-with-first-parent-history.html
diff --git a/Documentation/signoff-option.txt b/Documentation/signoff-option.txt
index 12aa2333e46..d98758f3cb7 100644
--- a/Documentation/signoff-option.txt
+++ b/Documentation/signoff-option.txt
@@ -9,7 +9,7 @@ endif::git-commit[]
 	the committer has the rights to submit the work under the
 	project's license or agrees to some contributor representation,
 	such as a Developer Certificate of Origin.
-	(See http://developercertificate.org for the one used by the
+	(See https://developercertificate.org for the one used by the
 	Linux kernel and Git projects.)  Consult the documentation or
 	leadership of the project to which you're contributing to
 	understand how the signoffs are used in that project.
diff --git a/INSTALL b/INSTALL
index 4b422888828..020eba62afb 100644
--- a/INSTALL
+++ b/INSTALL
@@ -124,7 +124,7 @@ Issues of note:
 	  interacting with svn repositories with "git svn").  If you can
 	  live without these, use NO_PERL.  Note that recent releases of
 	  Redhat/Fedora are reported to ship Perl binary package with some
-	  core modules stripped away (see http://lwn.net/Articles/477234/),
+	  core modules stripped away (see https://lwn.net/Articles/477234/),
 	  so you might need to install additional packages other than Perl
 	  itself, e.g. Digest::MD5, File::Spec, File::Temp, Net::Domain,
 	  Net::SMTP, and Time::HiRes.
diff --git a/Makefile b/Makefile
index 57763093653..de1603a04fe 100644
--- a/Makefile
+++ b/Makefile
@@ -186,7 +186,7 @@ include shared.mak
 # Define NO_DEFLATE_BOUND if your zlib does not have deflateBound.
 #
 # Define NO_NORETURN if using buggy versions of gcc 4.6+ and profile feedback,
-# as the compiler can crash (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49299)
+# as the compiler can crash (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49299)
 #
 # Define USE_NSEC below if you want git to care about sub-second file mtimes
 # and ctimes. Note that you need recent glibc (at least 2.2.4) for this. On
@@ -2720,7 +2720,7 @@ $(OBJECTS): %.o: %.c GIT-CFLAGS $(missing_dep_dirs) $(missing_compdb_dir)
 
 ifdef USE_COMPUTED_HEADER_DEPENDENCIES
 # Take advantage of gcc's on-the-fly dependency generation
-# See <http://gcc.gnu.org/gcc-3.0/features.html>.
+# See <https://gcc.gnu.org/gcc-3.0/features.html>.
 dep_files_present := $(wildcard $(dep_files))
 ifneq ($(dep_files_present),)
 include $(dep_files_present)
diff --git a/README.md b/README.md
index 7ce4f05bae8..2c3de2f9c80 100644
--- a/README.md
+++ b/README.md
@@ -42,7 +42,7 @@ string translations (localization l10) should see [po/README.md][]
 To subscribe to the list, send an email with just "subscribe git" in
 the body to majordomo@vger.kernel.org (not the Git list). The mailing
 list archives are available at <https://lore.kernel.org/git/>,
-<http://marc.info/?l=git> and other archival sites.
+<https://marc.info/?l=git> and other archival sites.
 
 Issues which are security relevant should be disclosed privately to
 the Git Security mailing list <git-security@googlegroups.com>.
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 7bf3c12d678..da77a1bf157 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -329,7 +329,7 @@ sub conn {
 			# Use a HTTP Proxy. Only works for HTTP proxies that
 			# don't require user authentication
 			#
-			# See: http://www.ietf.org/rfc/rfc2817.txt
+			# See: https://www.ietf.org/rfc/rfc2817.txt
 
 			$s = IO::Socket::INET->new(PeerHost => $proxyhost, PeerPort => $proxyport);
 			die "Socket to $proxyhost: $!\n" unless defined $s;
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index 8bc8892c400..1d6102e0674 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -24,7 +24,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with this program; if not, see <http://www.gnu.org/licenses/>.}]
+along with this program; if not, see <https://www.gnu.org/licenses/>.}]
 
 ######################################################################
 ##
@@ -3075,7 +3075,7 @@ if {$doc_path ne {}} {
 if {[file isfile $doc_path]} {
 	set doc_url "file:$doc_path"
 } else {
-	set doc_url {http://www.kernel.org/pub/software/scm/git/docs/}
+	set doc_url {https://www.kernel.org/pub/software/scm/git/docs/}
 }
 
 proc start_browser {url} {
diff --git a/git-gui/lib/encoding.tcl b/git-gui/lib/encoding.tcl
index 32668fc9c6d..d2e0fa60c3b 100644
--- a/git-gui/lib/encoding.tcl
+++ b/git-gui/lib/encoding.tcl
@@ -3,7 +3,7 @@
 # (Copied from gitk, commit fd8ccbec4f0161)
 
 # This list of encoding names and aliases is distilled from
-# http://www.iana.org/assignments/character-sets.
+# https://www.iana.org/assignments/character-sets.
 # Not all of them are supported by Tcl.
 set encoding_aliases {
     { ANSI_X3.4-1968 iso-ir-6 ANSI_X3.4-1986 ISO_646.irv:1991 ASCII
diff --git a/git-gui/po/README b/git-gui/po/README
index 2514bc22abf..116233100d7 100644
--- a/git-gui/po/README
+++ b/git-gui/po/README
@@ -39,7 +39,7 @@ in your language?
 If you do not know what your language should be named, you need to find
 it.  This currently follows ISO 639-1 two letter codes:
 
-	http://www.loc.gov/standards/iso639-2/php/code_list.php
+	https://www.loc.gov/standards/iso639-2/php/code_list.php
 
 For example, if you are preparing a translation for Afrikaans, the
 language code is "af".  If there already is a translation for your
diff --git a/git-instaweb.sh b/git-instaweb.sh
index c68f49454cd..994431c8872 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -432,7 +432,7 @@ mongoose_conf() {
 # Mongoose web server configuration file.
 # Lines starting with '#' and empty lines are ignored.
 # For detailed description of every option, visit
-# http://code.google.com/p/mongoose/wiki/MongooseManual
+# https://code.google.com/p/mongoose/wiki/MongooseManual
 
 root		$root
 ports		$port
@@ -458,7 +458,7 @@ plackup_conf () {
 #!$PERL
 
 # gitweb - simple web interface to track changes in git repositories
-#          PSGI wrapper and server starter (see http://plackperl.org)
+#          PSGI wrapper and server starter (see https://plackperl.org)
 
 use strict;
 
diff --git a/gitk-git/gitk b/gitk-git/gitk
index df3ba2ea99b..1db46977df0 100755
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -11956,7 +11956,7 @@ proc formatdate {d} {
 }
 
 # This list of encoding names and aliases is distilled from
-# http://www.iana.org/assignments/character-sets.
+# https://www.iana.org/assignments/character-sets.
 # Not all of them are supported by Tcl.
 set encoding_aliases {
     { ANSI_X3.4-1968 iso-ir-6 ANSI_X3.4-1986 ISO_646.irv:1991 ASCII
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index e66eb3d9bad..d23468690ed 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -122,9 +122,9 @@ our $favicon = "++GITWEB_FAVICON++";
 our $javascript = "++GITWEB_JS++";
 
 # URI and label (title) of GIT logo link
-#our $logo_url = "http://www.kernel.org/pub/software/scm/git/docs/";
+#our $logo_url = "https://www.kernel.org/pub/software/scm/git/docs/";
 #our $logo_label = "git documentation";
-our $logo_url = "http://git-scm.com/";
+our $logo_url = "https://git-scm.com/";
 our $logo_label = "git homepage";
 
 # source of projects list
diff --git a/gitweb/static/js/lib/common-lib.js b/gitweb/static/js/lib/common-lib.js
index 018bbb7d4cb..17b1796496d 100644
--- a/gitweb/static/js/lib/common-lib.js
+++ b/gitweb/static/js/lib/common-lib.js
@@ -123,8 +123,8 @@ function addCssRule(selector, style) {
  * NOTE that there are limits and differences compared to native
  * getElementsByClassName as defined by e.g.:
  *   https://developer.mozilla.org/en/DOM/document.getElementsByClassName
- *   http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#dom-getelementsbyclassname
- *   http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#dom-document-getelementsbyclassname
+ *   https://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#dom-getelementsbyclassname
+ *   https://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#dom-document-getelementsbyclassname
  *
  * Namely, this implementation supports only single class name as
  * argument and not set of space-separated tokens representing classes,
@@ -133,9 +133,9 @@ function addCssRule(selector, style) {
  * (via getElementsByTagName).
  *
  * Based on
- *   http://code.google.com/p/getelementsbyclassname/
+ *   https://code.google.com/p/getelementsbyclassname/
  *   http://www.dustindiaz.com/getelementsbyclass/
- *   http://stackoverflow.com/questions/1818865/do-we-have-getelementsbyclassname-in-javascript
+ *   https://stackoverflow.com/questions/1818865/do-we-have-getelementsbyclassname-in-javascript
  *
  * See also http://ejohn.org/blog/getelementsbyclassname-speed-comparison/
  *
diff --git a/graph.h b/graph.h
index e88632a0140..3fd1dcb2e94 100644
--- a/graph.h
+++ b/graph.h
@@ -130,7 +130,7 @@ void graph_setup_line_prefix(struct diff_options *diffopt);
  * This functions must be called BEFORE graph_init() is called.
  *
  * NOTE: This function isn't used in Git outside graph.c but it is used
- * by CGit (http://git.zx2c4.com/cgit/) to use HTML for colors.
+ * by CGit (https://git.zx2c4.com/cgit/) to use HTML for colors.
  */
 void graph_set_column_colors(const char **colors, unsigned short colors_max);
 
@@ -196,7 +196,7 @@ int graph_is_commit_finished(struct git_graph const *graph);
  * graph_update() is called.
  *
  * NOTE: This function isn't used in Git outside graph.c but it is used
- * by CGit (http://git.zx2c4.com/cgit/) to wrap HTML around graph lines.
+ * by CGit (https://git.zx2c4.com/cgit/) to wrap HTML around graph lines.
  */
 int graph_next_line(struct git_graph *graph, struct strbuf *sb);
 
diff --git a/imap-send.c b/imap-send.c
index 996651e4f80..3b2077e39b2 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -18,7 +18,7 @@
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, see <http://www.gnu.org/licenses/>.
+ *  along with this program; if not, see <https://www.gnu.org/licenses/>.
  */
 
 #include "git-compat-util.h"
diff --git a/json-writer.h b/json-writer.h
index 209355e0f12..de140e54c98 100644
--- a/json-writer.h
+++ b/json-writer.h
@@ -3,7 +3,7 @@
 
 /*
  * JSON data structures are defined at:
- * [1] http://www.ietf.org/rfc/rfc7159.txt
+ * [1] https://www.ietf.org/rfc/rfc7159.txt
  * [2] http://json.org/
  *
  * The JSON-writer API allows one to build JSON data structures using a
diff --git a/kwset.c b/kwset.c
index bbfcf815a56..695e47b7ccf 100644
--- a/kwset.c
+++ b/kwset.c
@@ -18,7 +18,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, see <http://www.gnu.org/licenses/>. */
+   along with this program; if not, see <https://www.gnu.org/licenses/>. */
 
 /* Written August 1989 by Mike Haertel.
    The author may be reached (Email) at the address mike@ai.mit.edu,
diff --git a/kwset.h b/kwset.h
index d42a793a301..c722664e5a7 100644
--- a/kwset.h
+++ b/kwset.h
@@ -20,7 +20,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, see <http://www.gnu.org/licenses/>. */
+   along with this program; if not, see <https://www.gnu.org/licenses/>. */
 
 /* Written August 1989 by Mike Haertel.
    The author may be reached (Email) at the address mike@ai.mit.edu,
diff --git a/list.h b/list.h
index 362a4cd7f5f..98428010f4d 100644
--- a/list.h
+++ b/list.h
@@ -19,7 +19,7 @@
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, see
- * <http://www.gnu.org/licenses/>.
+ * <https://www.gnu.org/licenses/>.
  */
 
 #ifndef LIST_H
diff --git a/perl/FromCPAN/Error.pm b/perl/FromCPAN/Error.pm
index d82b71325c6..5b97e0315d6 100644
--- a/perl/FromCPAN/Error.pm
+++ b/perl/FromCPAN/Error.pm
@@ -1025,7 +1025,7 @@ C<:warndie> handlers added by Paul Evans <leonerd@leonerd.org.uk>
 
 =head1 MAINTAINER
 
-Shlomi Fish, L<http://www.shlomifish.org/> .
+Shlomi Fish, L<https://www.shlomifish.org/> .
 
 =head1 PAST MAINTAINERS
 
diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm
index 6ce2e283c8d..7721708ce5d 100644
--- a/perl/Git/SVN.pm
+++ b/perl/Git/SVN.pm
@@ -1752,7 +1752,7 @@ sub tie_for_persistent_memoization {
 END {
 	# Force cache writeout explicitly instead of waiting for
 	# global destruction to avoid segfault in Storable:
-	# http://rt.cpan.org/Public/Bug/Display.html?id=36087
+	# https://rt.cpan.org/Public/Bug/Display.html?id=36087
 	unmemoize_svn_mergeinfo_functions();
 }
 
diff --git a/protocol.h b/protocol.h
index de66bf80f84..1e574bbd80b 100644
--- a/protocol.h
+++ b/protocol.h
@@ -18,7 +18,7 @@
  * with Linus Torvalds <torvalds@osdl.org> as the point of
  * contact. September 2005.
  *
- * See http://www.iana.org/assignments/port-numbers
+ * See https://www.iana.org/assignments/port-numbers
  */
 #define DEFAULT_GIT_PORT 9418
 
diff --git a/sh-i18n--envsubst.c b/sh-i18n--envsubst.c
index 133496bd4d9..f69fd166105 100644
--- a/sh-i18n--envsubst.c
+++ b/sh-i18n--envsubst.c
@@ -31,7 +31,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
+   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
 
 /* closeout.c - close standard output and standard error
    Copyright (C) 1998-2007 Free Software Foundation, Inc.
@@ -47,7 +47,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
+   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
 
 #include <errno.h>
 #include <stdio.h>
diff --git a/t/README b/t/README
index 61080859899..643c3905d49 100644
--- a/t/README
+++ b/t/README
@@ -32,7 +32,7 @@ the tests.
     ok 2 - plain with GIT_WORK_TREE
     ok 3 - plain bare
 
-Since the tests all output TAP (see http://testanything.org) they can
+Since the tests all output TAP (see https://testanything.org) they can
 be run with any TAP harness. Here's an example of parallel testing
 powered by a recent version of prove(1):
 
@@ -1279,7 +1279,7 @@ Devel::Cover module. To install it do:
    sudo aptitude install libdevel-cover-perl
 
    # From the CPAN with cpanminus
-   curl -L http://cpanmin.us | perl - --sudo --self-upgrade
+   curl -L https://cpanmin.us/ | perl - --sudo --self-upgrade
    cpanm --sudo Devel::Cover
 
 Then, at the top-level:
diff --git a/t/helper/test-regex.c b/t/helper/test-regex.c
index bd871a735b4..80042eafc20 100644
--- a/t/helper/test-regex.c
+++ b/t/helper/test-regex.c
@@ -30,7 +30,7 @@ static int test_regex_bug(void)
 	if (regexec(&r, str, 1, m, 0))
 		die("no match of pattern '%s' to string '%s'", pat, str);
 
-	/* http://sourceware.org/bugzilla/show_bug.cgi?id=3957  */
+	/* https://sourceware.org/bugzilla/show_bug.cgi?id=3957 */
 	if (m[0].rm_so == 3) /* matches '\n' when it should not */
 		die("regex bug confirmed: re-build git with NO_REGEX=1");
 
diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh
index e7786775a90..def22e70aed 100644
--- a/t/perf/perf-lib.sh
+++ b/t/perf/perf-lib.sh
@@ -15,7 +15,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see http://www.gnu.org/licenses/ .
+# along with this program.  If not, see https://www.gnu.org/licenses/ .
 
 # These variables must be set before the inclusion of test-lib.sh below,
 # because it will change our working directory.
diff --git a/t/t9114-git-svn-dcommit-merge.sh b/t/t9114-git-svn-dcommit-merge.sh
index 32317d6bca5..e06538b1c85 100755
--- a/t/t9114-git-svn-dcommit-merge.sh
+++ b/t/t9114-git-svn-dcommit-merge.sh
@@ -27,7 +27,7 @@ cat << EOF
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
 #
 EOF
 }
diff --git a/t/t9801-git-p4-branch.sh b/t/t9801-git-p4-branch.sh
index 759a14fa87c..3b5fea91822 100755
--- a/t/t9801-git-p4-branch.sh
+++ b/t/t9801-git-p4-branch.sh
@@ -466,7 +466,7 @@ test_expect_success 'git p4 clone complex branches with excluded files' '
 	)
 '
 
-# From a report in http://stackoverflow.com/questions/11893688
+# From a report in https://stackoverflow.com/questions/11893688
 # where --use-client-spec caused branch prefixes not to be removed;
 # every file in git appeared into a subdirectory of the branch name.
 test_expect_success 'use-client-spec detect-branches setup' '
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index 2f8868caa17..0b7ddcc5858 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see http://www.gnu.org/licenses/ .
+# along with this program.  If not, see https://www.gnu.org/licenses/ .
 
 # The semantics of the editor variables are that of invoking
 # sh -c "$EDITOR \"$@\"" files ...
diff --git a/t/test-lib-github-workflow-markup.sh b/t/test-lib-github-workflow-markup.sh
index 9c5339c577a..970c6538cba 100644
--- a/t/test-lib-github-workflow-markup.sh
+++ b/t/test-lib-github-workflow-markup.sh
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see http://www.gnu.org/licenses/ .
+# along with this program.  If not, see https://www.gnu.org/licenses/ .
 #
 # The idea is for `test-lib.sh` to source this file when run in GitHub
 # workflows; these functions will then override (empty) functions
diff --git a/t/test-lib-junit.sh b/t/test-lib-junit.sh
index 79c31c788b9..76cbbd3299d 100644
--- a/t/test-lib-junit.sh
+++ b/t/test-lib-junit.sh
@@ -15,7 +15,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see http://www.gnu.org/licenses/ .
+# along with this program.  If not, see https://www.gnu.org/licenses/ .
 #
 # The idea is for `test-lib.sh` to source this file when the user asks
 # for JUnit XML; these functions will then override (empty) functions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 5ea5d1d62a0..9e4216a8e0b 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -13,7 +13,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see http://www.gnu.org/licenses/ .
+# along with this program.  If not, see https://www.gnu.org/licenses/ .
 
 # Test the binaries we have just built.  The tests are kept in
 # t/ subdirectory and are run in 'trash directory' subdirectory.
diff --git a/trace.c b/trace.c
index 971a68abe84..8669ddfca25 100644
--- a/trace.c
+++ b/trace.c
@@ -18,7 +18,7 @@
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, see <http://www.gnu.org/licenses/>.
+ *  along with this program; if not, see <https://www.gnu.org/licenses/>.
  */
 
 #include "git-compat-util.h"
diff --git a/utf8.c b/utf8.c
index 6a0dd25b0fe..6bfaefa28eb 100644
--- a/utf8.c
+++ b/utf8.c
@@ -2,7 +2,7 @@
 #include "strbuf.h"
 #include "utf8.h"
 
-/* This code is originally from http://www.cl.cam.ac.uk/~mgk25/ucs/ */
+/* This code is originally from https://www.cl.cam.ac.uk/~mgk25/ucs/ */
 
 static const char utf16_be_bom[] = {'\xFE', '\xFF'};
 static const char utf16_le_bom[] = {'\xFF', '\xFE'};
diff --git a/utf8.h b/utf8.h
index b68efef6f43..35df76086a6 100644
--- a/utf8.h
+++ b/utf8.h
@@ -83,7 +83,7 @@ void strbuf_utf8_align(struct strbuf *buf, align_type position, unsigned int wid
  * BOM must not be used [1]. The same applies for the UTF-32 equivalents.
  * The function returns true if this rule is violated.
  *
- * [1] http://unicode.org/faq/utf_bom.html#bom10
+ * [1] https://unicode.org/faq/utf_bom.html#bom10
  */
 int has_prohibited_utf_bom(const char *enc, const char *data, size_t len);
 
@@ -99,8 +99,8 @@ int has_prohibited_utf_bom(const char *enc, const char *data, size_t len);
  * Therefore, strictly requiring a BOM seems to be the safest option for
  * content in Git.
  *
- * [1] http://unicode.org/faq/utf_bom.html#gen6
- * [2] http://www.unicode.org/versions/Unicode10.0.0/ch03.pdf
+ * [1] https://unicode.org/faq/utf_bom.html#gen6
+ * [2] https://www.unicode.org/versions/Unicode10.0.0/ch03.pdf
  *     Section 3.10, D98, page 132
  * [3] https://encoding.spec.whatwg.org/#utf-16le
  */
-- 
gitgitgadget


^ permalink raw reply related

* [PATCH v2 4/4] doc: refer to internet archive
From: Josh Soref via GitGitGadget @ 2023-09-24 10:57 UTC (permalink / raw)
  To: git; +Cc: Josh Soref, Josh Soref
In-Reply-To: <pull.1589.v2.git.1695553041.gitgitgadget@gmail.com>

From: Josh Soref <jsoref@gmail.com>

These pages are no longer reachable from their original locations,
which makes things difficult for readers. Instead, switch to linking to
the Internet Archive for the content.

Signed-off-by: Josh Soref <jsoref@gmail.com>
---
 gitweb/gitweb.perl       | 4 ++--
 sha1dc/sha1.c            | 2 +-
 t/lib-gpg.sh             | 2 +-
 t/t9816-git-p4-locked.sh | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index b6659410ef1..f12bed87db9 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -8192,8 +8192,8 @@ sub git_feed {
 	my $format = shift || 'atom';
 	my $have_blame = gitweb_check_feature('blame');
 
-	# Atom: http://www.atomenabled.org/developers/syndication/
-	# RSS:  http://www.notestips.com/80256B3A007F2692/1/NAMO5P9UPQ
+	# Atom: https://web.archive.org/web/20230815171113/https://www.atomenabled.org/developers/syndication/
+	# RSS:  https://web.archive.org/web/20030729001534/http://www.notestips.com/80256B3A007F2692/1/NAMO5P9UPQ
 	if ($format ne 'rss' && $format ne 'atom') {
 		die_error(400, "Unknown web feed format");
 	}
diff --git a/sha1dc/sha1.c b/sha1dc/sha1.c
index dede2cbddf9..f993ef9c690 100644
--- a/sha1dc/sha1.c
+++ b/sha1dc/sha1.c
@@ -88,7 +88,7 @@
 /*
  * Should define Big Endian for a whitelist of known processors. See
  * https://sourceforge.net/p/predef/wiki/Endianness/ and
- * http://www.oracle.com/technetwork/server-storage/solaris/portingtosolaris-138514.html
+ * https://web.archive.org/web/20140421151132/http://www.perforce.com/perforce/doc.current/manuals/p4sag/chapter.superuser.html
  */
 #define SHA1DC_BIGENDIAN
 
diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh
index 83b83c9abb5..add11e88fc0 100644
--- a/t/lib-gpg.sh
+++ b/t/lib-gpg.sh
@@ -13,7 +13,7 @@ test_lazy_prereq GPG '
 	gpg_version=$(gpg --version 2>&1)
 	test $? != 127 || exit 1
 
-	# As said here: http://www.gnupg.org/documentation/faqs.html#q6.19
+	# As said here: https://web.archive.org/web/20130212022238/https://www.gnupg.org/faq/gnupg-faq.html#why-does-gnupg-1.0.6-bail-out-on-keyrings-used-with-1.0.7
 	# the gpg version 1.0.6 did not parse trust packets correctly, so for
 	# that version, creation of signed tags using the generated key fails.
 	case "$gpg_version" in
diff --git a/t/t9816-git-p4-locked.sh b/t/t9816-git-p4-locked.sh
index 932841003cf..5e904ac80d8 100755
--- a/t/t9816-git-p4-locked.sh
+++ b/t/t9816-git-p4-locked.sh
@@ -9,7 +9,7 @@ test_expect_success 'start p4d' '
 '
 
 # See
-# http://www.perforce.com/perforce/doc.current/manuals/p4sag/03_superuser.html#1088563
+# https://web.archive.org/web/20150602090517/http://www.perforce.com/perforce/doc.current/manuals/p4sag/chapter.superuser.html#superuser.basic.typemap_locking
 # for suggestions on how to configure "sitewide pessimistic locking"
 # where only one person can have a file open for edit at a time.
 test_expect_success 'init depot' '
-- 
gitgitgadget

^ permalink raw reply related

* [PATCH v2 0/4] Switch links to https
From: Josh Soref via GitGitGadget @ 2023-09-24 10:57 UTC (permalink / raw)
  To: git; +Cc: Josh Soref
In-Reply-To: <pull.1589.git.1695392027.gitgitgadget@gmail.com>

There are a couple of categories of http links

 * links that are required to be http: because they're copied from something
   that mandates it (the apache license, xml namespaces, xsl docbook
   things?)
 * pages which exist at both http: and https: and can be safely switched
 * pages that have jittered a bit but are now available as https:
 * pages that have jittered a bit and are not available over https:
 * pages that are gone and for which the best source is
   https://web.archive.org
 * urls that were imaginary

In order:

 * doc: switch links to https -- the simplest
 * doc: update links to current pages -- I found the current pages for
   these, it should be easy enough to verify these / reject them
 * doc: update links for andre-simon.de -- I've split this out, I don't like
   the idea of having to download binaries over http. If this were my
   project, I'd be tempted to remove the feature or self-host w/ https...
 * doc: refer to internet archive -- the original urls are dead, I've found
   internet archive date links for them. (There are some in git already, so
   this seemed like a very reasonable choice.)

cc: Eric Sunshine sunshine@sunshineco.com cc: Josh Soref jsoref@gmail.com

 * Commit messages have been adjusted since v1
 * files were dropped based on feedback from Junio

Josh Soref (4):
  doc: switch links to https
  doc: update links to current pages
  doc: update links for andre-simon.de
  doc: refer to internet archive

 Documentation/CodingGuidelines                       |  4 ++--
 Documentation/MyFirstContribution.txt                |  2 +-
 Documentation/RelNotes/1.6.2.txt                     |  2 +-
 Documentation/RelNotes/1.6.3.txt                     |  2 +-
 Documentation/RelNotes/1.6.4.txt                     |  2 +-
 Documentation/RelNotes/1.6.5.txt                     |  2 +-
 Documentation/RelNotes/1.6.6.txt                     |  2 +-
 Documentation/git-cvsimport.txt                      |  4 ++--
 Documentation/git-format-patch.txt                   |  4 ++--
 Documentation/git-imap-send.txt                      |  2 +-
 Documentation/git-send-email.txt                     |  2 +-
 Documentation/git.txt                                |  2 +-
 Documentation/gitcore-tutorial.txt                   |  2 +-
 Documentation/gitprotocol-http.txt                   |  4 ++--
 Documentation/gitweb.conf.txt                        |  4 ++--
 Documentation/gitweb.txt                             |  2 +-
 .../howto/keep-canonical-history-correct.txt         |  2 +-
 Documentation/signoff-option.txt                     |  2 +-
 INSTALL                                              |  2 +-
 Makefile                                             |  4 ++--
 README.md                                            |  2 +-
 git-cvsimport.perl                                   |  2 +-
 git-gui/git-gui.sh                                   |  6 +++---
 git-gui/lib/encoding.tcl                             |  2 +-
 git-gui/po/README                                    |  2 +-
 git-instaweb.sh                                      |  4 ++--
 gitk-git/gitk                                        |  4 ++--
 gitweb/INSTALL                                       |  2 +-
 gitweb/gitweb.perl                                   | 12 ++++++------
 gitweb/static/gitweb.css                             |  2 +-
 gitweb/static/js/lib/common-lib.js                   | 10 +++++-----
 graph.h                                              |  4 ++--
 http.c                                               |  2 +-
 imap-send.c                                          |  4 ++--
 json-writer.h                                        |  4 ++--
 kwset.c                                              |  2 +-
 kwset.h                                              |  2 +-
 list.h                                               |  2 +-
 perl/FromCPAN/Error.pm                               |  2 +-
 perl/Git/SVN.pm                                      |  2 +-
 protocol.h                                           |  2 +-
 sh-i18n--envsubst.c                                  |  4 ++--
 sha1dc/sha1.c                                        |  2 +-
 t/README                                             |  4 ++--
 t/helper/test-regex.c                                |  2 +-
 t/lib-gpg.sh                                         |  2 +-
 t/perf/perf-lib.sh                                   |  2 +-
 t/t9114-git-svn-dcommit-merge.sh                     |  2 +-
 t/t9801-git-p4-branch.sh                             |  2 +-
 t/t9816-git-p4-locked.sh                             |  2 +-
 t/test-lib-functions.sh                              |  2 +-
 t/test-lib-github-workflow-markup.sh                 |  2 +-
 t/test-lib-junit.sh                                  |  2 +-
 t/test-lib.sh                                        |  2 +-
 trace.c                                              |  2 +-
 utf8.c                                               |  2 +-
 utf8.h                                               |  6 +++---
 57 files changed, 83 insertions(+), 83 deletions(-)


base-commit: bda494f4043963b9ec9a1ecd4b19b7d1cd9a0518
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1589%2Fjsoref%2Fhttps-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1589/jsoref/https-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/1589

Range-diff vs v1:

 1:  b80c6089653 ! 1:  71ed1286d7f doc: switch links to https
     @@ Metadata
       ## Commit message ##
          doc: switch links to https
      
     +    It's somewhat traditional to respect sites' self-identification.
     +
          Signed-off-by: Josh Soref <jsoref@gmail.com>
      
       ## Documentation/CodingGuidelines ##
     @@ README.md: string translations (localization l10) should see [po/README.md][]
       Issues which are security relevant should be disclosed privately to
       the Git Security mailing list <git-security@googlegroups.com>.
      
     - ## compat/nedmalloc/malloc.c.h ##
     -@@
     - /*
     -   This is a version (aka dlmalloc) of malloc/free/realloc written by
     -   Doug Lea and released to the public domain, as explained at
     --  http://creativecommons.org/licenses/publicdomain.  Send questions,
     -+  https://creativecommons.org/licenses/publicdomain.  Send questions,
     -   comments, complaints, performance data, etc to dl@cs.oswego.edu
     - 
     - * Version pre-2.8.4 Mon Nov 27 11:22:37 2006    (dl at gee)
     -@@
     -        like memset.
     - 
     -   Compliance: I believe it is compliant with the Single Unix Specification
     --       (See http://www.unix.org). Also SVID/XPG, ANSI C, and probably
     -+       (See https://www.unix.org). Also SVID/XPG, ANSI C, and probably
     -        others as well.
     - 
     - * Overview of algorithms
     -@@
     -   ignored.
     - 
     -   For a longer but out of date high-level description, see
     --     http://gee.cs.oswego.edu/dl/html/malloc.html
     -+     https://gee.cs.oswego.edu/dl/html/malloc.html
     - 
     - * MSPACES
     -   If MSPACES is defined, then in addition to malloc, free, etc.,
     -@@ compat/nedmalloc/malloc.c.h: typedef struct malloc_segment* msegmentptr;
     -     conservatively use 32 bits per map word, even if on 64bit system.
     -     For a good description of some of the bit-based techniques used
     -     here, see Henry S. Warren Jr's book "Hacker's Delight" (and
     --    supplement at http://hackersdelight.org/). Many of these are
     -+    supplement at https://www.hackersdelight.org/). Many of these are
     -     intended to reduce the branchiness of paths through malloc etc, as
     -     well as to reduce the number of memory locations read or written.
     - 
     -@@ compat/nedmalloc/malloc.c.h: static size_t traverse_and_check(mstate m);
     -   that the mstate controlling malloc/free is intact.  This is a
     -   streamlined version of the approach described by William Robertson
     -   et al in "Run-time Detection of Heap-based Overflows" LISA'03
     --  http://www.usenix.org/events/lisa03/tech/robertson.html The footer
     -+  https://www.usenix.org/events/lisa03/tech/robertson.html The footer
     -   of an inuse chunk holds the xor of its mstate and a random seed,
     -   that is checked upon calls to free() and realloc().  This is
     -   (probablistically) unguessable from outside the program, but can be
     -
     - ## compat/obstack.c ##
     -@@
     - 
     -    You should have received a copy of the GNU Lesser General Public
     -    License along with the GNU C Library; if not, see
     --   <http://www.gnu.org/licenses/>.  */
     -+   <https://www.gnu.org/licenses/>.  */
     - 
     - #include "git-compat-util.h"
     - #include <gettext.h>
     -
     - ## compat/obstack.h ##
     -@@
     - 
     -    You should have received a copy of the GNU Lesser General Public
     -    License along with the GNU C Library; if not, see
     --   <http://www.gnu.org/licenses/>.  */
     -+   <https://www.gnu.org/licenses/>.  */
     - 
     - /* Summary:
     - 
     -
     - ## compat/poll/poll.c ##
     -@@
     -    GNU General Public License for more details.
     - 
     -    You should have received a copy of the GNU General Public License along
     --   with this program; if not, see <http://www.gnu.org/licenses/>.  */
     -+   with this program; if not, see <https://www.gnu.org/licenses/>.  */
     - 
     - /* To bump the minimum Windows version to Windows Vista */
     - #include "git-compat-util.h"
     -
     - ## compat/poll/poll.h ##
     -@@
     -    GNU General Public License for more details.
     - 
     -    You should have received a copy of the GNU General Public License along
     --   with this program; if not, see <http://www.gnu.org/licenses/>.  */
     -+   with this program; if not, see <https://www.gnu.org/licenses/>.  */
     - 
     - #ifndef _GL_POLL_H
     - #define _GL_POLL_H
     -
     - ## compat/precompose_utf8.h ##
     -@@ compat/precompose_utf8.h: typedef struct dirent_prec_psx {
     - 	unsigned char d_type;   /* available on all systems git runs on */
     - 
     - 	/*
     --	 * See http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/dirent.h.html
     -+	 * See https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/dirent.h.html
     - 	 * NAME_MAX + 1 should be enough, but some systems have
     - 	 * NAME_MAX=255 and strlen(d_name) may return 508 or 510
     - 	 * Solution: allocate more when needed, see precompose_utf8_readdir()
     -
     - ## compat/regex/regcomp.c ##
     -@@
     - 
     -    You should have received a copy of the GNU Lesser General Public
     -    License along with the GNU C Library; if not, see
     --   <http://www.gnu.org/licenses/>.  */
     -+   <https://www.gnu.org/licenses/>.  */
     - 
     - #if defined __TANDEM
     -  /* This is currently duplicated from git-compat-utils.h */
     -
     - ## compat/regex/regex.c ##
     -@@
     - 
     -    You should have received a copy of the GNU Lesser General Public
     -    License along with the GNU C Library; if not, see
     --   <http://www.gnu.org/licenses/>.  */
     -+   <https://www.gnu.org/licenses/>.  */
     - 
     - #ifdef HAVE_CONFIG_H
     - #include "config.h"
     -
     - ## compat/regex/regex.h ##
     -@@
     - 
     -    You should have received a copy of the GNU Lesser General Public
     -    License along with the GNU C Library; if not, see
     --   <http://www.gnu.org/licenses/>.  */
     -+   <https://www.gnu.org/licenses/>.  */
     - 
     - #ifndef _REGEX_H
     - #define _REGEX_H 1
     -
     - ## compat/regex/regex_internal.c ##
     -@@
     - 
     -    You should have received a copy of the GNU Lesser General Public
     -    License along with the GNU C Library; if not, see
     --   <http://www.gnu.org/licenses/>.  */
     -+   <https://www.gnu.org/licenses/>.  */
     - 
     - static void re_string_construct_common (const char *str, int len,
     - 					re_string_t *pstr,
     -
     - ## compat/regex/regex_internal.h ##
     -@@
     - 
     -    You should have received a copy of the GNU Lesser General Public
     -    License along with the GNU C Library; if not, see
     --   <http://www.gnu.org/licenses/>.  */
     -+   <https://www.gnu.org/licenses/>.  */
     - 
     - #ifndef _REGEX_INTERNAL_H
     - #define _REGEX_INTERNAL_H 1
     -
     - ## compat/regex/regexec.c ##
     -@@
     - 
     -    You should have received a copy of the GNU Lesser General Public
     -    License along with the GNU C Library; if not, see
     --   <http://www.gnu.org/licenses/>.  */
     -+   <https://www.gnu.org/licenses/>.  */
     - 
     - static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags,
     - 				     int n) internal_function;
     -
     - ## compat/vcbuild/README ##
     -@@ compat/vcbuild/README: The Steps of Build Git with VS2008
     - 
     -    You can either use the binary repository:
     - 
     --       WWW: http://repo.or.cz/w/msvcgit.git
     -+       WWW: https://repo.or.cz/w/msvcgit.git
     -        Git: git clone git://repo.or.cz/msvcgit.git
     --       Zip: http://repo.or.cz/w/msvcgit.git?a=snapshot;h=master;sf=zip
     -+       Zip: https://repo.or.cz/w/msvcgit.git?a=snapshot;h=master;sf=zip
     - 
     -    and call the setup_32bit_env.cmd batch script before compiling Git,
     -    (see repo/package README for details), or the source repository:
     - 
     --       WWW: http://repo.or.cz/w/gitbuild.git
     -+       WWW: https://repo.or.cz/w/gitbuild.git
     -        Git: git clone git://repo.or.cz/gitbuild.git
     -        Zip: (None, as it's a project with submodules)
     - 
     -@@ compat/vcbuild/README: The Steps of Build Git with VS2008
     - 2. Ensure you have the msysgit environment in your path, so you have
     -    GNU Make, bash and perl available.
     - 
     --       WWW: http://repo.or.cz/w/msysgit.git
     -+       WWW: https://repo.or.cz/w/msysgit.git
     -        Git: git clone git://repo.or.cz/msysgit.git
     --       Zip: http://repo.or.cz/w/msysgit.git?a=snapshot;h=master;sf=zip
     -+       Zip: https://repo.or.cz/w/msysgit.git?a=snapshot;h=master;sf=zip
     - 
     -    This environment is also needed when you use the resulting
     -    executables, since Git might need to run scripts which are part of
     -
     - ## contrib/completion/git-completion.bash ##
     -@@ contrib/completion/git-completion.bash: __git_dequote ()
     - #   GNU General Public License for more details.
     - #
     - #   You should have received a copy of the GNU General Public License
     --#   along with this program; if not, see <http://www.gnu.org/licenses/>.
     -+#   along with this program; if not, see <https://www.gnu.org/licenses/>.
     - #
     - #   The latest version of this software can be obtained here:
     - #
     -
     - ## contrib/credential/libsecret/git-credential-libsecret.c ##
     -@@
     -  *  GNU General Public License for more details.
     -  *
     -  *  You should have received a copy of the GNU General Public License
     -- *  along with this program; if not, see <http://www.gnu.org/licenses/>.
     -+ *  along with this program; if not, see <https://www.gnu.org/licenses/>.
     -  */
     - 
     - /*
     -
     - ## contrib/fast-import/import-directories.perl ##
     -@@
     - # GNU General Public License for more details.
     - #
     - # You should have received a copy of the GNU General Public License
     --# along with this program; if not, see <http://www.gnu.org/licenses/>.
     -+# along with this program; if not, see <https://www.gnu.org/licenses/>.
     - #
     - # ------------------------------------------------------------------------
     - 
     -
     - ## contrib/hg-to-git/hg-to-git.py ##
     -@@
     -     GNU General Public License for more details.
     - 
     -     You should have received a copy of the GNU General Public License
     --    along with this program; if not, see <http://www.gnu.org/licenses/>.
     -+    along with this program; if not, see <https://www.gnu.org/licenses/>.
     - """
     - 
     - import os, os.path, sys
     -
     - ## contrib/mw-to-git/t/test-gitmw-lib.sh ##
     -@@ contrib/mw-to-git/t/test-gitmw-lib.sh: wiki_install () {
     - 	if ! test -f $MW_FILENAME
     - 	then
     - 		echo "Downloading $MW_VERSION_MAJOR.$MW_VERSION_MINOR sources ..."
     --		wget "http://download.wikimedia.org/mediawiki/$MW_VERSION_MAJOR/$MW_FILENAME" ||
     -+		wget "https://download.wikimedia.org/mediawiki/$MW_VERSION_MAJOR/$MW_FILENAME" ||
     - 			error "Unable to download "\
     --			"http://download.wikimedia.org/mediawiki/$MW_VERSION_MAJOR/"\
     -+			"https://download.wikimedia.org/mediawiki/$MW_VERSION_MAJOR/"\
     - 			"$MW_FILENAME. "\
     - 			"Please fix your connection and launch the script again."
     - 		echo "$MW_FILENAME downloaded in $(pwd)/;" \
     -
     - ## contrib/persistent-https/LICENSE ##
     -@@
     - 
     -                                  Apache License
     -                            Version 2.0, January 2004
     --                        http://www.apache.org/licenses/
     -+                        https://www.apache.org/licenses/
     - 
     -    TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
     - 
     -
     - ## contrib/persistent-https/README ##
     -@@ contrib/persistent-https/README: PREREQUISITES
     - The code is written in Go (http://golang.org/) and the Go compiler is
     - required. Currently, the compiler must be built and installed from tip
     - of source, in order to include a fix in the reverse http proxy:
     --http://code.google.com/p/go/source/detail?r=a615b796570a2cd8591884767a7d67ede74f6648
     -+https://code.google.com/p/go/source/detail?r=a615b796570a2cd8591884767a7d67ede74f6648
     - 
     - 
     - BUILDING
     -
     - ## contrib/thunderbird-patch-inline/appp.sh ##
     -@@
     - # AppendPatch - A script to be used together with ExternalEditor
     - # for Mozilla Thunderbird to properly include patches inline in e-mails.
     - 
     --# ExternalEditor can be downloaded at http://globs.org/articles.php?lng=en&pg=2
     -+# ExternalEditor can be downloaded at https://globs.org/articles.php?lng=en&pg=2
     - 
     - CONFFILE=~/.appprc
     - 
     -
     - ## contrib/update-unicode/update_unicode.sh ##
     -@@
     - #!/bin/sh
     --#See http://www.unicode.org/reports/tr44/
     -+#See https://www.unicode.org/reports/tr44/
     - #
     - #Me Enclosing_Mark  an enclosing combining mark
     - #Mn Nonspacing_Mark a nonspacing combining mark (zero advance width)
     -@@
     - cd "$(dirname "$0")"
     - UNICODEWIDTH_H=$(git rev-parse --show-toplevel)/unicode-width.h
     - 
     --wget -N http://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt \
     --	http://www.unicode.org/Public/UCD/latest/ucd/EastAsianWidth.txt &&
     -+wget -N https://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt \
     -+	https://www.unicode.org/Public/UCD/latest/ucd/EastAsianWidth.txt &&
     - if ! test -d uniset; then
     - 	git clone https://github.com/depp/uniset.git &&
     - 	( cd uniset && git checkout 4b186196dd )
     -
     - ## convert.c ##
     -@@ convert.c: static int encode_to_git(const char *path, const char *src, size_t src_len,
     - 	 * generate a faulty round trip without an iconv error. Iconv errors
     - 	 * are already caught above.
     - 	 *
     --	 * [1] http://unicode.org/faq/utf_bom.html#gen2
     -+	 * [1] https://unicode.org/faq/utf_bom.html#gen2
     - 	 * [2] https://support.microsoft.com/en-us/help/170559/prb-conversion-problem-between-shift-jis-and-unicode
     - 	 */
     - 	if (die_on_error && check_roundtrip(enc)) {
     -
     - ## ewah/bitmap.c ##
     -@@
     -  * GNU General Public License for more details.
     -  *
     -  * You should have received a copy of the GNU General Public License
     -- * along with this program; if not, see <http://www.gnu.org/licenses/>.
     -+ * along with this program; if not, see <https://www.gnu.org/licenses/>.
     -  */
     - #include "git-compat-util.h"
     - #include "ewok.h"
     -
     - ## ewah/ewah_bitmap.c ##
     -@@
     -  * GNU General Public License for more details.
     -  *
     -  * You should have received a copy of the GNU General Public License
     -- * along with this program; if not, see <http://www.gnu.org/licenses/>.
     -+ * along with this program; if not, see <https://www.gnu.org/licenses/>.
     -  */
     - #include "git-compat-util.h"
     - #include "ewok.h"
     -
     - ## ewah/ewah_io.c ##
     -@@
     -  * GNU General Public License for more details.
     -  *
     -  * You should have received a copy of the GNU General Public License
     -- * along with this program; if not, see <http://www.gnu.org/licenses/>.
     -+ * along with this program; if not, see <https://www.gnu.org/licenses/>.
     -  */
     - #include "git-compat-util.h"
     - #include "ewok.h"
     -
     - ## ewah/ewah_rlw.c ##
     -@@
     -  * GNU General Public License for more details.
     -  *
     -  * You should have received a copy of the GNU General Public License
     -- * along with this program; if not, see <http://www.gnu.org/licenses/>.
     -+ * along with this program; if not, see <https://www.gnu.org/licenses/>.
     -  */
     - #include "git-compat-util.h"
     - #include "ewok.h"
     -
     - ## ewah/ewok.h ##
     -@@
     -  * GNU General Public License for more details.
     -  *
     -  * You should have received a copy of the GNU General Public License
     -- * along with this program; if not, see <http://www.gnu.org/licenses/>.
     -+ * along with this program; if not, see <https://www.gnu.org/licenses/>.
     -  */
     - #ifndef __EWOK_BITMAP_H__
     - #define __EWOK_BITMAP_H__
     -@@ ewah/ewok.h: typedef uint64_t eword_t;
     -  * Do not use __builtin_popcountll. The GCC implementation
     -  * is notoriously slow on all platforms.
     -  *
     -- * See: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36041
     -+ * See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36041
     -  */
     - static inline uint32_t ewah_bit_popcount64(uint64_t x)
     - {
     -
     - ## ewah/ewok_rlw.h ##
     -@@
     -  * GNU General Public License for more details.
     -  *
     -  * You should have received a copy of the GNU General Public License
     -- * along with this program; if not, see <http://www.gnu.org/licenses/>.
     -+ * along with this program; if not, see <https://www.gnu.org/licenses/>.
     -  */
     - #ifndef __EWOK_RLW_H__
     - #define __EWOK_RLW_H__
     -
       ## git-cvsimport.perl ##
      @@ git-cvsimport.perl: sub conn {
       			# Use a HTTP Proxy. Only works for HTTP proxies that
     @@ utf8.h: int has_prohibited_utf_bom(const char *enc, const char *data, size_t len
        *     Section 3.10, D98, page 132
        * [3] https://encoding.spec.whatwg.org/#utf-16le
        */
     -
     - ## xdiff/xdiff.h ##
     -@@
     -  *
     -  *  You should have received a copy of the GNU Lesser General Public
     -  *  License along with this library; if not, see
     -- *  <http://www.gnu.org/licenses/>.
     -+ *  <https://www.gnu.org/licenses/>.
     -  *
     -  *  Davide Libenzi <davidel@xmailserver.org>
     -  *
     -
     - ## xdiff/xdiffi.c ##
     -@@
     -  *
     -  *  You should have received a copy of the GNU Lesser General Public
     -  *  License along with this library; if not, see
     -- *  <http://www.gnu.org/licenses/>.
     -+ *  <https://www.gnu.org/licenses/>.
     -  *
     -  *  Davide Libenzi <davidel@xmailserver.org>
     -  *
     -
     - ## xdiff/xdiffi.h ##
     -@@
     -  *
     -  *  You should have received a copy of the GNU Lesser General Public
     -  *  License along with this library; if not, see
     -- *  <http://www.gnu.org/licenses/>.
     -+ *  <https://www.gnu.org/licenses/>.
     -  *
     -  *  Davide Libenzi <davidel@xmailserver.org>
     -  *
     -
     - ## xdiff/xemit.c ##
     -@@
     -  *
     -  *  You should have received a copy of the GNU Lesser General Public
     -  *  License along with this library; if not, see
     -- *  <http://www.gnu.org/licenses/>.
     -+ *  <https://www.gnu.org/licenses/>.
     -  *
     -  *  Davide Libenzi <davidel@xmailserver.org>
     -  *
     -
     - ## xdiff/xemit.h ##
     -@@
     -  *
     -  *  You should have received a copy of the GNU Lesser General Public
     -  *  License along with this library; if not, see
     -- *  <http://www.gnu.org/licenses/>.
     -+ *  <https://www.gnu.org/licenses/>.
     -  *
     -  *  Davide Libenzi <davidel@xmailserver.org>
     -  *
     -
     - ## xdiff/xinclude.h ##
     -@@
     -  *
     -  *  You should have received a copy of the GNU Lesser General Public
     -  *  License along with this library; if not, see
     -- *  <http://www.gnu.org/licenses/>.
     -+ *  <https://www.gnu.org/licenses/>.
     -  *
     -  *  Davide Libenzi <davidel@xmailserver.org>
     -  *
     -
     - ## xdiff/xmacros.h ##
     -@@
     -  *
     -  *  You should have received a copy of the GNU Lesser General Public
     -  *  License along with this library; if not, see
     -- *  <http://www.gnu.org/licenses/>.
     -+ *  <https://www.gnu.org/licenses/>.
     -  *
     -  *  Davide Libenzi <davidel@xmailserver.org>
     -  *
     -
     - ## xdiff/xmerge.c ##
     -@@
     -  *
     -  *  You should have received a copy of the GNU Lesser General Public
     -  *  License along with this library; if not, see
     -- *  <http://www.gnu.org/licenses/>.
     -+ *  <https://www.gnu.org/licenses/>.
     -  *
     -  *  Davide Libenzi <davidel@xmailserver.org>
     -  *
     -
     - ## xdiff/xpatience.c ##
     -@@
     -  *
     -  *  You should have received a copy of the GNU Lesser General Public
     -  *  License along with this library; if not, see
     -- *  <http://www.gnu.org/licenses/>.
     -+ *  <https://www.gnu.org/licenses/>.
     -  *
     -  *  Davide Libenzi <davidel@xmailserver.org>
     -  *
     -
     - ## xdiff/xprepare.c ##
     -@@
     -  *
     -  *  You should have received a copy of the GNU Lesser General Public
     -  *  License along with this library; if not, see
     -- *  <http://www.gnu.org/licenses/>.
     -+ *  <https://www.gnu.org/licenses/>.
     -  *
     -  *  Davide Libenzi <davidel@xmailserver.org>
     -  *
     -
     - ## xdiff/xprepare.h ##
     -@@
     -  *
     -  *  You should have received a copy of the GNU Lesser General Public
     -  *  License along with this library; if not, see
     -- *  <http://www.gnu.org/licenses/>.
     -+ *  <https://www.gnu.org/licenses/>.
     -  *
     -  *  Davide Libenzi <davidel@xmailserver.org>
     -  *
     -
     - ## xdiff/xtypes.h ##
     -@@
     -  *
     -  *  You should have received a copy of the GNU Lesser General Public
     -  *  License along with this library; if not, see
     -- *  <http://www.gnu.org/licenses/>.
     -+ *  <https://www.gnu.org/licenses/>.
     -  *
     -  *  Davide Libenzi <davidel@xmailserver.org>
     -  *
     -
     - ## xdiff/xutils.c ##
     -@@
     -  *
     -  *  You should have received a copy of the GNU Lesser General Public
     -  *  License along with this library; if not, see
     -- *  <http://www.gnu.org/licenses/>.
     -+ *  <https://www.gnu.org/licenses/>.
     -  *
     -  *  Davide Libenzi <davidel@xmailserver.org>
     -  *
     -
     - ## xdiff/xutils.h ##
     -@@
     -  *
     -  *  You should have received a copy of the GNU Lesser General Public
     -  *  License along with this library; if not, see
     -- *  <http://www.gnu.org/licenses/>.
     -+ *  <https://www.gnu.org/licenses/>.
     -  *
     -  *  Davide Libenzi <davidel@xmailserver.org>
     -  *
 2:  f9f3f4af1c8 ! 2:  80eb5da8ed4 doc: update links to current pages
     @@ Metadata
       ## Commit message ##
          doc: update links to current pages
      
     +    It's somewhat traditional to respect sites' self-identification.
     +
          Signed-off-by: Josh Soref <jsoref@gmail.com>
      
       ## Documentation/CodingGuidelines ##
     @@ Documentation/git-format-patch.txt: Approach #3 (external editor)
       
       1. Prepare the patch as a text file using your method of choice.
      
     - ## Documentation/git-ls-remote.txt ##
     -@@ Documentation/git-ls-remote.txt: d4ca2e3147b409459955613c152220f4db848ee1	refs/tags/v2.40.0
     - * List all references matching given patterns:
     - +
     - ----
     --$ git ls-remote http://www.kernel.org/pub/scm/git/git.git master seen rc
     -+$ git ls-remote https://git.kernel.org/pub/scm/git/git.git master seen rc
     - 5fe978a5381f1fbad26a80e682ddd2a401966740	refs/heads/master
     - c781a84b5204fb294c9ccc79f8b3baceeb32c061	refs/heads/seen
     - ----
     -@@ Documentation/git-ls-remote.txt: c781a84b5204fb294c9ccc79f8b3baceeb32c061	refs/heads/seen
     - * List only tags matching a given wildcard pattern:
     - +
     - ----
     --$ git ls-remote --tags http://www.kernel.org/pub/scm/git/git.git v\*
     -+$ git ls-remote --tags https://git.kernel.org/pub/scm/git/git.git v\*
     - 485a869c64a68cc5795dd99689797c5900f4716d	refs/tags/v2.39.2
     - cbf04937d5b9fcf0a76c28f69e6294e9e3ecd7e6	refs/tags/v2.39.2^{}
     - d4ca2e3147b409459955613c152220f4db848ee1	refs/tags/v2.40.0
     -
       ## Documentation/git.txt ##
      @@ Documentation/git.txt: Authors
       -------
     @@ Documentation/git.txt: Authors
       
       If you have a clone of git.git itself, the
      
     - ## Documentation/gitcore-tutorial.txt ##
     -@@ Documentation/gitcore-tutorial.txt: Examples.
     - 
     - the above are equivalent to:
     - 
     --. `git pull http://www.kernel.org/pub/scm/git/git.git/ HEAD`
     --. `git pull http://www.kernel.org/pub/scm/git/git.git/ tag v0.99.1`
     -+. `git pull https://git.kernel.org/pub/scm/git/git.git/ HEAD`
     -+. `git pull https://git.kernel.org/pub/scm/git/git.git/ tag v0.99.1`
     - 
     - 
     - How does the merge work?
     -
     - ## compat/nedmalloc/malloc.c.h ##
     -@@ compat/nedmalloc/malloc.c.h: LONG __cdecl _InterlockedExchange(LONG volatile *Target, LONG Value);
     -   /* --[ start GCC compatibility ]----------------------------------------------
     -    * Compatibility <intrin_x86.h> header for GCC -- GCC equivalents of intrinsic
     -    * Microsoft Visual C++ functions. Originally developed for the ReactOS
     --   * (<http://www.reactos.org/>) and TinyKrnl (<http://www.tinykrnl.org/>)
     -+   * (<https://reactos.org/>) and TinyKrnl (<http://www.tinykrnl.org/>)
     -    * projects.
     -    *
     -    * Copyright (c) 2006 KJK::Hyperion <hackbunny@reactos.com>
     -
     - ## contrib/persistent-https/README ##
     -@@ contrib/persistent-https/README: https://kernel.googlesource.com/pub/scm/git/git
     - 
     - PREREQUISITES
     - 
     --The code is written in Go (http://golang.org/) and the Go compiler is
     -+The code is written in Go (https://go.dev/) and the Go compiler is
     - required. Currently, the compiler must be built and installed from tip
     - of source, in order to include a fix in the reverse http proxy:
     - https://code.google.com/p/go/source/detail?r=a615b796570a2cd8591884767a7d67ede74f6648
     -
       ## git-gui/git-gui.sh ##
      @@ git-gui/git-gui.sh: proc do_quit {{rc {1}}} {
       	set ret_code $rc
 3:  100ea749b5b ! 3:  7cfd7b244ea doc: update links for andre-simon.de
     @@ Metadata
       ## Commit message ##
          doc: update links for andre-simon.de
      
     +    Beyond the fact that it's somewhat traditional to respect sites'
     +    self-identification, it's helpful for links to point to the things
     +    that people expect them to reference. Here that means linking to
     +    specific pages instead of a domain.
     +
          Signed-off-by: Josh Soref <jsoref@gmail.com>
      
       ## Documentation/gitweb.conf.txt ##
 4:  db71330d1ca ! 4:  9f0bba69492 doc: refer to internet archive
     @@ Metadata
       ## Commit message ##
          doc: refer to internet archive
      
     -    Signed-off-by: Josh Soref <jsoref@gmail.com>
     +    These pages are no longer reachable from their original locations,
     +    which makes things difficult for readers. Instead, switch to linking to
     +    the Internet Archive for the content.
      
     - ## compat/nedmalloc/malloc.c.h ##
     -@@ compat/nedmalloc/malloc.c.h: LONG __cdecl _InterlockedExchange(LONG volatile *Target, LONG Value);
     -   /* --[ start GCC compatibility ]----------------------------------------------
     -    * Compatibility <intrin_x86.h> header for GCC -- GCC equivalents of intrinsic
     -    * Microsoft Visual C++ functions. Originally developed for the ReactOS
     --   * (<https://reactos.org/>) and TinyKrnl (<http://www.tinykrnl.org/>)
     -+   * (<https://reactos.org/>) and TinyKrnl (<https://web.archive.org/web/20060409205924/http://www.tinykrnl.org/>)
     -    * projects.
     -    *
     -    * Copyright (c) 2006 KJK::Hyperion <hackbunny@reactos.com>
     +    Signed-off-by: Josh Soref <jsoref@gmail.com>
      
       ## gitweb/gitweb.perl ##
      @@ gitweb/gitweb.perl: sub git_feed {

-- 
gitgitgadget

^ permalink raw reply

* Re: [PATCH] pretty-formats.txt: fix whitespace
From: Josh Soref @ 2023-09-24 10:31 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Josh Soref via GitGitGadget, git
In-Reply-To: <xmqqsf75zxbv.fsf@gitster.g>

Junio C Hamano <gitster@pobox.com> wrote:
> > * two spaces after periods for sentences
>
> Although I admit I tend to hit my spacebar twice after a sentence, I
> think more people tend to just do with a single space and let the
> formatting software (like AsciiDoc) take care of the inter-sentence
> spacing.  To me, this falls into "it would be nicer if we did this
> when we write a new sentence, but it is not worth the patch noise if
> somebody already wrote with a single space to change them" category.

> The title of the patch may have been written after you did the
> above, but now it includes other changes listed below, so it may
> want to be revised.

Indeed.

Would it get revised or just abandoned in favor of something else?

> > * comma (before/)after `i.e.` and `e.g.`
>
> That's modern American English.  I think our documentation is
> mixture so this may also fall into "if it is already written that
> way, it is not worth the patch noise to change" category.
>
> > * comma after `etc.` when not ending a sentence
>
> There is one instance that says "A, B, C, D, etc., are all accepted."
> without the comma after 'etc.' and the patch corrects it.  OK.

It seems like this is the only change that's of interest.

Do I just make a distinct gitgitgadget PR with that change, or do I
ask it to mark that single change as a V2 to this? (given the branch
name assumed whitespace and the only change would be a comma, it'd be
kinda wrong...)

> > * space before `(`
>
> If you mean by the above that we used to say
>
>         ... as described below(see linkgit:git-config[1]))
>
> and you added a SP before "(see", that is a definite improvement.  I
> however didn't find an example of a line that lacks SP before '('
> that got corrected to have a SP there.

I'm pretty sure that's what I meant, but I can't find the change in my
git reflog, and I'm not quite sure how I could have made that mistake.

^ permalink raw reply

* Re: [bug] git clone command leaves orphaned ssh process
From: Max Amelchenko @ 2023-09-24 10:25 UTC (permalink / raw)
  To: Jeff King
  Cc: Aaron Schrab, Taylor Blau, Bagas Sanjaya, git, Hideaki Yoshifuji,
	Junio C Hamano
In-Reply-To: <20230912043345.GA1623696@coredump.intra.peff.net>

Thanks,
Just wanted to clarify something. This will not be handled by AWS (we
had a support ticket re. that case), since they do not interfere with
the running processes on its infrastructure, and if there is a
problematic process causing this overflowing in orphaned processes, it
needs to be handled by that process.
The question is, doesn't Git want to ensure a clean exit in all cases?
This is a clear example of a non-clean exit.

On Tue, Sep 12, 2023 at 7:33 AM Jeff King <peff@peff.net> wrote:
>
> On Mon, Sep 11, 2023 at 08:40:49PM -0400, Aaron Schrab wrote:
>
> > At 13:11 +0300 11 Sep 2023, Max Amelchenko <maxamel2002@gmail.com> wrote:
> > > Maybe it's connected also to the underlying infrastructure? We are
> > > getting this in AWS lambda jobs and we're hitting a system limit of
> > > max processes because of it.
> >
> > Running as a lambda, or in a container, could definitely be why you're
> > seeing a difference. Normally when a process is orphaned it gets adopted by
> > `init` (PID 1), and that will take care of cleaning up after orphaned zombie
> > processes.
> >
> > But most of the time containers just run the configured process directly,
> > without an init process. That leaves nothing to clean orphan processes.
>
> Yeah, that seems like the culprit. If the clone finishes successfully,
> we do end up in finish_connect(), where we wait() for the process. But
> if we exit early (in this case, ssh bails and we get EOF on the pipe
> reading from it), then we may call die() and exit immediately.
>
> We _could_ take special care to add every spawned process to a global
> list, set up handlers via atexit() and signal(), and then reap the
> processes. But traditionally it's not a big deal to exit with un-reaped
> children, and this is the responsibility of init. I'm not sure it makes
> sense for Git to basically reimplement that catch-all (and of course we
> cannot even do it reliably if we are killed by certain signals).
>
> > Although for that to really be a problem, would require hitting that max
> > process limit inside a single container invocation. Of course since
> > containers usually aren't meant to be spawning a lot of processes, that
> > limit might be a lot lower than on a normal system.
> >
> > I know that Docker provides a way to include an init process in the started
> > container (`docker run --init`), but I don't think that AWS Lambda does.
>
> I don't know anything about Lambda, but if you are running arbitrary
> commands, then it seems like you could insert something like this:
>
>   https://github.com/krallin/tini
>
> into the mix. I much prefer that to teaching Git to try to do the same
> thing in-process.
>
> -Peff

^ permalink raw reply

* Re: [PATCH v2 3/3] archive: support remote archive from stateless transport
From: Eric Sunshine @ 2023-09-24  6:52 UTC (permalink / raw)
  To: Jiang Xin
  Cc: Git List, Junio C Hamano, Brandon Williams, Ilari Liusvaara,
	Jiang Xin
In-Reply-To: <20230923152201.14741-4-worldhello.net@gmail.com>

On Sat, Sep 23, 2023 at 11:22 AM Jiang Xin <worldhello.net@gmail.com> wrote:
> Even though we can establish a stateless connection, we still cannot
> archive the remote repository using a stateless HTTP protocol. Try the
> following steps to make it work.
> [...]
> Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
> ---
> diff --git a/http-backend.c b/http-backend.c
> @@ -639,10 +640,19 @@ static void check_content_type(struct strbuf *hdr, const char *accepted_type)
> -       const char *argv[] = {NULL, "--stateless-rpc", ".", NULL};
> +       const char *argv[4];
>
> +       if (!strcmp(service_name, "git-upload-archive")) {
> +               argv[1] = ".";
> +               argv[2] = NULL;
> +       } else {
> +               argv[1] = "--stateless-rpc";
> +               argv[2] = ".";
> +               argv[3] = NULL;
> +       }

It may not be worth a reroll, but since you're touching this code
anyhow, these days we'd use `strvec` for this:

    struct strvec argv = STRVEC_INIT;
    if (strcmp(service_name, "git-upload-archive"))
        strvec_push(&argv, "--stateless-rpc");
    strvec_push(&argv, ".");

^ permalink raw reply

* Re: Issues with git clone over HTTP/2 and closed connections
From: Jeff King @ 2023-09-24  3:50 UTC (permalink / raw)
  To: David Härdeman; +Cc: git
In-Reply-To: <bb757ebd66b5ac4c81d62b01d5cff2f75250090d@hardeman.nu>

On Sat, Sep 23, 2023 at 12:58:09PM +0000, David Härdeman wrote:

> By running "GIT_CURL_VERBOSE=1 git clone https://example.com/myrepo.git", I noticed that:
> 
>   a) HTTP/2 was being used; and
>   b) just before the error the server returned a GOAWAY [1]:
>      "== Info: received GOAWAY, error=0, last_stream=1999"
> 
> On the client side I'm using Debian Unstable (libcurl 8.3.0, git
> 2.40.1), and the server is running Debian Stable (nginx 1.22.1-9).
> 
> nginx will, by default, close HTTP/2 connections after
> "http2_max_requests", (default: 1000, i.e. 1999 streams, note that the
> error message above says last_stream=1999) and it seems that it is
> using GOAWAY to do so, which seems to confuse git/libcurl.
> 
> And sure enough, after running "git config --global http.version
> HTTP/1.1" on the client and trying again, the "git clone" was
> successful (I'm guessing I could/should also bump http2_max_requests
> on the server).

Thanks for a detailed report. Your analysis all makes sense to me.

> From what I understand, git should close the connection, try to open a
> new one and resume the clone operation before erroring out (because
> the GOAWAY message could mean anything).
> 
> Is this a known bug and is it something that would need to be fixed in
> libcurl or in git?

I don't think we've heard of such a problem before with Git. I don't
know enough about GOAWAY to comment on the correct behavior, but this is
almost certainly a curl issue, not a Git one. All of the connection
handling, reuse, etc, is happening invisibly at the curl layer.

It's probably worth poking around libcurl's issue tracker. This seems
like it might be related:

  https://github.com/curl/curl/issues/11859

And one final comment: 2000 is a lot of requests for one clone. That
plus the error you are seeing from Git makes me think you're using the
"dumb" http protocol (i.e., your webserver is not set up to run the
server side of Git's smart protocol, so it is just serving files
blindly).

I don't know if using it is intentional or not. But the smart protocol
is much more efficient, and in general I would expect it to have fewer
corner cases (none of the major forges allow dumb-http at all).

You can find more details on setting it up in "git help http-backend".

If you do want to keep using the dumb protocol, consider running "git
gc" on the server side repository. 2000 requests implies you have many
loose objects, which could be served much more efficiently as a single
pack.

-Peff

^ permalink raw reply

* Re: [REGRESSION] uninitialized value $address in git send-email when given multiple recipients separated by commas
From: Jeff King @ 2023-09-24  3:36 UTC (permalink / raw)
  To: Bagas Sanjaya
  Cc: Michael Strawbridge, Junio C Hamano, Luben Tuikov,
	Ævar Arnfjörð Bjarmason, Taylor Blau,
	Git Mailing List
In-Reply-To: <ZQ1eGzqfyoeeTBUq@debian.me>

On Fri, Sep 22, 2023 at 04:27:55PM +0700, Bagas Sanjaya wrote:

> To reproduce this regression:

I couldn't reproduce the problem here.

I had to modify your instructions slightly:

> 1. Clone git.git repo, then branch off:
> 
>    ```
>    $ git clone https://github.com/git/git.git && cd git
>    $ git checkout -b test
>    ```
> 
> 2. Make two dummy signed-off commits:
> 
>    ```
>    $ echo test > test && git add test && git commit -s -m "test"
>    $ echo "test test" >> test && git commit -a -s -m "test test"
>    ```

This all worked.

> 3. Generate patch series:
> 
>    ```
>    $ mkdir /tmp/test
>    $ git format-patch -o /tmp/test --cover-letter main
>    ```

This should be s/main/master/, since the git.git repo from step 1 does
not have a "main" branch.

> 4. Send the series to dummy address:
> 
>    ```
>    $ git send-email --to="foo <foo@acme.com>,bar <bar@acme.com>" /tmp/test/*.patch
>    ```

This did not produce an error for me. I switched out acme.com for some
addresses I control, and confirmed that the mail was all delivered fine.

Your report also mentions a validation hook, so I tried installing one
like:

	cat >.git/hooks/sendemail-validate <<-\EOF
	#!/bin/sh
	echo >&2 running validate hook
	exit 0
	EOF
	chmod +x .git/hooks/sendemail-validate

and confirmed that the hook runs (three times, as expected). But still
no error. I'm using v2.41.0 to test against.

-Peff

^ permalink raw reply

* Re: [PATCH v6] merge-tree: add -X strategy option
From: 唐宇奕 @ 2023-09-24  2:26 UTC (permalink / raw)
  To: Izzy via GitGitGadget; +Cc: git, Elijah Newren, Jeff King, Phillip Wood
In-Reply-To: <pull.1565.v6.git.1695522222723.gitgitgadget@gmail.com>

Thanks for your advice! I've uploaded a new patch to support more
strategy options and the parse option issue.

^ permalink raw reply

* [PATCH v6] merge-tree: add -X strategy option
From: Izzy via GitGitGadget @ 2023-09-24  2:23 UTC (permalink / raw)
  To: git; +Cc: Elijah Newren, Jeff King, Phillip Wood, Izzy, Tang Yuyi
In-Reply-To: <pull.1565.v5.git.1694853437494.gitgitgadget@gmail.com>

From: Tang Yuyi <winglovet@gmail.com>

Add merge strategy option to produce more customizable merge result such
as automatically resolving conflicts.

Signed-off-by: Tang Yuyi <winglovet@gmail.com>
---
    merge-tree: add -X strategy option
    
    Change-Id: I16be592262d13cebcff8726eb043f7ecdb313b76

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1565%2FWingT%2Fmerge_tree_allow_strategy_option-v6
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1565/WingT/merge_tree_allow_strategy_option-v6
Pull-Request: https://github.com/gitgitgadget/git/pull/1565

Range-diff vs v5:

 1:  28d4282e0d8 ! 1:  6a3dd8aeb13 merge-tree: add -X strategy option
     @@ builtin/merge-tree.c: struct merge_tree_options {
       
       static int real_merge(struct merge_tree_options *o,
      @@ builtin/merge-tree.c: static int real_merge(struct merge_tree_options *o,
     + {
     + 	struct commit *parent1, *parent2;
     + 	struct commit_list *merge_bases = NULL;
     +-	struct merge_options opt;
     ++	struct merge_options opt = o->merge_options;
     + 	struct merge_result result = { 0 };
     + 	int show_messages = o->show_messages;
       
     - 	init_merge_options(&opt, the_repository);
     +@@ builtin/merge-tree.c: static int real_merge(struct merge_tree_options *o,
     + 		help_unknown_ref(branch2, "merge-tree",
     + 				 _("not something we can merge"));
       
     -+	opt.recursive_variant = o->merge_options.recursive_variant;
     -+
     +-	init_merge_options(&opt, the_repository);
     +-
       	opt.show_rename_progress = 0;
       
       	opt.branch1 = branch1;
     @@ builtin/merge-tree.c: int cmd_merge_tree(int argc, const char **argv, const char
       		OPT_END()
       	};
       
     -@@ builtin/merge-tree.c: int cmd_merge_tree(int argc, const char **argv, const char *prefix)
     ++	/* Init merge options */
     ++	init_merge_options(&o.merge_options, the_repository);
     ++
     + 	/* Parse arguments */
     + 	original_argc = argc - 1; /* ignoring argv[0] */
       	argc = parse_options(argc, argv, prefix, mt_options,
       			     merge_tree_usage, PARSE_OPT_STOP_AT_NON_OPTION);
       
     ++	if (xopts.nr && o.mode == MODE_TRIVIAL)
     ++		die(_("--trivial-merge is incompatible with all other options"));
      +	for (int x = 0; x < xopts.nr; x++)
      +		if (parse_merge_opt(&o.merge_options, xopts.v[x]))
      +			die(_("unknown strategy option: -X%s"), xopts.v[x]);


 builtin/merge-tree.c             | 18 +++++++++++++++---
 t/t4301-merge-tree-write-tree.sh | 23 +++++++++++++++++++++++
 2 files changed, 38 insertions(+), 3 deletions(-)

diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c
index 0de42aecf4b..7024b5ce2e4 100644
--- a/builtin/merge-tree.c
+++ b/builtin/merge-tree.c
@@ -18,6 +18,7 @@
 #include "quote.h"
 #include "tree.h"
 #include "config.h"
+#include "strvec.h"
 
 static int line_termination = '\n';
 
@@ -414,6 +415,7 @@ struct merge_tree_options {
 	int show_messages;
 	int name_only;
 	int use_stdin;
+	struct merge_options merge_options;
 };
 
 static int real_merge(struct merge_tree_options *o,
@@ -423,7 +425,7 @@ static int real_merge(struct merge_tree_options *o,
 {
 	struct commit *parent1, *parent2;
 	struct commit_list *merge_bases = NULL;
-	struct merge_options opt;
+	struct merge_options opt = o->merge_options;
 	struct merge_result result = { 0 };
 	int show_messages = o->show_messages;
 
@@ -437,8 +439,6 @@ static int real_merge(struct merge_tree_options *o,
 		help_unknown_ref(branch2, "merge-tree",
 				 _("not something we can merge"));
 
-	init_merge_options(&opt, the_repository);
-
 	opt.show_rename_progress = 0;
 
 	opt.branch1 = branch1;
@@ -513,6 +513,7 @@ static int real_merge(struct merge_tree_options *o,
 int cmd_merge_tree(int argc, const char **argv, const char *prefix)
 {
 	struct merge_tree_options o = { .show_messages = -1 };
+	struct strvec xopts = STRVEC_INIT;
 	int expected_remaining_argc;
 	int original_argc;
 	const char *merge_base = NULL;
@@ -548,14 +549,25 @@ int cmd_merge_tree(int argc, const char **argv, const char *prefix)
 			   &merge_base,
 			   N_("commit"),
 			   N_("specify a merge-base for the merge")),
+		OPT_STRVEC('X', "strategy-option", &xopts, N_("option=value"),
+			N_("option for selected merge strategy")),
 		OPT_END()
 	};
 
+	/* Init merge options */
+	init_merge_options(&o.merge_options, the_repository);
+
 	/* Parse arguments */
 	original_argc = argc - 1; /* ignoring argv[0] */
 	argc = parse_options(argc, argv, prefix, mt_options,
 			     merge_tree_usage, PARSE_OPT_STOP_AT_NON_OPTION);
 
+	if (xopts.nr && o.mode == MODE_TRIVIAL)
+		die(_("--trivial-merge is incompatible with all other options"));
+	for (int x = 0; x < xopts.nr; x++)
+		if (parse_merge_opt(&o.merge_options, xopts.v[x]))
+			die(_("unknown strategy option: -X%s"), xopts.v[x]);
+
 	/* Handle --stdin */
 	if (o.use_stdin) {
 		struct strbuf buf = STRBUF_INIT;
diff --git a/t/t4301-merge-tree-write-tree.sh b/t/t4301-merge-tree-write-tree.sh
index 250f721795b..b2c8a43fce3 100755
--- a/t/t4301-merge-tree-write-tree.sh
+++ b/t/t4301-merge-tree-write-tree.sh
@@ -22,6 +22,7 @@ test_expect_success setup '
 	git branch side1 &&
 	git branch side2 &&
 	git branch side3 &&
+	git branch side4 &&
 
 	git checkout side1 &&
 	test_write_lines 1 2 3 4 5 6 >numbers &&
@@ -46,6 +47,13 @@ test_expect_success setup '
 	test_tick &&
 	git commit -m rename-numbers &&
 
+	git checkout side4 &&
+	test_write_lines 0 1 2 3 4 5 >numbers &&
+	echo yo >greeting &&
+	git add numbers greeting &&
+	test_tick &&
+	git commit -m other-content-modifications &&
+
 	git switch --orphan unrelated &&
 	>something-else &&
 	git add something-else &&
@@ -97,6 +105,21 @@ test_expect_success 'Content merge and a few conflicts' '
 	test_cmp expect actual
 '
 
+test_expect_success 'Auto resolve conflicts by "ours" strategy option' '
+	git checkout side1^0 &&
+
+	# make sure merge conflict exists
+	test_must_fail git merge side4 &&
+	git merge --abort &&
+
+	git merge -X ours side4 &&
+	git rev-parse HEAD^{tree} >expected &&
+
+	git merge-tree -X ours side1 side4 >actual &&
+
+	test_cmp expected actual
+'
+
 test_expect_success 'Barf on misspelled option, with exit code other than 0 or 1' '
 	# Mis-spell with single "s" instead of double "s"
 	test_expect_code 129 git merge-tree --write-tree --mesages FOOBAR side1 side2 2>expect &&

base-commit: ac83bc5054c2ac489166072334b4147ce6d0fccb
-- 
gitgitgadget

^ permalink raw reply related

* Re: [PATCH v3] format-patch: add --description-file option
From: Kristoffer Haugsbakk @ 2023-09-23 22:14 UTC (permalink / raw)
  To: Oswald Buddenhagen
  Cc: Jeff King, Taylor Blau, Derrick Stolee, Junio C Hamano, git
In-Reply-To: <20230821170720.577820-1-oswald.buddenhagen@gmx.de>

On Mon, Aug 21, 2023, at 19:07, Oswald Buddenhagen wrote:
> This patch makes it possible to directly feed a branch description to
> derive the cover letter from. The use case is formatting dynamically
> created temporary commits which are not referenced anywhere.

Thanks for implementing this. I've just written cover letter text in
separate files and copied them into the generated files every time. (I
don't use branch descriptions.) I've wanted some convenient way to feed
these messages in, and if I end up writing a cover letter again I'll most
probably be using this new option.

Cheers

-- 
Kristoffer Haugsbakk

^ permalink raw reply

* [PATCH v2 3/3] archive: support remote archive from stateless transport
From: Jiang Xin @ 2023-09-23 15:22 UTC (permalink / raw)
  To: Git List, Junio C Hamano, Brandon Williams, Ilari Liusvaara; +Cc: Jiang Xin
In-Reply-To: <xmqqy1h2f5dv.fsf@gitster.g>

From: Jiang Xin <zhiyou.jx@alibaba-inc.com>

Even though we can establish a stateless connection, we still cannot
archive the remote repository using a stateless HTTP protocol. Try the
following steps to make it work.

 1. Add support for "git-upload-archive" service in "http-backend".

 2. Use the URL ".../info/refs?service=git-upload-pack" to detect the
    protocol version, instead of use the "git-upload-archive" service.

 3. "git-archive" does not expect to see protocol version and
    capabilities when connecting to remote-helper, so do not send them
    in "remote-curl.c" for the "git-upload-archive" service.

Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
---
 http-backend.c         | 15 +++++++++++++--
 remote-curl.c          | 14 +++++++++++---
 t/t5003-archive-zip.sh | 30 ++++++++++++++++++++++++++++++
 transport-helper.c     |  3 ++-
 4 files changed, 56 insertions(+), 6 deletions(-)

diff --git a/http-backend.c b/http-backend.c
index ff07b87e64..ed3bed965a 100644
--- a/http-backend.c
+++ b/http-backend.c
@@ -38,6 +38,7 @@ struct rpc_service {
 static struct rpc_service rpc_service[] = {
 	{ "upload-pack", "uploadpack", 1, 1 },
 	{ "receive-pack", "receivepack", 0, -1 },
+	{ "upload-archive", "uploadarchive", 0, -1 },
 };
 
 static struct string_list *get_parameters(void)
@@ -639,10 +640,19 @@ static void check_content_type(struct strbuf *hdr, const char *accepted_type)
 
 static void service_rpc(struct strbuf *hdr, char *service_name)
 {
-	const char *argv[] = {NULL, "--stateless-rpc", ".", NULL};
+	const char *argv[4];
 	struct rpc_service *svc = select_service(hdr, service_name);
 	struct strbuf buf = STRBUF_INIT;
 
+	if (!strcmp(service_name, "git-upload-archive")) {
+		argv[1] = ".";
+		argv[2] = NULL;
+	} else {
+		argv[1] = "--stateless-rpc";
+		argv[2] = ".";
+		argv[3] = NULL;
+	}
+
 	strbuf_reset(&buf);
 	strbuf_addf(&buf, "application/x-git-%s-request", svc->name);
 	check_content_type(hdr, buf.buf);
@@ -723,7 +733,8 @@ static struct service_cmd {
 	{"GET", "/objects/pack/pack-[0-9a-f]{64}\\.idx$", get_idx_file},
 
 	{"POST", "/git-upload-pack$", service_rpc},
-	{"POST", "/git-receive-pack$", service_rpc}
+	{"POST", "/git-receive-pack$", service_rpc},
+	{"POST", "/git-upload-archive$", service_rpc}
 };
 
 static int bad_request(struct strbuf *hdr, const struct service_cmd *c)
diff --git a/remote-curl.c b/remote-curl.c
index ef05752ca5..ce6cb8ac05 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -1447,8 +1447,14 @@ static int stateless_connect(const char *service_name)
 	 * establish a stateless connection, otherwise we need to tell the
 	 * client to fallback to using other transport helper functions to
 	 * complete their request.
+	 *
+	 * The "git-upload-archive" service is a read-only operation. Fallback
+	 * to use "git-upload-pack" service to discover protocol version.
 	 */
-	discover = discover_refs(service_name, 0);
+	if (!strcmp(service_name, "git-upload-archive"))
+		discover = discover_refs("git-upload-pack", 0);
+	else
+		discover = discover_refs(service_name, 0);
 	if (discover->version != protocol_v2) {
 		printf("fallback\n");
 		fflush(stdout);
@@ -1486,9 +1492,11 @@ static int stateless_connect(const char *service_name)
 
 	/*
 	 * Dump the capability listing that we got from the server earlier
-	 * during the info/refs request.
+	 * during the info/refs request. This does not work with the
+	 * "git-upload-archive" service.
 	 */
-	write_or_die(rpc.in, discover->buf, discover->len);
+	if (strcmp(service_name, "git-upload-archive"))
+		write_or_die(rpc.in, discover->buf, discover->len);
 
 	/* Until we see EOF keep sending POSTs */
 	while (1) {
diff --git a/t/t5003-archive-zip.sh b/t/t5003-archive-zip.sh
index fc499cdff0..80123c1e06 100755
--- a/t/t5003-archive-zip.sh
+++ b/t/t5003-archive-zip.sh
@@ -239,4 +239,34 @@ check_zip with_untracked2
 check_added with_untracked2 untracked one/untracked
 check_added with_untracked2 untracked two/untracked
 
+. "$TEST_DIRECTORY"/lib-httpd.sh
+start_httpd
+
+test_expect_success "setup for HTTP protocol" '
+	cp -R bare.git "$HTTPD_DOCUMENT_ROOT_PATH/bare.git" &&
+	git -C "$HTTPD_DOCUMENT_ROOT_PATH/bare.git" \
+		config http.uploadpack true &&
+	set_askpass user@host pass@host
+'
+
+setup_askpass_helper
+
+test_expect_success 'remote archive does not work with protocol v1' '
+	test_when_finished "rm -f d5.zip" &&
+	test_must_fail git -c protocol.version=1 archive \
+		--remote="$HTTPD_URL/auth/smart/bare.git" \
+		--output=d5.zip HEAD >actual 2>&1 &&
+	cat >expect <<-EOF &&
+	fatal: can${SQ}t connect to subservice git-upload-archive
+	EOF
+	test_cmp expect actual
+'
+
+test_expect_success 'archive remote http repository' '
+	test_when_finished "rm -f d5.zip" &&
+	git archive --remote="$HTTPD_URL/auth/smart/bare.git" \
+		--output=d5.zip HEAD &&
+	test_cmp_bin d.zip d5.zip
+'
+
 test_done
diff --git a/transport-helper.c b/transport-helper.c
index 3c8802b7a3..91381be622 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -628,7 +628,8 @@ static int process_connect_service(struct transport *transport,
 		ret = run_connect(transport, &cmdbuf);
 	} else if (data->stateless_connect &&
 		   (get_protocol_version_config() == protocol_v2) &&
-		   !strcmp("git-upload-pack", name)) {
+		   (!strcmp("git-upload-pack", name) ||
+		    !strcmp("git-upload-archive", name))) {
 		strbuf_addf(&cmdbuf, "stateless-connect %s\n", name);
 		ret = run_connect(transport, &cmdbuf);
 		if (ret)
-- 
2.40.1.50.gf560bcc116.dirty


^ permalink raw reply related

* [PATCH v2 2/3] transport-helper: run do_take_over in connect_helper
From: Jiang Xin @ 2023-09-23 15:22 UTC (permalink / raw)
  To: Git List, Junio C Hamano, Brandon Williams, Ilari Liusvaara; +Cc: Jiang Xin
In-Reply-To: <xmqqy1h2f5dv.fsf@gitster.g>

From: Jiang Xin <zhiyou.jx@alibaba-inc.com>

After successfully connecting to the smart transport by calling
"process_connect_service()" in "connect_helper()", run "do_take_over()"
to replace the old vtable with a new one which has methods ready for
the smart transport connection.

The subsequent commit introduces remote archive for a stateless-rpc
connection. But without running "do_take_over()", it may fail to call
"transport_disconnect()" in "run_remote_archiver()" of
"builtin/archive.c". This is because for a stateless connection or a
service like "git-upload-pack-archive", the remote helper may receive a
SIGPIPE signal and exit early. To have a graceful disconnect method by
calling "do_take_over()" will solve this issue.

Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
---
 transport-helper.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/transport-helper.c b/transport-helper.c
index 2e127d24a5..3c8802b7a3 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -668,6 +668,8 @@ static int connect_helper(struct transport *transport, const char *name,
 
 	fd[0] = data->helper->out;
 	fd[1] = data->helper->in;
+
+	do_take_over(transport);
 	return 0;
 }
 
-- 
2.40.1.50.gf560bcc116.dirty


^ permalink raw reply related

* [PATCH v2 1/3] transport-helper: no connection restriction in connect_helper
From: Jiang Xin @ 2023-09-23 15:21 UTC (permalink / raw)
  To: Git List, Junio C Hamano, Brandon Williams, Ilari Liusvaara; +Cc: Jiang Xin
In-Reply-To: <xmqqy1h2f5dv.fsf@gitster.g>

From: Jiang Xin <zhiyou.jx@alibaba-inc.com>

When commit b236752a (Support remote archive from all smart transports,
2009-12-09) added "remote archive" support for "smart transports", it
was for transport that supports the ".connect" method. The
"connect_helper()" function protected itself from getting called for a
transport without the method before calling process_connect_service(),
which did not work with such a transport.

Later, commit edc9caf7 (transport-helper: introduce stateless-connect,
2018-03-15) added a way for a transport without the ".connect" method
to establish a "stateless" connection in protocol-v2, which
process_connect_service() was taught to handle the "stateless"
connection, making the old safety valve in its caller that insisted
that ".connect" method must be defined too strict, and forgot to loosen
it.

Remove the restriction in the "connect_helper()" function and give the
function "process_connect_service()" the opportunity to establish a
connection using ".connect" or ".stateless_connect" for protocol v2. So
we can connect with a stateless-rpc and do something useful. E.g., in a
later commit, implements remote archive for a repository over HTTP
protocol.

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
---
 transport-helper.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/transport-helper.c b/transport-helper.c
index 49811ef176..2e127d24a5 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -662,8 +662,6 @@ static int connect_helper(struct transport *transport, const char *name,
 
 	/* Get_helper so connect is inited. */
 	get_helper(transport);
-	if (!data->connect)
-		die(_("operation not supported by protocol"));
 
 	if (!process_connect_service(transport, name, exec))
 		die(_("can't connect to subservice %s"), name);
-- 
2.40.1.50.gf560bcc116.dirty


^ permalink raw reply related

* [PATCH v2 0/3] support remote archive from stateless transport
From: Jiang Xin @ 2023-09-23 15:21 UTC (permalink / raw)
  To: Git List, Junio C Hamano; +Cc: Jiang Xin
In-Reply-To: <xmqqy1h2f5dv.fsf@gitster.g>

From: Jiang Xin <zhiyou.jx@alibaba-inc.com>

Enable stateless-rpc connection in "connect_helper()", and add support
for remote archive from a stateless transport.

range-diff v1...v2:

1:  4457ca910b ! 1:  6fabd4dcab transport-helper: no connection restriction in connect_helper
    @@ Metadata
      ## Commit message ##
         transport-helper: no connection restriction in connect_helper
     
    -    For protocol-v2, "stateless-connection" can be used to establish a
    -    stateless connection between the client and the server, but trying to
    -    establish http connection by calling "transport->vtable->connect" will
    -    fail. This restriction was first introduced in commit b236752a87
    -    (Support remote archive from all smart transports, 2009-12-09) by
    -    adding a limitation in the "connect_helper()" function.
    +    When commit b236752a (Support remote archive from all smart transports,
    +    2009-12-09) added "remote archive" support for "smart transports", it
    +    was for transport that supports the ".connect" method. The
    +    "connect_helper()" function protected itself from getting called for a
    +    transport without the method before calling process_connect_service(),
    +    which did not work with such a transport.
     
    -    Remove the restriction in the "connect_helper()" function and use the
    -    logic in the "process_connect_service()" function to check the protocol
    -    version and service name. By this way, we can make a connection and do
    -    something useful. E.g., in a later commit, implements remote archive
    -    for a repository over HTTP protocol.
    +    Later, commit edc9caf7 (transport-helper: introduce stateless-connect,
    +    2018-03-15) added a way for a transport without the ".connect" method
    +    to establish a "stateless" connection in protocol-v2, which
    +    process_connect_service() was taught to handle the "stateless"
    +    connection, making the old safety valve in its caller that insisted
    +    that ".connect" method must be defined too strict, and forgot to loosen
    +    it.
     
    +    Remove the restriction in the "connect_helper()" function and give the
    +    function "process_connect_service()" the opportunity to establish a
    +    connection using ".connect" or ".stateless_connect" for protocol v2. So
    +    we can connect with a stateless-rpc and do something useful. E.g., in a
    +    later commit, implements remote archive for a repository over HTTP
    +    protocol.
    +
    +    Helped-by: Junio C Hamano <gitster@pobox.com>
         Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
     
      ## transport-helper.c ##
-:  ---------- > 2:  1d687abc7e transport-helper: run do_take_over in connect_helper
2:  d4242d1f27 ! 3:  051d66f48e archive: support remote archive from stateless transport
    @@ Commit message
     
          1. Add support for "git-upload-archive" service in "http-backend".
     
    -     2. Unable to access the URL ".../info/refs?service=git-upload-archive"
    -        to detect the protocol version, use the "git-upload-pack" service
    -        instead.
    +     2. Use the URL ".../info/refs?service=git-upload-pack" to detect the
    +        protocol version, instead of use the "git-upload-archive" service.
     
    -     3. "git-archive" does not resolve the protocol version and capabilities
    -        when connecting to remote-helper, so the remote-helper should not
    -        send them.
    -
    -     4. "git-archive" may not be able to disconnect the stateless
    -        connection. Run "do_take_over()" to take_over the transfer for
    -        a graceful disconnect function.
    +     3. "git-archive" does not expect to see protocol version and
    +        capabilities when connecting to remote-helper, so do not send them
    +        in "remote-curl.c" for the "git-upload-archive" service.
     
         Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
     
    @@ transport-helper.c: static int process_connect_service(struct transport *transpo
      		strbuf_addf(&cmdbuf, "stateless-connect %s\n", name);
      		ret = run_connect(transport, &cmdbuf);
      		if (ret)
    -@@ transport-helper.c: static int connect_helper(struct transport *transport, const char *name,
    - 
    - 	fd[0] = data->helper->out;
    - 	fd[1] = data->helper->in;
    -+
    -+	do_take_over(transport);
    - 	return 0;
    - }
    - 

Jiang Xin (3):
  transport-helper: no connection restriction in connect_helper
  transport-helper: run do_take_over in connect_helper
  archive: support remote archive from stateless transport

 http-backend.c         | 15 +++++++++++++--
 remote-curl.c          | 14 +++++++++++---
 t/t5003-archive-zip.sh | 30 ++++++++++++++++++++++++++++++
 transport-helper.c     |  7 ++++---
 4 files changed, 58 insertions(+), 8 deletions(-)

-- 
2.40.1.50.gf560bcc116.dirty


^ permalink raw reply

* Issues with git clone over HTTP/2 and closed connections
From: David Härdeman @ 2023-09-23 12:58 UTC (permalink / raw)
  To: git

Hi,

I just tried to clone a repo from a server over HTTPS, which failed with a message like this:

  error:  (curl_result = 55, http_code = 0, sha1 = <XYZ>
  error: Unable to find <XYZ> under https://example.com/myrepo.git
  Fetching objects: 20790, done.
  Cannot obtain needed tree <XYZ>
  while processing commit <ABC>
  error: fetch failed.

Every time I retried cloning, <XYZ> and <ABC> changed, but the error message was the same.

By running "GIT_CURL_VERBOSE=1 git clone https://example.com/myrepo.git", I noticed that:

  a) HTTP/2 was being used; and
  b) just before the error the server returned a GOAWAY [1]:
     "== Info: received GOAWAY, error=0, last_stream=1999"

On the client side I'm using Debian Unstable (libcurl 8.3.0, git 2.40.1), and the server is running Debian Stable (nginx 1.22.1-9).

nginx will, by default, close HTTP/2 connections after "http2_max_requests", (default: 1000, i.e. 1999 streams, note that the error message above says last_stream=1999) and it seems that it is using GOAWAY to do so, which seems to confuse git/libcurl.

And sure enough, after running "git config --global http.version HTTP/1.1" on the client and trying again, the "git clone" was successful (I'm guessing I could/should also bump http2_max_requests on the server).

From what I understand, git should close the connection, try to open a new one and resume the clone operation before erroring out (because the GOAWAY message could mean anything).

Is this a known bug and is it something that would need to be fixed in libcurl or in git?

Cheers,
David

PS. Not subscribed, please CC: me on any replies.

[1] https://www.rfc-editor.org/rfc/rfc7540#section-6.8
[2] http://nginx.org/en/docs/http/ngx_http_v2_module.html#http2_max_requests

^ permalink raw reply

* Re: [BUG] `git describe` doesn't traverse the graph in topological order
From: 'Ben Boeckel' @ 2023-09-23 12:32 UTC (permalink / raw)
  To: rsbecker; +Cc: git
In-Reply-To: <02e701d9ed78$436b3c60$ca41b520$@nexbridge.com>

On Fri, Sep 22, 2023 at 13:14:30 -0400, rsbecker@nexbridge.com wrote:
> There appears to be a merge at 446120fd88 which brings v9.3.0.rc0
> closer to HEAD than v9.3.0.rc1.

I'll also note that `.rc0` was added as a fix for the situation of
`.rc1` not being found properly. Without that, it finds `v9.2.6` as the
"closest" tag.

--Ben

^ permalink raw reply

* Re: [PATCH v2] test-lib: fix GIT_TEST_SANITIZE_LEAK_LOG
From: Rubén Justo @ 2023-09-23  8:11 UTC (permalink / raw)
  To: Jeff King
  Cc: Git List, Ævar Arnfjörð Bjarmason, Eric Sunshine,
	Junio C Hamano
In-Reply-To: <20230923062415.GA1469941@coredump.intra.peff.net>

On 23-sep-2023 02:24:15, Jeff King wrote:
> On Fri, Sep 22, 2023 at 10:38:06PM +0200, Rubén Justo wrote:
> 
> > [...]
> > Let's add the missing conditions in the if-elses chain to make it work
> > as expected.
> 
> Thanks, I think this explains the situation better than the original.
> 
> > +	elif test "$test_failure" = 0
> > +	then
> >  		say "With GIT_TEST_SANITIZE_LEAK_LOG=true our logs revealed a memory leak, exit non-zero!" &&
> >  		invert_exit_code=t
> > +	else
> > +		say "With GIT_TEST_SANITIZE_LEAK_LOG=true our logs revealed a memory leak..."
> >  	fi
> 
> OK, so you did add in the "else" here. :)

Yes, easier to explain XD

I had last minute doubts about the missing "invert_exit_code=", but
decided not to include it.  This way, "--invert-exit-code" works as
expected with "failing" tests.

Maybe we can make "--invert-exit-code" work in the other cases as well.

But let's let the dust settle, before scratching that itch :)

> I am obviously fine with that,
> and the patch overall looks good to me.

Thank you for keeping an eye on this.

> 
> -Peff

^ permalink raw reply

* Re: [PATCH v2] .github/workflows: add coverity action
From: Jeff King @ 2023-09-23  7:09 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Taylor Blau, git, Junio C Hamano
In-Reply-To: <20230923062137.GB1469962@coredump.intra.peff.net>

On Sat, Sep 23, 2023 at 02:21:37AM -0400, Jeff King wrote:

> I'll take a look at the patches you posted.

OK, I just read over them. I do think the result is not much more
complicated than using the vapier Action, and it fits our multi-platform
needs a bit better.

I had a few small comments about curl usage, but it mostly looks like a
good direction to me.

-Peff

^ permalink raw reply

* Re: [PATCH 6/6] coverity: detect and report when the token or project is incorrect
From: Jeff King @ 2023-09-23  7:07 UTC (permalink / raw)
  To: Johannes Schindelin via GitGitGadget; +Cc: git, Johannes Schindelin
In-Reply-To: <458bc2ea91faf88a3e1d21945f12f314d1a7b78e.1695379323.git.gitgitgadget@gmail.com>

On Fri, Sep 22, 2023 at 10:42:03AM +0000, Johannes Schindelin via GitGitGadget wrote:

> From: Johannes Schindelin <johannes.schindelin@gmx.de>
> 
> When trying to obtain the MD5 of the Coverity Scan Tool (in order to
> decide whether a cached version can be used or a new version has to be
> downloaded), it is possible to get a 401 (Authorization required) due to
> either an incorrect token, or even more likely due to an incorrect
> Coverity project name.
> 
> Let's detect that scenario and provide a helpful error message instead
> of trying to go forward with an empty string instead of the correct MD5.

Ah. :) I think using "curl --fail" is probably a simpler solution here.

-Peff

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox