Git development
 help / color / mirror / Atom feed
* [PATCH 5/6] coverity: allow running on macOS
From: Johannes Schindelin via GitGitGadget @ 2023-09-22 10:42 UTC (permalink / raw)
  To: git; +Cc: Johannes Schindelin, Johannes Schindelin
In-Reply-To: <pull.1588.git.1695379323.gitgitgadget@gmail.com>

From: Johannes Schindelin <johannes.schindelin@gmx.de>

For completeness' sake, let's add support for submitting macOS builds to
Coverity Scan.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 .github/workflows/coverity.yml | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml
index 70ba3f97c18..ca51048ed9d 100644
--- a/.github/workflows/coverity.yml
+++ b/.github/workflows/coverity.yml
@@ -42,7 +42,7 @@ jobs:
         if: contains(matrix.os, 'windows')
         uses: git-for-windows/setup-git-for-windows-sdk@v1
       - run: ci/install-dependencies.sh
-        if: contains(matrix.os, 'ubuntu')
+        if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
         env:
           runs_on_pool: ${{ matrix.os }}
 
@@ -55,10 +55,17 @@ jobs:
           *windows*)
             COVERITY_PLATFORM=win64
             COVERITY_TOOL_FILENAME=cov-analysis.zip
+            MAKEFLAGS=-j$(nproc)
+            ;;
+          *macos*)
+            COVERITY_PLATFORM=macOSX
+            COVERITY_TOOL_FILENAME=cov-analysis.dmg
+            MAKEFLAGS=-j$(sysctl -n hw.physicalcpu)
             ;;
           *ubuntu*)
             COVERITY_PLATFORM=linux64
             COVERITY_TOOL_FILENAME=cov-analysis.tgz
+            MAKEFLAGS=-j$(nproc)
             ;;
           *)
             echo '::error::unhandled OS ${{ matrix.os }}' >&2
@@ -67,6 +74,7 @@ jobs:
           esac
           echo "COVERITY_PLATFORM=$COVERITY_PLATFORM" >>$GITHUB_ENV
           echo "COVERITY_TOOL_FILENAME=$COVERITY_TOOL_FILENAME" >>$GITHUB_ENV
+          echo "MAKEFLAGS=$MAKEFLAGS" >>$GITHUB_ENV
           MD5=$(curl https://scan.coverity.com/download/$COVERITY_LANGUAGE/$COVERITY_PLATFORM \
                    --data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=$COVERITY_PROJECT&md5=1")
           echo "hash=$MD5" >>$GITHUB_OUTPUT
@@ -94,6 +102,16 @@ jobs:
             mkdir $RUNNER_TEMP/cov-analysis &&
             tar -xzf $RUNNER_TEMP/$COVERITY_TOOL_FILENAME --strip 1 -C $RUNNER_TEMP/cov-analysis
             ;;
+          *.dmg)
+            cd $RUNNER_TEMP &&
+            attach="$(hdiutil attach $COVERITY_TOOL_FILENAME)" &&
+            volume="$(echo "$attach" | cut -f 3 | grep /Volumes/)" &&
+            mkdir cov-analysis &&
+            cd cov-analysis &&
+            sh "$volume"/cov-analysis-macosx-*.sh &&
+            ls -l &&
+            hdiutil detach "$volume"
+            ;;
           *.zip)
             cd $RUNNER_TEMP &&
             mkdir cov-analysis-tmp &&
@@ -115,7 +133,7 @@ jobs:
         run: |
           export PATH="$RUNNER_TEMP/cov-analysis/bin:$PATH" &&
           cov-configure --gcc &&
-          cov-build --dir cov-int make -j$(nproc)
+          cov-build --dir cov-int make
       - name: package the build
         run: tar -czvf cov-int.tgz cov-int
       - name: submit the build to Coverity Scan
-- 
gitgitgadget


^ permalink raw reply related

* Re: [PATCH v2] .github/workflows: add coverity action
From: Johannes Schindelin @ 2023-09-22 11:09 UTC (permalink / raw)
  To: Taylor Blau; +Cc: git, Junio C Hamano, Jeff King
In-Reply-To: <b23951c569660e1891a7fb3ad2c2ea1952897bd7.1695332105.git.me@ttaylorr.com>

Hi Taylor,

thank you for continuing your work on this. The timing is a bit
unfortunate, though: As I had not heard back from you in this thread, I
had started work yesterday morning on converting Git for Windows'
corresponding Azure Pipeline to a GitHub workflow as a consequence. I had
to leave some polishing for this morning because the validation that the
workflow actually runs correctly and is versatile enough to address both
the needs of the Git project as well as of the Git for Windows project
took longer than anticipated and revealed a couple of problems on which I
will elaborate below.

On Thu, 21 Sep 2023, Taylor Blau wrote:

> [...] using the vapier/coverity-scan Action comes with some additional
> niceties, such as caching the (rather large) Coverity tool download
> between runs.

While it is true that that Action caches the Coverity Tool, this GitHub
Action comes with a few non-niceties, too, one of them being that it
actually fails to do its job. Looking at
https://github.com/vapier/coverity-scan-action/blob/main/action.yml it can
be very easily verified that `cov-configure` is not called. But as
https://github.com/git-for-windows/git/actions/runs/6267593979/job/17020975444#step:9:12
demonstrates, this command now _needs_ to be called:

	Error:  Could not find file coverity_config.xml in directory D:/a/_temp/cov-analysis/config

	The cov-build.exe command needs a configuration file, generated by
	cov-configure, to know how to capture analysis inputs based on
	compiler invocations and/or scanning the filesystem.
	Examples of running cov-configure:

	cov-configure --cs          Microsoft C# compiler (csc)
	cov-configure --gcc         GNU C/C++ compiler (gcc/g++)
	cov-configure --java        Oracle Java compiler (javac)
	cov-configure --javascript  *.js JavaScript source code
	cov-configure --msvc        Microsoft C/C++ compiler (cl)

	See cov-configure documentation for more information.

I had encountered this issue already in April last year and had addressed
it in https://github.com/git-for-windows/build-extra/commit/cec961d2536c,
so it came as an unwelcome surprise to me that this GitHub Action leaves
this problem unaddressed.

Another issue I ran into: That Action defaults to using the URL-encoded
name of the repository (in our case, `git%2Fgit`) as Coverity project
name. That project does not exist, though, and the GitHub Action therefore
silently assumes an empty MD5 and attempts to extract a tar file that is
actually a text file instead, with the contents "Not found".

Further, when I tried to specify `win64` as this GitHub Action's
`platform` input variable (whose existence suggests that platforms other
than `linux64` are allowed), it totally fell over, trying to untar a
`.zip` file.

For this and for various other reasons detailed in the cover letter of
https://lore.kernel.org/git/pull.1588.git.1695379323.gitgitgadget@gmail.com,
it would appear that unfortunately that GitHub Action won't be helpful
here.

Ciao,
Johannes

^ permalink raw reply

* [PATCH] pretty-formats.txt: fix whitespace
From: Josh Soref via GitGitGadget @ 2023-09-22 14:10 UTC (permalink / raw)
  To: git; +Cc: Josh Soref, Josh Soref

From: Josh Soref <jsoref@gmail.com>

* two spaces after periods for sentences
* comma (before/)after `i.e.` and `e.g.`
* comma after `etc.` when not ending a sentence
* space before `(`

Signed-off-by: Josh Soref <jsoref@gmail.com>
---
    pretty-formats.txt: fix whitespace
    
    follow-up-to:
    https://github.com/gitgitgadget/git/pull/939#discussion_r624652778
    
     * two spaces after periods for sentences
     * comma (before/)after i.e. and e.g.
     * space before (
    
    Signed-off-by: Josh Soref jsoref@gmail.com

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-950%2Fjsoref%2Fwhitespace-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-950/jsoref/whitespace-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/950

 Documentation/pretty-formats.txt | 68 ++++++++++++++++----------------
 1 file changed, 34 insertions(+), 34 deletions(-)

diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
index d38b4ab5666..f64c0a2d92e 100644
--- a/Documentation/pretty-formats.txt
+++ b/Documentation/pretty-formats.txt
@@ -15,7 +15,7 @@ There are several built-in formats, and you can define
 additional formats by setting a pretty.<name>
 config option to either another format name, or a
 'format:' string, as described below (see
-linkgit:git-config[1]). Here are the details of the
+linkgit:git-config[1]).  Here are the details of the
 built-in formats:
 
 * 'oneline'
@@ -96,15 +96,15 @@ stored in the commit object.  Notably, the hashes are
 displayed in full, regardless of whether --abbrev or
 --no-abbrev are used, and 'parents' information show the
 true parent commits, without taking grafts or history
-simplification into account. Note that this format affects the way
-commits are displayed, but not the way the diff is shown e.g. with
-`git log --raw`. To get full object names in a raw diff format,
+simplification into account.  Note that this format affects the way
+commits are displayed, but not the way the diff is shown, e.g., with
+`git log --raw`.  To get full object names in a raw diff format,
 use `--no-abbrev`.
 
 * 'format:<format-string>'
 +
 The 'format:<format-string>' format allows you to specify which information
-you want to show. It works a little bit like printf format,
+you want to show.  It works a little bit like printf format,
 with the notable exception that you get a newline with '%n'
 instead of '\n'.
 +
@@ -136,13 +136,13 @@ The placeholders are:
 	    default, colors are shown only when enabled for log output
 	    (by `color.diff`, `color.ui`, or `--color`, and respecting
 	    the `auto` settings of the former if we are going to a
-	    terminal). `%C(auto,...)` is accepted as a historical
-	    synonym for the default (e.g., `%C(auto,red)`). Specifying
+	    terminal).  `%C(auto,...)` is accepted as a historical
+	    synonym for the default (e.g., `%C(auto,red)`).  Specifying
 	    `%C(always,...)` will show the colors even when color is
 	    not otherwise enabled (though consider just using
 	    `--color=always` to enable color for the whole output,
 	    including this format and anything else git might color).
-	    `auto` alone (i.e. `%C(auto)`) will turn on auto coloring
+	    `auto` alone (i.e., `%C(auto)`) will turn on auto coloring
 	    on the next placeholders until the color is switched
 	    again.
 '%m':: left (`<`), right (`>`) or boundary (`-`) mark
@@ -177,7 +177,7 @@ The placeholders are:
 			  spaces
 '%><( <N> )', '%><|( <M> )':: similar to '%<( <N> )', '%<|( <M> )'
 			  respectively, but padding both sides
-			  (i.e. the text is centered)
+			  (i.e., the text is centered)
 
 - Placeholders that expand to information extracted from the commit:
 '%H':: commit hash
@@ -225,9 +225,9 @@ The placeholders are:
 '%d':: ref names, like the --decorate option of linkgit:git-log[1]
 '%D':: ref names without the " (", ")" wrapping.
 '%(decorate[:<options>])'::
-ref names with custom decorations. The `decorate` string may be followed by a
-colon and zero or more comma-separated options. Option values may contain
-literal formatting codes. These must be used for commas (`%x2C`) and closing
+ref names with custom decorations.  The `decorate` string may be followed by a
+colon and zero or more comma-separated options.  Option values may contain
+literal formatting codes.  These must be used for commas (`%x2C`) and closing
 parentheses (`%x29`), due to their role in the option syntax.
 +
 ** 'prefix=<value>': Shown before the list of ref names.  Defaults to "{nbsp}`(`".
@@ -235,7 +235,7 @@ parentheses (`%x29`), due to their role in the option syntax.
 ** 'separator=<value>': Shown between ref names.  Defaults to "`,`{nbsp}".
 ** 'pointer=<value>': Shown between HEAD and the branch it points to, if any.
 		      Defaults to "{nbsp}`->`{nbsp}".
-** 'tag=<value>': Shown before tag names. Defaults to "`tag:`{nbsp}".
+** 'tag=<value>': Shown before tag names.  Defaults to "`tag:`{nbsp}".
 
 +
 For example, to produce decorations with no wrapping
@@ -277,7 +277,7 @@ endif::git-rev-list[]
 	"X" for a good signature that has expired,
 	"Y" for a good signature made by an expired key,
 	"R" for a good signature made by a revoked key,
-	"E" if the signature cannot be checked (e.g. missing key)
+	"E" if the signature cannot be checked (e.g., missing key)
 	and "N" for no signature
 '%GS':: show the name of the signer for a signed commit
 '%GK':: show the key used to sign a signed commit
@@ -287,7 +287,7 @@ endif::git-rev-list[]
 '%GT':: show the trust level for the key used to sign a signed commit
 '%gD':: reflog selector, e.g., `refs/stash@{1}` or `refs/stash@{2
 	minutes ago}`; the format follows the rules described for the
-	`-g` option. The portion before the `@` is the refname as
+	`-g` option.  The portion before the `@` is the refname as
 	given on the command line (so `git log -g refs/heads/master`
 	would yield `refs/heads/master@{0}`).
 '%gd':: shortened reflog selector; same as `%gD`, but the refname
@@ -302,48 +302,48 @@ endif::git-rev-list[]
 '%gs':: reflog subject
 '%(trailers[:<options>])'::
 display the trailers of the body as interpreted by
-linkgit:git-interpret-trailers[1]. The `trailers` string may be followed by
-a colon and zero or more comma-separated options. If any option is provided
+linkgit:git-interpret-trailers[1].  The `trailers` string may be followed by
+a colon and zero or more comma-separated options.  If any option is provided
 multiple times, the last occurrence wins.
 +
-** 'key=<key>': only show trailers with specified <key>. Matching is done
-   case-insensitively and trailing colon is optional. If option is
+** 'key=<key>': only show trailers with specified <key>.  Matching is done
+   case-insensitively and trailing colon is optional.  If option is
    given multiple times trailer lines matching any of the keys are
-   shown. This option automatically enables the `only` option so that
-   non-trailer lines in the trailer block are hidden. If that is not
+   shown.  This option automatically enables the `only` option so that
+   non-trailer lines in the trailer block are hidden.  If that is not
    desired it can be disabled with `only=false`.  E.g.,
    `%(trailers:key=Reviewed-by)` shows trailer lines with key
    `Reviewed-by`.
 ** 'only[=<bool>]': select whether non-trailer lines from the trailer
    block should be included.
 ** 'separator=<sep>': specify a separator inserted between trailer
-   lines. When this option is not given each trailer line is
-   terminated with a line feed character. The string <sep> may contain
-   the literal formatting codes described above. To use comma as
+   lines.  When this option is not given each trailer line is
+   terminated with a line feed character.  The string <sep> may contain
+   the literal formatting codes described above.  To use comma as
    separator one must use `%x2C` as it would otherwise be parsed as
-   next option. E.g., `%(trailers:key=Ticket,separator=%x2C )`
+   next option.  E.g., `%(trailers:key=Ticket,separator=%x2C )`
    shows all trailer lines whose key is "Ticket" separated by a comma
    and a space.
 ** 'unfold[=<bool>]': make it behave as if interpret-trailer's `--unfold`
-   option was given. E.g.,
+   option was given.  E.g.,
    `%(trailers:only,unfold=true)` unfolds and shows all trailer lines.
 ** 'keyonly[=<bool>]': only show the key part of the trailer.
 ** 'valueonly[=<bool>]': only show the value part of the trailer.
 ** 'key_value_separator=<sep>': specify a separator inserted between
-   trailer lines. When this option is not given each trailer key-value
-   pair is separated by ": ". Otherwise it shares the same semantics
+   trailer lines.  When this option is not given each trailer key-value
+   pair is separated by ": ".  Otherwise it shares the same semantics
    as 'separator=<sep>' above.
 
 NOTE: Some placeholders may depend on other options given to the
-revision traversal engine. For example, the `%g*` reflog options will
+revision traversal engine.  For example, the `%g*` reflog options will
 insert an empty string unless we are traversing reflog entries (e.g., by
-`git log -g`). The `%d` and `%D` placeholders will use the "short"
+`git log -g`).  The `%d` and `%D` placeholders will use the "short"
 decoration format if `--decorate` was not already provided on the command
 line.
 
-The boolean options accept an optional value `[=<bool-value>]`. The values
-`true`, `false`, `on`, `off` etc. are all accepted. See the "boolean"
-sub-section in "EXAMPLES" in linkgit:git-config[1]. If a boolean
+The boolean options accept an optional value `[=<bool-value>]`.  The values
+`true`, `false`, `on`, `off`, etc., are all accepted.  See the "boolean"
+sub-section in "EXAMPLES" in linkgit:git-config[1].  If a boolean
 option is given with no value, it's enabled.
 
 If you add a `+` (plus sign) after '%' of a placeholder, a line-feed
@@ -361,7 +361,7 @@ placeholder expands to a non-empty string.
 * 'tformat:'
 +
 The 'tformat:' format works exactly like 'format:', except that it
-provides "terminator" semantics instead of "separator" semantics. In
+provides "terminator" semantics instead of "separator" semantics.  In
 other words, each commit has the message terminator character (usually a
 newline) appended, rather than a separator placed between entries.
 This means that the final entry of a single-line format will be properly

base-commit: bda494f4043963b9ec9a1ecd4b19b7d1cd9a0518
-- 
gitgitgadget

^ permalink raw reply related

* [PATCH 0/4] Switch links to https
From: Josh Soref via GitGitGadget @ 2023-09-22 14:13 UTC (permalink / raw)
  To: git; +Cc: Josh Soref

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.)

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-ls-remote.txt                      |  4 ++--
 Documentation/git-send-email.txt                     |  2 +-
 Documentation/git.txt                                |  2 +-
 Documentation/gitcore-tutorial.txt                   |  6 +++---
 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 +-
 compat/nedmalloc/malloc.c.h                          | 12 ++++++------
 compat/obstack.c                                     |  2 +-
 compat/obstack.h                                     |  2 +-
 compat/poll/poll.c                                   |  2 +-
 compat/poll/poll.h                                   |  2 +-
 compat/precompose_utf8.h                             |  2 +-
 compat/regex/regcomp.c                               |  2 +-
 compat/regex/regex.c                                 |  2 +-
 compat/regex/regex.h                                 |  2 +-
 compat/regex/regex_internal.c                        |  2 +-
 compat/regex/regex_internal.h                        |  2 +-
 compat/regex/regexec.c                               |  2 +-
 compat/vcbuild/README                                | 10 +++++-----
 contrib/completion/git-completion.bash               |  2 +-
 .../credential/libsecret/git-credential-libsecret.c  |  2 +-
 contrib/fast-import/import-directories.perl          |  2 +-
 contrib/hg-to-git/hg-to-git.py                       |  2 +-
 contrib/mw-to-git/t/test-gitmw-lib.sh                |  4 ++--
 contrib/persistent-https/LICENSE                     |  2 +-
 contrib/persistent-https/README                      |  4 ++--
 contrib/thunderbird-patch-inline/appp.sh             |  2 +-
 contrib/update-unicode/update_unicode.sh             |  6 +++---
 convert.c                                            |  2 +-
 ewah/bitmap.c                                        |  2 +-
 ewah/ewah_bitmap.c                                   |  2 +-
 ewah/ewah_io.c                                       |  2 +-
 ewah/ewah_rlw.c                                      |  2 +-
 ewah/ewok.h                                          |  4 ++--
 ewah/ewok_rlw.h                                      |  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 +++---
 xdiff/xdiff.h                                        |  2 +-
 xdiff/xdiffi.c                                       |  2 +-
 xdiff/xdiffi.h                                       |  2 +-
 xdiff/xemit.c                                        |  2 +-
 xdiff/xemit.h                                        |  2 +-
 xdiff/xinclude.h                                     |  2 +-
 xdiff/xmacros.h                                      |  2 +-
 xdiff/xmerge.c                                       |  2 +-
 xdiff/xpatience.c                                    |  2 +-
 xdiff/xprepare.c                                     |  2 +-
 xdiff/xprepare.h                                     |  2 +-
 xdiff/xtypes.h                                       |  2 +-
 xdiff/xutils.c                                       |  2 +-
 xdiff/xutils.h                                       |  2 +-
 101 files changed, 144 insertions(+), 144 deletions(-)


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

^ permalink raw reply

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

From: Josh Soref <jsoref@gmail.com>

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

diff --git a/compat/nedmalloc/malloc.c.h b/compat/nedmalloc/malloc.c.h
index 4b711c6b9ca..d8c5cd552e2 100644
--- a/compat/nedmalloc/malloc.c.h
+++ b/compat/nedmalloc/malloc.c.h
@@ -1359,7 +1359,7 @@ 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>
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 2/4] doc: update links to current pages
From: Josh Soref via GitGitGadget @ 2023-09-22 14:13 UTC (permalink / raw)
  To: git; +Cc: Josh Soref, Josh Soref
In-Reply-To: <pull.1589.git.1695392027.gitgitgadget@gmail.com>

From: Josh Soref <jsoref@gmail.com>

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-ls-remote.txt    | 4 ++--
 Documentation/git.txt              | 2 +-
 Documentation/gitcore-tutorial.txt | 4 ++--
 compat/nedmalloc/malloc.c.h        | 2 +-
 contrib/persistent-https/README    | 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 +-
 19 files changed, 21 insertions(+), 21 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-ls-remote.txt b/Documentation/git-ls-remote.txt
index 1c4f696ab57..b9c8478a62a 100644
--- a/Documentation/git-ls-remote.txt
+++ b/Documentation/git-ls-remote.txt
@@ -128,7 +128,7 @@ 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
 ----
@@ -136,7 +136,7 @@ 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
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/Documentation/gitcore-tutorial.txt b/Documentation/gitcore-tutorial.txt
index 2122aeb9769..924a9a97807 100644
--- a/Documentation/gitcore-tutorial.txt
+++ b/Documentation/gitcore-tutorial.txt
@@ -1101,8 +1101,8 @@ 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?
diff --git a/compat/nedmalloc/malloc.c.h b/compat/nedmalloc/malloc.c.h
index 5c5357a379f..4b711c6b9ca 100644
--- a/compat/nedmalloc/malloc.c.h
+++ b/compat/nedmalloc/malloc.c.h
@@ -1359,7 +1359,7 @@ 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>
diff --git a/contrib/persistent-https/README b/contrib/persistent-https/README
index 2ad95893c27..2c9bec91066 100644
--- a/contrib/persistent-https/README
+++ b/contrib/persistent-https/README
@@ -60,7 +60,7 @@ 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
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 3/4] doc: update links for andre-simon.de
From: Josh Soref via GitGitGadget @ 2023-09-22 14:13 UTC (permalink / raw)
  To: git; +Cc: Josh Soref, Josh Soref
In-Reply-To: <pull.1589.git.1695392027.gitgitgadget@gmail.com>

From: Josh Soref <jsoref@gmail.com>

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 1/4] doc: switch links to https
From: Josh Soref via GitGitGadget @ 2023-09-22 14:13 UTC (permalink / raw)
  To: git; +Cc: Josh Soref, Josh Soref
In-Reply-To: <pull.1589.git.1695392027.gitgitgadget@gmail.com>

From: Josh Soref <jsoref@gmail.com>

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 +-
 compat/nedmalloc/malloc.c.h                            | 10 +++++-----
 compat/obstack.c                                       |  2 +-
 compat/obstack.h                                       |  2 +-
 compat/poll/poll.c                                     |  2 +-
 compat/poll/poll.h                                     |  2 +-
 compat/precompose_utf8.h                               |  2 +-
 compat/regex/regcomp.c                                 |  2 +-
 compat/regex/regex.c                                   |  2 +-
 compat/regex/regex.h                                   |  2 +-
 compat/regex/regex_internal.c                          |  2 +-
 compat/regex/regex_internal.h                          |  2 +-
 compat/regex/regexec.c                                 |  2 +-
 compat/vcbuild/README                                  | 10 +++++-----
 contrib/completion/git-completion.bash                 |  2 +-
 .../credential/libsecret/git-credential-libsecret.c    |  2 +-
 contrib/fast-import/import-directories.perl            |  2 +-
 contrib/hg-to-git/hg-to-git.py                         |  2 +-
 contrib/mw-to-git/t/test-gitmw-lib.sh                  |  4 ++--
 contrib/persistent-https/LICENSE                       |  2 +-
 contrib/persistent-https/README                        |  2 +-
 contrib/thunderbird-patch-inline/appp.sh               |  2 +-
 contrib/update-unicode/update_unicode.sh               |  6 +++---
 convert.c                                              |  2 +-
 ewah/bitmap.c                                          |  2 +-
 ewah/ewah_bitmap.c                                     |  2 +-
 ewah/ewah_io.c                                         |  2 +-
 ewah/ewah_rlw.c                                        |  2 +-
 ewah/ewok.h                                            |  4 ++--
 ewah/ewok_rlw.h                                        |  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 +++---
 xdiff/xdiff.h                                          |  2 +-
 xdiff/xdiffi.c                                         |  2 +-
 xdiff/xdiffi.h                                         |  2 +-
 xdiff/xemit.c                                          |  2 +-
 xdiff/xemit.h                                          |  2 +-
 xdiff/xinclude.h                                       |  2 +-
 xdiff/xmacros.h                                        |  2 +-
 xdiff/xmerge.c                                         |  2 +-
 xdiff/xpatience.c                                      |  2 +-
 xdiff/xprepare.c                                       |  2 +-
 xdiff/xprepare.h                                       |  2 +-
 xdiff/xtypes.h                                         |  2 +-
 xdiff/xutils.c                                         |  2 +-
 xdiff/xutils.h                                         |  2 +-
 88 files changed, 113 insertions(+), 113 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/compat/nedmalloc/malloc.c.h b/compat/nedmalloc/malloc.c.h
index 814845d4b33..5c5357a379f 100644
--- a/compat/nedmalloc/malloc.c.h
+++ b/compat/nedmalloc/malloc.c.h
@@ -1,7 +1,7 @@
 /*
   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)
@@ -126,7 +126,7 @@
        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
@@ -172,7 +172,7 @@
   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.,
@@ -2460,7 +2460,7 @@ 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.
 
@@ -2916,7 +2916,7 @@ 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
diff --git a/compat/obstack.c b/compat/obstack.c
index 27cd5c1ea1f..ec23761cda1 100644
--- a/compat/obstack.c
+++ b/compat/obstack.c
@@ -15,7 +15,7 @@
 
    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>
diff --git a/compat/obstack.h b/compat/obstack.h
index f90a46d9b95..fd6f5f6821a 100644
--- a/compat/obstack.h
+++ b/compat/obstack.h
@@ -15,7 +15,7 @@
 
    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:
 
diff --git a/compat/poll/poll.c b/compat/poll/poll.c
index afa6d245846..1ed0fa055b6 100644
--- a/compat/poll/poll.c
+++ b/compat/poll/poll.c
@@ -16,7 +16,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/>.  */
+   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"
diff --git a/compat/poll/poll.h b/compat/poll/poll.h
index 1e1597360f4..e369436dbe3 100644
--- a/compat/poll/poll.h
+++ b/compat/poll/poll.h
@@ -16,7 +16,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/>.  */
+   with this program; if not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _GL_POLL_H
 #define _GL_POLL_H
diff --git a/compat/precompose_utf8.h b/compat/precompose_utf8.h
index fea06cf28a5..9bae1e921f6 100644
--- a/compat/precompose_utf8.h
+++ b/compat/precompose_utf8.h
@@ -13,7 +13,7 @@ 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()
diff --git a/compat/regex/regcomp.c b/compat/regex/regcomp.c
index d1bc09e49b6..909d4ffac52 100644
--- a/compat/regex/regcomp.c
+++ b/compat/regex/regcomp.c
@@ -15,7 +15,7 @@
 
    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 */
diff --git a/compat/regex/regex.c b/compat/regex/regex.c
index e6f4a5d177b..c32fd1ce489 100644
--- a/compat/regex/regex.c
+++ b/compat/regex/regex.c
@@ -15,7 +15,7 @@
 
    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"
diff --git a/compat/regex/regex.h b/compat/regex/regex.h
index 2d3412860d4..9022bf49d29 100644
--- a/compat/regex/regex.h
+++ b/compat/regex/regex.h
@@ -19,7 +19,7 @@
 
    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
diff --git a/compat/regex/regex_internal.c b/compat/regex/regex_internal.c
index ec51cf34461..49cf52d98cc 100644
--- a/compat/regex/regex_internal.c
+++ b/compat/regex/regex_internal.c
@@ -15,7 +15,7 @@
 
    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,
diff --git a/compat/regex/regex_internal.h b/compat/regex/regex_internal.h
index 0bad8b841ed..61be3978dbd 100644
--- a/compat/regex/regex_internal.h
+++ b/compat/regex/regex_internal.h
@@ -15,7 +15,7 @@
 
    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
diff --git a/compat/regex/regexec.c b/compat/regex/regexec.c
index 49358ae475c..bc91ebd4432 100644
--- a/compat/regex/regexec.c
+++ b/compat/regex/regexec.c
@@ -15,7 +15,7 @@
 
    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;
diff --git a/compat/vcbuild/README b/compat/vcbuild/README
index 29ec1d0f104..3823fb56c89 100644
--- a/compat/vcbuild/README
+++ b/compat/vcbuild/README
@@ -67,14 +67,14 @@ 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)
 
@@ -83,9 +83,9 @@ 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
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 133ec92bfae..8d8eb2c8afa 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -203,7 +203,7 @@ __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:
 #
diff --git a/contrib/credential/libsecret/git-credential-libsecret.c b/contrib/credential/libsecret/git-credential-libsecret.c
index 215a81d8bae..42c6b2d5e80 100644
--- a/contrib/credential/libsecret/git-credential-libsecret.c
+++ b/contrib/credential/libsecret/git-credential-libsecret.c
@@ -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/>.
  */
 
 /*
diff --git a/contrib/fast-import/import-directories.perl b/contrib/fast-import/import-directories.perl
index a16f79cfdc4..8d8dcda98aa 100755
--- a/contrib/fast-import/import-directories.perl
+++ b/contrib/fast-import/import-directories.perl
@@ -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/>.
 #
 # ------------------------------------------------------------------------
 
diff --git a/contrib/hg-to-git/hg-to-git.py b/contrib/hg-to-git/hg-to-git.py
index 7eb1b24cc7a..fcadae46fd9 100755
--- a/contrib/hg-to-git/hg-to-git.py
+++ b/contrib/hg-to-git/hg-to-git.py
@@ -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/>.
 """
 
 import os, os.path, sys
diff --git a/contrib/mw-to-git/t/test-gitmw-lib.sh b/contrib/mw-to-git/t/test-gitmw-lib.sh
index 64e46c16716..337e3672c02 100755
--- a/contrib/mw-to-git/t/test-gitmw-lib.sh
+++ b/contrib/mw-to-git/t/test-gitmw-lib.sh
@@ -371,9 +371,9 @@ 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)/;" \
diff --git a/contrib/persistent-https/LICENSE b/contrib/persistent-https/LICENSE
index d6456956733..c38505788b3 100644
--- a/contrib/persistent-https/LICENSE
+++ b/contrib/persistent-https/LICENSE
@@ -1,7 +1,7 @@
 
                                  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
 
diff --git a/contrib/persistent-https/README b/contrib/persistent-https/README
index 7c4cd8d257d..2ad95893c27 100644
--- a/contrib/persistent-https/README
+++ b/contrib/persistent-https/README
@@ -63,7 +63,7 @@ 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
diff --git a/contrib/thunderbird-patch-inline/appp.sh b/contrib/thunderbird-patch-inline/appp.sh
index 1053872eea9..00a30c40ad9 100755
--- a/contrib/thunderbird-patch-inline/appp.sh
+++ b/contrib/thunderbird-patch-inline/appp.sh
@@ -4,7 +4,7 @@
 # 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
 
diff --git a/contrib/update-unicode/update_unicode.sh b/contrib/update-unicode/update_unicode.sh
index aa90865befa..2bf1d81cad8 100755
--- a/contrib/update-unicode/update_unicode.sh
+++ b/contrib/update-unicode/update_unicode.sh
@@ -1,5 +1,5 @@
 #!/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)
@@ -8,8 +8,8 @@
 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 )
diff --git a/convert.c b/convert.c
index a8870baff36..98514882484 100644
--- a/convert.c
+++ b/convert.c
@@ -438,7 +438,7 @@ 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)) {
diff --git a/ewah/bitmap.c b/ewah/bitmap.c
index 7b525b1ecd8..fa455682aa7 100644
--- a/ewah/bitmap.c
+++ b/ewah/bitmap.c
@@ -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/>.
  */
 #include "git-compat-util.h"
 #include "ewok.h"
diff --git a/ewah/ewah_bitmap.c b/ewah/ewah_bitmap.c
index 8785cbc54a8..595c20aa16a 100644
--- a/ewah/ewah_bitmap.c
+++ b/ewah/ewah_bitmap.c
@@ -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/>.
  */
 #include "git-compat-util.h"
 #include "ewok.h"
diff --git a/ewah/ewah_io.c b/ewah/ewah_io.c
index 9035ee65ea8..e371ec6038d 100644
--- a/ewah/ewah_io.c
+++ b/ewah/ewah_io.c
@@ -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/>.
  */
 #include "git-compat-util.h"
 #include "ewok.h"
diff --git a/ewah/ewah_rlw.c b/ewah/ewah_rlw.c
index 5093d43e2f0..ec4918eefa8 100644
--- a/ewah/ewah_rlw.c
+++ b/ewah/ewah_rlw.c
@@ -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/>.
  */
 #include "git-compat-util.h"
 #include "ewok.h"
diff --git a/ewah/ewok.h b/ewah/ewok.h
index 7eb8b9b6301..2524878f75d 100644
--- a/ewah/ewok.h
+++ b/ewah/ewok.h
@@ -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/>.
  */
 #ifndef __EWOK_BITMAP_H__
 #define __EWOK_BITMAP_H__
@@ -27,7 +27,7 @@ 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)
 {
diff --git a/ewah/ewok_rlw.h b/ewah/ewok_rlw.h
index bafa24f4c3a..7eb8f1166c2 100644
--- a/ewah/ewok_rlw.h
+++ b/ewah/ewok_rlw.h
@@ -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/>.
  */
 #ifndef __EWOK_RLW_H__
 #define __EWOK_RLW_H__
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
  */
diff --git a/xdiff/xdiff.h b/xdiff/xdiff.h
index bb56b23f34c..73a39fc1b76 100644
--- a/xdiff/xdiff.h
+++ b/xdiff/xdiff.h
@@ -14,7 +14,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/>.
  *
  *  Davide Libenzi <davidel@xmailserver.org>
  *
diff --git a/xdiff/xdiffi.c b/xdiff/xdiffi.c
index 344c2dfc3eb..cc48de7aa26 100644
--- a/xdiff/xdiffi.c
+++ b/xdiff/xdiffi.c
@@ -14,7 +14,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/>.
  *
  *  Davide Libenzi <davidel@xmailserver.org>
  *
diff --git a/xdiff/xdiffi.h b/xdiff/xdiffi.h
index 126c9d8ff4e..2740c0f99bd 100644
--- a/xdiff/xdiffi.h
+++ b/xdiff/xdiffi.h
@@ -14,7 +14,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/>.
  *
  *  Davide Libenzi <davidel@xmailserver.org>
  *
diff --git a/xdiff/xemit.c b/xdiff/xemit.c
index 75f0fe49866..acaaa5c21f5 100644
--- a/xdiff/xemit.c
+++ b/xdiff/xemit.c
@@ -14,7 +14,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/>.
  *
  *  Davide Libenzi <davidel@xmailserver.org>
  *
diff --git a/xdiff/xemit.h b/xdiff/xemit.h
index 1b9887e670d..162b83e8fcd 100644
--- a/xdiff/xemit.h
+++ b/xdiff/xemit.h
@@ -14,7 +14,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/>.
  *
  *  Davide Libenzi <davidel@xmailserver.org>
  *
diff --git a/xdiff/xinclude.h b/xdiff/xinclude.h
index a4285ac0eb2..81f17f76a7f 100644
--- a/xdiff/xinclude.h
+++ b/xdiff/xinclude.h
@@ -14,7 +14,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/>.
  *
  *  Davide Libenzi <davidel@xmailserver.org>
  *
diff --git a/xdiff/xmacros.h b/xdiff/xmacros.h
index 8487bb396fa..eb42f7ec478 100644
--- a/xdiff/xmacros.h
+++ b/xdiff/xmacros.h
@@ -14,7 +14,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/>.
  *
  *  Davide Libenzi <davidel@xmailserver.org>
  *
diff --git a/xdiff/xmerge.c b/xdiff/xmerge.c
index af40c88a5b3..478ad8faf0a 100644
--- a/xdiff/xmerge.c
+++ b/xdiff/xmerge.c
@@ -14,7 +14,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/>.
  *
  *  Davide Libenzi <davidel@xmailserver.org>
  *
diff --git a/xdiff/xpatience.c b/xdiff/xpatience.c
index a2d8955537f..fcf22829dc8 100644
--- a/xdiff/xpatience.c
+++ b/xdiff/xpatience.c
@@ -14,7 +14,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/>.
  *
  *  Davide Libenzi <davidel@xmailserver.org>
  *
diff --git a/xdiff/xprepare.c b/xdiff/xprepare.c
index c84549f6c50..fb3e0feb096 100644
--- a/xdiff/xprepare.c
+++ b/xdiff/xprepare.c
@@ -14,7 +14,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/>.
  *
  *  Davide Libenzi <davidel@xmailserver.org>
  *
diff --git a/xdiff/xprepare.h b/xdiff/xprepare.h
index 947d9fc1bb8..c75b32d06e9 100644
--- a/xdiff/xprepare.h
+++ b/xdiff/xprepare.h
@@ -14,7 +14,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/>.
  *
  *  Davide Libenzi <davidel@xmailserver.org>
  *
diff --git a/xdiff/xtypes.h b/xdiff/xtypes.h
index 8442bd436ef..da01e6b4378 100644
--- a/xdiff/xtypes.h
+++ b/xdiff/xtypes.h
@@ -14,7 +14,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/>.
  *
  *  Davide Libenzi <davidel@xmailserver.org>
  *
diff --git a/xdiff/xutils.c b/xdiff/xutils.c
index 9e36f24875d..bd904e656ee 100644
--- a/xdiff/xutils.c
+++ b/xdiff/xutils.c
@@ -14,7 +14,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/>.
  *
  *  Davide Libenzi <davidel@xmailserver.org>
  *
diff --git a/xdiff/xutils.h b/xdiff/xutils.h
index fd0bba94e8b..292cdc5eb21 100644
--- a/xdiff/xutils.h
+++ b/xdiff/xutils.h
@@ -14,7 +14,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/>.
  *
  *  Davide Libenzi <davidel@xmailserver.org>
  *
-- 
gitgitgadget


^ permalink raw reply related

* [PATCH] Documentation/git-status: add missing line breaks
From: Josh Soref via GitGitGadget @ 2023-09-22 14:14 UTC (permalink / raw)
  To: git; +Cc: Josh Soref, Josh Soref

From: Josh Soref <jsoref@gmail.com>

Signed-off-by: Josh Soref <jsoref@gmail.com>
---
    Documentation/git-status: add missing line breaks
    
    Most of the content in git help status is well formatted, as you can see
    here:
    
           In the following table, these three classes are shown in separate sections, and these characters are used for X and Y fields for the first two sections that show tracked paths:
    
           •   ' ' = unmodified
    
           •   M = modified
    
           •   T = file type changed (regular file, symbolic link or submodule)
    
           •   A = added
    
           •   D = deleted
    
           •   R = renamed
    
           •   C = copied (if config option status.renames is set to "copies")
    
           •   U = updated but unmerged
    
               X          Y     Meaning
               -------------------------------------------------
                        [AMD]   not updated
               M        [ MTD]  updated in index
               T        [ MTD]  type changed in index
               A        [ MTD]  added to index
               D                deleted from index
               R        [ MTD]  renamed in index
               C        [ MTD]  copied in index
               [MTARC]          index and work tree matches
               [ MTARC]    M    work tree changed since index
               [ MTARC]    T    type changed in work tree since index
               [ MTARC]    D    deleted in work tree
                           R    renamed in work tree
                           C    copied in work tree
               -------------------------------------------------
               D           D    unmerged, both deleted
               A           U    unmerged, added by us
               U           D    unmerged, deleted by them
               U           A    unmerged, added by them
               D           U    unmerged, deleted by us
               A           A    unmerged, both added
               U           U    unmerged, both modified
               -------------------------------------------------
               ?           ?    untracked
               !           !    ignored
               -------------------------------------------------
    
           Submodules have more state and instead report M the submodule has a different HEAD than recorded in the index m the submodule has modified content ? the submodule has untracked
           files since modified content or untracked files in a submodule cannot be added via git add in the superproject to prepare a commit.
    
           m and ? are applied recursively. For example if a nested submodule in a submodule contains an untracked file, this is reported as ? as well.
    
           If -b is used the short-format status is preceded by a line
    
               ## branchname tracking info
    
    
    Except for the part:
    
           Submodules have more state and instead report M the submodule has a different HEAD than recorded in the index m the submodule has modified content ? the submodule has untracked
    
    
    It appears that it wanted to be a table. With this patch, the html
    renders as:
    
    Submodules have more state and instead report
    
    M    the submodule has a different HEAD than
         recorded in the index
    m    the submodule has modified content
    ?    the submodule has untracked files
    
    since modified content or untracked files in a submodule cannot be added via git add in the superproject to prepare a commit.
    
    m and ? are applied recursively. For example if a nested submodule in a submodule contains an untracked file, this is reported as ? as well.
    
    If -b is used the short-format status is preceded by a line
    
    ## branchname tracking info
    

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1590%2Fjsoref%2Fgit-status-missing-line-break-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1590/jsoref/git-status-missing-line-break-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1590

 Documentation/git-status.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt
index a051b1e8f38..b27d127b5e2 100644
--- a/Documentation/git-status.txt
+++ b/Documentation/git-status.txt
@@ -245,10 +245,12 @@ U           U    unmerged, both modified
 ....
 
 Submodules have more state and instead report
+
 		M    the submodule has a different HEAD than
 		     recorded in the index
 		m    the submodule has modified content
 		?    the submodule has untracked files
+
 since modified content or untracked files in a submodule cannot be added
 via `git add` in the superproject to prepare a commit.
 

base-commit: bda494f4043963b9ec9a1ecd4b19b7d1cd9a0518
-- 
gitgitgadget

^ permalink raw reply related

* Re: [PATCH v2 3/7] unit-tests: do show relative file paths
From: Phillip Wood @ 2023-09-22 14:35 UTC (permalink / raw)
  To: Johannes Schindelin via GitGitGadget, git; +Cc: Johannes Schindelin
In-Reply-To: <f0b804129e8a21449cbb6f346473d3570182ddfa.1695070468.git.gitgitgadget@gmail.com>

Hi Johannes

On 18/09/2023 21:54, Johannes Schindelin via GitGitGadget wrote:
> From: Johannes Schindelin <johannes.schindelin@gmx.de>
> 
> Visual C interpolates `__FILE__` with the absolute _Windows_ path of
> the source file. GCC interpolates it with the relative path, and the
> tests even verify that.
> 
> So let's make sure that the unit tests only emit such paths.

This looks good to me. Calling strlcpy() without checking the return 
value is a pet peeve of mine but the silent truncation doesn't matter 
here and the buffer ought to be long enough anyway.

Best Wishes

Phillip

> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
>   t/unit-tests/test-lib.c | 52 +++++++++++++++++++++++++++++++++++++----
>   1 file changed, 48 insertions(+), 4 deletions(-)
> 
> diff --git a/t/unit-tests/test-lib.c b/t/unit-tests/test-lib.c
> index 70030d587ff..744e223ee98 100644
> --- a/t/unit-tests/test-lib.c
> +++ b/t/unit-tests/test-lib.c
> @@ -21,6 +21,46 @@ static struct {
>   	.result = RESULT_NONE,
>   };
>   
> +#ifndef _MSC_VER
> +#define make_relative(location) location
> +#else
> +/*
> + * Visual C interpolates the absolute Windows path for `__FILE__`,
> + * but we want to see relative paths, as verified by t0080.
> + */
> +#include "dir.h"
> +
> +static const char *make_relative(const char *location)
> +{
> +	static char prefix[] = __FILE__, buf[PATH_MAX], *p;
> +	static size_t prefix_len;
> +
> +	if (!prefix_len) {
> +		size_t len = strlen(prefix);
> +		const char *needle = "\\t\\unit-tests\\test-lib.c";
> +		size_t needle_len = strlen(needle);
> +
> +		if (len < needle_len || strcmp(needle, prefix + len - needle_len))
> +			die("unexpected suffix of '%s'", prefix);
> +
> +		/* let it end in a directory separator */
> +		prefix_len = len - needle_len + 1;
> +	}
> +
> +	/* Does it not start with the expected prefix? */
> +	if (fspathncmp(location, prefix, prefix_len))
> +		return location;
> +
> +	strlcpy(buf, location + prefix_len, sizeof(buf));
> +	/* convert backslashes to forward slashes */
> +	for (p = buf; *p; p++)
> +		if (*p == '\\')
> +			*p = '/';
> +
> +	return buf;
> +}
> +#endif
> +
>   static void msg_with_prefix(const char *prefix, const char *format, va_list ap)
>   {
>   	fflush(stderr);
> @@ -147,7 +187,8 @@ int test__run_end(int was_run UNUSED, const char *location, const char *format,
>   			break;
>   
>   		case RESULT_NONE:
> -			test_msg("BUG: test has no checks at %s", location);
> +			test_msg("BUG: test has no checks at %s",
> +				 make_relative(location));
>   			printf("not ok %d", ctx.count);
>   			print_description(format, ap);
>   			ctx.result = RESULT_FAILURE;
> @@ -193,13 +234,15 @@ int test_assert(const char *location, const char *check, int ok)
>   	assert(ctx.running);
>   
>   	if (ctx.result == RESULT_SKIP) {
> -		test_msg("skipping check '%s' at %s", check, location);
> +		test_msg("skipping check '%s' at %s", check,
> +			 make_relative(location));
>   		return 0;
>   	} else if (!ctx.todo) {
>   		if (ok) {
>   			test_pass();
>   		} else {
> -			test_msg("check \"%s\" failed at %s", check, location);
> +			test_msg("check \"%s\" failed at %s", check,
> +				 make_relative(location));
>   			test_fail();
>   		}
>   	}
> @@ -224,7 +267,8 @@ int test__todo_end(const char *location, const char *check, int res)
>   	if (ctx.result == RESULT_SKIP)
>   		return 0;
>   	if (!res) {
> -		test_msg("todo check '%s' succeeded at %s", check, location);
> +		test_msg("todo check '%s' succeeded at %s", check,
> +			 make_relative(location));
>   		test_fail();
>   	} else {
>   		test_todo();

^ permalink raw reply

* Re: [PATCH v2 6/7] cmake: use test names instead of full paths
From: Phillip Wood @ 2023-09-22 14:37 UTC (permalink / raw)
  To: Johannes Schindelin via GitGitGadget, git; +Cc: Johannes Schindelin
In-Reply-To: <41228df1b469d9a79f3278fe8c1ca37082600669.1695070468.git.gitgitgadget@gmail.com>

Hi Johannes

On 18/09/2023 21:54, Johannes Schindelin via GitGitGadget wrote:
> From: Johannes Schindelin <johannes.schindelin@gmx.de>
> 
> The primary purpose of Git's CMake definition is to allow developing Git
> in Visual Studio. As part of that, the CTest feature allows running
> individual test scripts conveniently in Visual Studio's Test Explorer.
> 
> However, this Test Explorer's design targets object-oriented languages
> and therefore expects the test names in the form
> `<namespace>.<class>.<testname>`. And since we specify the full path
> of the test scripts instead, including the ugly `/.././t/` part, these
> dots confuse the Test Explorer and it uses a large part of the path as
> "namespace".
> 
> Let's just use `t.<name>` instead. This still adds an ugly "Empty
> Namespace" layer by default, but at least the ugly absolute path is now
> gone.

That does sound like a worthwhile improvement. If we used `git.t.<name>` 
would that fix the "Empty Namespace" problem? (probably not worth a 
re-roll on its own)

Best Wishes

Phillip

> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
>   contrib/buildsystems/CMakeLists.txt | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt
> index ad197ea433f..ff1a8cc348f 100644
> --- a/contrib/buildsystems/CMakeLists.txt
> +++ b/contrib/buildsystems/CMakeLists.txt
> @@ -1106,13 +1106,14 @@ file(GLOB test_scripts "${CMAKE_SOURCE_DIR}/t/t[0-9]*.sh")
>   
>   #test
>   foreach(tsh ${test_scripts})
> -	add_test(NAME ${tsh}
> +	string(REGEX REPLACE ".*/(.*)\\.sh" "\\1" test_name ${tsh})
> +	add_test(NAME "t.${test_name}"
>   		COMMAND ${SH_EXE} ${tsh} --no-bin-wrappers --no-chain-lint -vx
>   		WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/t)
>   endforeach()
>   
>   # This test script takes an extremely long time and is known to time out even
>   # on fast machines because it requires in excess of one hour to run
> -set_tests_properties("${CMAKE_SOURCE_DIR}/t/t7112-reset-submodule.sh" PROPERTIES TIMEOUT 4000)
> +set_tests_properties("t.t7112-reset-submodule" PROPERTIES TIMEOUT 4000)
>   
>   endif()#BUILD_TESTING

^ permalink raw reply

* Re: [PATCH v2 7/7] cmake: handle also unit tests
From: Phillip Wood @ 2023-09-22 14:39 UTC (permalink / raw)
  To: Johannes Schindelin via GitGitGadget, git; +Cc: Johannes Schindelin
In-Reply-To: <003d44e9f0d73efae887d6b61ebdffb3c4e0904f.1695070468.git.gitgitgadget@gmail.com>

Hi Johannes

On 18/09/2023 21:54, Johannes Schindelin via GitGitGadget wrote:
> From: Johannes Schindelin <johannes.schindelin@gmx.de>
> 
> The unit tests should also be available e.g. in Visual Studio's Test
> Explorer when configuring Git's source code via CMake.
> 
> Suggested-by: Phillip Wood <phillip.wood@dunelm.org.uk>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>

This looks good to me, it is nice to see it being careful not to run 
t-basic with the other unit tests.

Best Wishes

Phillip

> ---
>   contrib/buildsystems/CMakeLists.txt | 11 +++++++++++
>   1 file changed, 11 insertions(+)
> 
> diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt
> index ff1a8cc348f..35d451856a0 100644
> --- a/contrib/buildsystems/CMakeLists.txt
> +++ b/contrib/buildsystems/CMakeLists.txt
> @@ -981,6 +981,17 @@ foreach(unit_test ${unit_test_PROGRAMS})
>   			PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/t/unit-tests)
>   	endif()
>   	list(APPEND PROGRAMS_BUILT "${unit_test}")
> +
> +	# t-basic intentionally fails tests, to validate the unit-test infrastructure.
> +	# Therefore, it should only be run as part of t0080, which verifies that it
> +	# fails only in the expected ways.
> +	#
> +	# All other unit tests should be run.
> +	if(NOT ${unit_test} STREQUAL "t-basic")
> +		add_test(NAME "unit-tests.${unit_test}"
> +			COMMAND "./${unit_test}"
> +			WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/t/unit-tests)
> +	endif()
>   endforeach()
>   
>   #test-tool

^ permalink raw reply

* Re: [BUG] `git describe` doesn't traverse the graph in topological order
From: Ben Boeckel @ 2023-09-22 15:39 UTC (permalink / raw)
  To: git
In-Reply-To: <ZNffWAgldUZdpQcr@farprobe>

On Sat, Aug 12, 2023 at 15:36:56 -0400, Ben Boeckel wrote:
> I found an issue where `git describe` doesn't find a "closer" tag than
> another tag as the correct one to base the description off of. I have a
> reproducer, but I'll first give details of the real world issue.

Bump. Can anyone provide guidance as to what the best solution to this
might be?

Thanks,

--Ben

^ permalink raw reply

* RE: [BUG] `git describe` doesn't traverse the graph in topological order
From: rsbecker @ 2023-09-22 16:13 UTC (permalink / raw)
  To: 'Ben Boeckel', git
In-Reply-To: <ZQ21NsLmp+xQU5g+@farprobe>

On Friday, September 22, 2023 11:40 AM, Ben Boeckel wrote:
>On Sat, Aug 12, 2023 at 15:36:56 -0400, Ben Boeckel wrote:
>> I found an issue where `git describe` doesn't find a "closer" tag than
>> another tag as the correct one to base the description off of. I have
>> a reproducer, but I'll first give details of the real world issue.
>
>Bump. Can anyone provide guidance as to what the best solution to this might be?

Can you provide details? `git describe` is sensitive to --first-parent and whether the tag has annotations.
--Randall


^ permalink raw reply

* [PATCH v2 2/2] subtree: changing location of commit ignore processing
From: Zach FettersMoore via GitGitGadget @ 2023-09-22 16:25 UTC (permalink / raw)
  To: git; +Cc: Zach FettersMoore, Zach FettersMoore
In-Reply-To: <pull.1587.v2.git.1695399920.gitgitgadget@gmail.com>

From: Zach FettersMoore <zach.fetters@apollographql.com>

Based on feedback from original commit:

-Updated the location of check whether a commit should
be ignored during split processing

-Updated code to better fit coding guidelines

Signed-off-by: Zach FettersMoore <zach.fetters@apollographql.com>
---
 contrib/subtree/git-subtree.sh | 30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)

diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
index e9250dfb019..e69991a9d80 100755
--- a/contrib/subtree/git-subtree.sh
+++ b/contrib/subtree/git-subtree.sh
@@ -778,11 +778,13 @@ ensure_valid_ref_format () {
 		die "fatal: '$1' does not look like a ref"
 }
 
-# Usage: check if a commit from another subtree should be ignored from processing for splits
-should_ignore_subtree_commit () {
-  if [ "$(git log -1 --grep="git-subtree-dir:" $1)" ]
+# Usage: check if a commit from another subtree should be
+# ignored from processing for splits
+should_ignore_subtree_split_commit () {
+  if test -n "$(git log -1 --grep="git-subtree-dir:" $1)"
   then
-    if [[ -z "$(git log -1 --grep="git-subtree-mainline:" $1)" && -z "$(git log -1 --grep="git-subtree-dir: $dir$" $1)" ]]
+    if test -z "$(git log -1 --grep="git-subtree-mainline:" $1)" &&
+			test -z "$(git log -1 --grep="git-subtree-dir: $arg_prefix$" $1)"
     then
       return 0
     fi
@@ -796,11 +798,6 @@ process_split_commit () {
 	local rev="$1"
 	local parents="$2"
 
-    if should_ignore_subtree_commit $rev
-    then
-	    return
-    fi
-
 	if test $indent -eq 0
 	then
 		revcount=$(($revcount + 1))
@@ -980,7 +977,20 @@ cmd_split () {
 	eval "$grl" |
 	while read rev parents
 	do
-		process_split_commit "$rev" "$parents"
+		if should_ignore_subtree_split_commit "$rev"
+		then
+			continue
+		fi
+		parsedParents=''
+		for parent in $parents
+		do
+			should_ignore_subtree_split_commit "$parent"
+			if test $? -eq 1
+			then
+				parsedParents+="$parent "
+			fi
+		done
+		process_split_commit "$rev" "$parsedParents"
 	done || exit $?
 
 	latest_new=$(cache_get latest_new) || exit $?
-- 
gitgitgadget

^ permalink raw reply related

* [PATCH v2 1/2] subtree: fix split processing with multiple subtrees present
From: Zach FettersMoore via GitGitGadget @ 2023-09-22 16:25 UTC (permalink / raw)
  To: git; +Cc: Zach FettersMoore, Zach FettersMoore
In-Reply-To: <pull.1587.v2.git.1695399920.gitgitgadget@gmail.com>

From: Zach FettersMoore <zach.fetters@apollographql.com>

When there are multiple subtrees present in a repository and they are
all using 'git subtree split', the 'split' command can take a
significant (and constantly growing) amount of time to run even when
using the '--rejoin' flag. This is due to the fact that when processing
commits to determine the last known split to start from when looking
for changes, if there has been a split/merge done from another subtree
there will be 2 split commits, one mainline and one subtree, for the
second subtree that are part of the processing. The non-mainline
subtree split commit will cause the processing to always need to search
the entire history of the given subtree as part of its processing even
though those commits are totally irrelevant to the current subtree
split being run.

In the diagram below, 'M' represents the mainline repo branch, 'A'
represents one subtree, and 'B' represents another. M3 and B1 represent
a split commit for subtree B that was created from commit M4. M2 and A1
represent a split commit made from subtree A that was also created
based on changes back to and including M4. M1 represents new changes to
the repo, in this scenario if you try to run a 'git subtree split
--rejoin' for subtree B, commits M1, M2, and A1, will be included in
the processing of changes for the new split commit since the last
split/rejoin for subtree B was at M3. The issue is that by having A1
included in this processing the command ends up needing to processing
every commit down tree A even though none of that is needed or relevant
to the current command and result.

M1
 |	  \	  \
M2	   |	   |
 |     	  A1	   |
M3	   |	   |
 |	   |	  B1
M4	   |	   |

So this commit makes a change to the processing of commits for the split
command in order to ignore non-mainline commits from other subtrees such
as A1 in the diagram by adding a new function
'should_ignore_subtree_commit' which is called during
'process_split_commit'. This allows the split/rejoin processing to still
function as expected but removes all of the unnecessary processing that
takes place currently which greatly inflates the processing time.

Signed-off-by: Zach FettersMoore <zach.fetters@apollographql.com>
---
 contrib/subtree/git-subtree.sh | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
index e0c5d3b0de6..e9250dfb019 100755
--- a/contrib/subtree/git-subtree.sh
+++ b/contrib/subtree/git-subtree.sh
@@ -778,12 +778,29 @@ ensure_valid_ref_format () {
 		die "fatal: '$1' does not look like a ref"
 }
 
+# Usage: check if a commit from another subtree should be ignored from processing for splits
+should_ignore_subtree_commit () {
+  if [ "$(git log -1 --grep="git-subtree-dir:" $1)" ]
+  then
+    if [[ -z "$(git log -1 --grep="git-subtree-mainline:" $1)" && -z "$(git log -1 --grep="git-subtree-dir: $dir$" $1)" ]]
+    then
+      return 0
+    fi
+  fi
+  return 1
+}
+
 # Usage: process_split_commit REV PARENTS
 process_split_commit () {
 	assert test $# = 2
 	local rev="$1"
 	local parents="$2"
 
+    if should_ignore_subtree_commit $rev
+    then
+	    return
+    fi
+
 	if test $indent -eq 0
 	then
 		revcount=$(($revcount + 1))
-- 
gitgitgadget


^ permalink raw reply related

* [PATCH v2 0/2] subtree: fix split processing with multiple subtrees present
From: Zach FettersMoore via GitGitGadget @ 2023-09-22 16:25 UTC (permalink / raw)
  To: git; +Cc: Zach FettersMoore
In-Reply-To: <pull.1587.git.1695067516192.gitgitgadget@gmail.com>

When there are multiple subtrees in a repo and git subtree split --rejoin is
being used for the subtrees, the processing of commits for a new split can
take a significant (and constantly growing) amount of time because the split
commits from other subtrees cause the processing to have to scan the entire
history of the other subtree(s). This patch filters out the other subtree
split commits that are unnecessary for the split commit processing.

Zach FettersMoore (2):
  subtree: fix split processing with multiple subtrees present
  subtree: changing location of commit ignore processing

 contrib/subtree/git-subtree.sh | 29 ++++++++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)


base-commit: bda494f4043963b9ec9a1ecd4b19b7d1cd9a0518
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1587%2FBobaFetters%2Fzf%2Fmulti-subtree-processing-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1587/BobaFetters/zf/multi-subtree-processing-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/1587

Range-diff vs v1:

 1:  43175154a82 = 1:  43175154a82 subtree: fix split processing with multiple subtrees present
 -:  ----------- > 2:  d6811daf7cf subtree: changing location of commit ignore processing

-- 
gitgitgadget

^ permalink raw reply

* [PATCH] git-gui - simplify _open_stdout_stderr
From: Mark Levedahl @ 2023-09-22 16:44 UTC (permalink / raw)
  To: git; +Cc: me, Mark Levedahl Date: Tue, 19 Sep 2023

From: "Mark Levedahl Date: Tue, 19 Sep 2023" <mlevedahl@gmail.com>

Since b792230 ("git-gui: Show a progress meter for checking out files",
2007-07-08), git-gui includes a workaround for Tcl that does not support
using 2>@1 to redirect stderr to stdout. Tcl added such support in
8.4.7, released in 2004, while the later 8.4.14 still predated git-gui.
But, Cygwin was stuck on an 8.4.1 Tcl variant until 2011, hence the need
for this workaround. Commit 7145c65 recently removed much other specific
code for that obsolete Cygwin Tcl/Tk, but missed this piece.

Also, Tcl since 8.5 explicitly supports 2>@1 across all platforms, and
git-gui requires Tcl >= 8.5, further evidence the workaround is
obsolete.  (I did test that 2>@1 works as-expected on current Linux,
Cygwin, and Git For Windows Tcl packages).

Remove the workaround and exploit concat's documented capability to
handle both scalar and list arguments, leaving a much simpler function.
This eliminates any question that cmd might be executed twice.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
---
 git-gui.sh | 21 ++-------------------
 1 file changed, 2 insertions(+), 19 deletions(-)

diff --git a/git-gui.sh b/git-gui.sh
index 8bc8892..a5d008d 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -583,25 +583,8 @@ proc git {args} {
 
 proc _open_stdout_stderr {cmd} {
 	_trace_exec $cmd
-	if {[catch {
-			set fd [open [concat [list | ] $cmd] r]
-		} err]} {
-		if {   [lindex $cmd end] eq {2>@1}
-		    && $err eq {can not find channel named "1"}
-			} {
-			# Older versions of Tcl 8.4 don't have this 2>@1 IO
-			# redirect operator.  Fallback to |& cat for those.
-			# The command was not actually started, so its safe
-			# to try to start it a second time.
-			#
-			set fd [open [concat \
-				[list | ] \
-				[lrange $cmd 0 end-1] \
-				[list |& cat] \
-				] r]
-		} else {
-			error $err
-		}
+	if {[catch {set fd [open [concat | $cmd] r]} err]} {
+		error $err
 	}
 	fconfigure $fd -eofchar {}
 	return $fd
-- 
2.41.0.99.19


^ permalink raw reply related

* Re: [BUG] `git describe` doesn't traverse the graph in topological order
From: 'Ben Boeckel' @ 2023-09-22 16:51 UTC (permalink / raw)
  To: rsbecker; +Cc: git
In-Reply-To: <02d701d9ed6f$abcb4b00$0361e100$@nexbridge.com>

On Fri, Sep 22, 2023 at 12:13:00 -0400, rsbecker@nexbridge.com wrote:
> On Friday, September 22, 2023 11:40 AM, Ben Boeckel wrote:
> >On Sat, Aug 12, 2023 at 15:36:56 -0400, Ben Boeckel wrote:
> >> I found an issue where `git describe` doesn't find a "closer" tag than
> >> another tag as the correct one to base the description off of. I have
> >> a reproducer, but I'll first give details of the real world issue.
> >
> >Bump. Can anyone provide guidance as to what the best solution to this might be?
> 
> Can you provide details? `git describe` is sensitive to --first-parent
> and whether the tag has annotations.

I provided more details and a reproducer in the original email:

    https://lore.kernel.org/git/ZNffWAgldUZdpQcr@farprobe/T/#u

Thanks,

--Ben

^ permalink raw reply

* Re: [PATCH] diff --stat: set the width defaults in a helper function
From: Junio C Hamano @ 2023-09-22 17:04 UTC (permalink / raw)
  To: Dragan Simic; +Cc: git
In-Reply-To: <166396f0a98e248fc3d1236757632c5d648ddc0b.1695364961.git.dsimic@manjaro.org>

Dragan Simic <dsimic@manjaro.org> writes:

> Extract the commonly used initialization of the --stat-width=<width>,
> --stat-name-width=<width> and --stat-graph-with=<width> parameters to the
> internal default values into a helper function, to avoid repeating the same
> initialization code in a few places.

Thanks.

If this is only about settings related to controlling widths of
various elements on diffstat lines, isn't the "std" in name a bit
too broad, though?  init_diffstat_widths(&rev.diffopt) or something
like that might be a better fit.  I dunno if it is a huge deal,
though.

> Add a couple of tests to additionally cover existing configuration options
> diff.statNameWidth=<width> and diff.statGraphWidth=<width> when used by
> git-merge to generate --stat outputs.  This closes the gap in the tests that
> existed previously for the --stat tests, reducing the chances for having
> any regressions introduced by this commit.

Nice.

> While there, perform a bunch of small wording improvements and some minor
> code cleanups in the improved unit test, as spotted, to make it a bit neater
> and to improve its test-level consistency.

Alright.  The last category of changes need somebody else to review
them in addition to myself, as I expect that it would be somewhat
subjective and I tend to be change-averse.

The code changes all looked sensible.

> diff --git a/t/t4052-stat-output.sh b/t/t4052-stat-output.sh
> index beb2ec2a55..aa947d93cf 100755
> --- a/t/t4052-stat-output.sh
> +++ b/t/t4052-stat-output.sh
> @@ -12,32 +12,31 @@ TEST_PASSES_SANITIZE_LEAK=true
>  . ./test-lib.sh
>  . "$TEST_DIRECTORY"/lib-terminal.sh
>  
> -# 120 character name
> -name=aaaaaaaaaa
> -name=$name$name$name$name$name$name$name$name$name$name$name$name
> +# 120-character name
> +printf -v name 'a%.0s' {1..120}

This is a totally unnecessary and unacceptable change.  "-v name"
may be available in the built-in variant found in bash, but you
would likely find that it is missing from other shells.  {1..120} is
also a bash-ism.

And because we are still calling the result a "name" (not
"filename") ...

>  cat >expect72 <<-'EOF'
>   ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1 +
>  EOF
> -test_expect_success "format-patch: small change with long name gives more space to the name" '
> +test_expect_success "format-patch: small change with long filename gives more space to the filename" '

... I do not see the point of this change (and similar ones in the
rest of the patch).  Even the configuration is called statNameWidth
and not statFileNameWidth.  In the context of the tests that check
"stat-output" (that is in the filename of this script), we should be
able to use "name" consistently without causing any confusion, as it
is unlikely to be mistaken with other kinds of "name".

> -test_expect_success "format-patch --cover-letter ignores COLUMNS (big change)" '
> +test_expect_success "format-patch --cover-letter ignores COLUMNS envvar with big change" '

Not wrong per-se, but I wonder if it is necessary to stress that
COLUMNS is an environment variable that tells the programs how wide
a terminal they are showing their output.  A usual shell variable
would not affect the "git" process it runs, and COLUMNS without any
dot in it cannot be our configuration variable, so even without deep
knowledge of tradition, I thought it would be rather obvious.

Same comment for "statNameWidth config"; with fewer number of bytes,
it would be more descriptive to say "diff.statNameWidth".

> -	test_expect_success "$cmd --stat-graph-width with big change" '
> +	test_expect_success "$cmd --stat-graph-width=width with big change" '
>  		git $cmd $args --stat-graph-width=26 >output &&

This may be a good change, especially if there are tests that feed
different parameters and if it helps clarifying which variant is
tested, e.g. "--stat=<width>,<name-width>" vs "--stat=<width>".

Ah, wait, "--stat-graph-width" always takes a single value, so the
above justification does not quite apply.  But still, it is not
making it worse, and because there is another test that is labeled
with "--stat-width=width", being consistent with it has value.

OK.

> -	test_expect_success "$cmd --stat-graph-width --graph with big change" '
> +	test_expect_success "$cmd --stat-graph-width=width --graph with big change" '

Ditto.

Thanks.

^ permalink raw reply

* Re: [BUG] `git describe` doesn't traverse the graph in topological order
From: Kristoffer Haugsbakk @ 2023-09-22 17:11 UTC (permalink / raw)
  To: rsbecker, 'Ben Boeckel', git
In-Reply-To: <02d701d9ed6f$abcb4b00$0361e100$@nexbridge.com>

On Fri, Sep 22, 2023, at 18:13, rsbecker@nexbridge.com wrote:
> On Friday, September 22, 2023 11:40 AM, Ben Boeckel wrote:
>>On Sat, Aug 12, 2023 at 15:36:56 -0400, Ben Boeckel wrote:
>>> I found an issue where `git describe` doesn't find a "closer" tag than
>>> another tag as the correct one to base the description off of. I have
>>> a reproducer, but I'll first give details of the real world issue.
>>
>>Bump. Can anyone provide guidance as to what the best solution to this might be?
>
> Can you provide details? `git describe` is sensitive to --first-parent
> and whether the tag has annotations.
> --Randall

Both of the tags (`v9.3.0.rc0` and `v9.3.0.rc1`) are annotated ones.

-- 
Kristoffer Haugsbakk

^ permalink raw reply

* RE: [BUG] `git describe` doesn't traverse the graph in topological order
From: rsbecker @ 2023-09-22 17:14 UTC (permalink / raw)
  To: 'Ben Boeckel'; +Cc: git
In-Reply-To: <ZQ3GAJ/AHsM9e9a6@farprobe>

On Friday, September 22, 2023 12:51 PM, Ben Boeckel wrote:
>On Fri, Sep 22, 2023 at 12:13:00 -0400, rsbecker@nexbridge.com wrote:
>> On Friday, September 22, 2023 11:40 AM, Ben Boeckel wrote:
>> >On Sat, Aug 12, 2023 at 15:36:56 -0400, Ben Boeckel wrote:
>> >> I found an issue where `git describe` doesn't find a "closer" tag
>> >> than another tag as the correct one to base the description off of.
>> >> I have a reproducer, but I'll first give details of the real world issue.
>> >
>> >Bump. Can anyone provide guidance as to what the best solution to this might be?
>>
>> Can you provide details? `git describe` is sensitive to --first-parent
>> and whether the tag has annotations.
>
>I provided more details and a reproducer in the original email:
>
>    https://lore.kernel.org/git/ZNffWAgldUZdpQcr@farprobe/T/#u

As I indicated, the command is sensitive to --first-parent. For example:

$ git describe
v9.3.0.rc0-520-g1339e86833
$ git describe --first-parent
v9.0.0.rc1-5143-g1339e86833

You have multiple parents in your tree of HEAD. This is probably confusing the interpretation. The most closely connected tag to HEAD is v9.3.0.rc0, from what I can read from your tree. Dates and times of the commit do not participate in this determination, to my knowledge. You can force selection of a subset of tags by specifying the --match=pattern argument.

There appears to be a merge at 446120fd88 which brings v9.3.0.rc0 closer to HEAD than v9.3.0.rc1.


^ permalink raw reply

* Re: [BUG] `git describe` doesn't traverse the graph in topological order
From: Kristoffer Haugsbakk @ 2023-09-22 17:35 UTC (permalink / raw)
  To: 'Ben Boeckel', git
In-Reply-To: <ZQ21NsLmp+xQU5g+@farprobe>

Looks related:

Link: https://public-inbox.org/git/CABPp-BH2zuYe87xhjdp5v7M7i+EfEgLHAZgwfzJUAxGk1CFgfA@mail.gmail.com/
Message-ID: CABPp-BH2zuYe87xhjdp5v7M7i+EfEgLHAZgwfzJUAxGk1CFgfA@mail.gmail.com
Via: https://stackoverflow.com/questions/72886894/git-describe-is-not-returning-the-expected-tag

-- 
Kristoffer Haugsbakk

^ permalink raw reply

* Re: [BUG] `git describe` doesn't traverse the graph in topological order
From: 'Ben Boeckel' @ 2023-09-22 17:38 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:
> On Friday, September 22, 2023 12:51 PM, Ben Boeckel wrote:
> >On Fri, Sep 22, 2023 at 12:13:00 -0400, rsbecker@nexbridge.com wrote:
> >> On Friday, September 22, 2023 11:40 AM, Ben Boeckel wrote:
> >> >On Sat, Aug 12, 2023 at 15:36:56 -0400, Ben Boeckel wrote:
> >> >> I found an issue where `git describe` doesn't find a "closer" tag
> >> >> than another tag as the correct one to base the description off of.
> >> >> I have a reproducer, but I'll first give details of the real world issue.
> >> >
> >> >Bump. Can anyone provide guidance as to what the best solution to this might be?
> >>
> >> Can you provide details? `git describe` is sensitive to --first-parent
> >> and whether the tag has annotations.
> >
> >I provided more details and a reproducer in the original email:
> >
> >    https://lore.kernel.org/git/ZNffWAgldUZdpQcr@farprobe/T/#u
> 
> As I indicated, the command is sensitive to --first-parent. For example:
> 
> $ git describe
> v9.3.0.rc0-520-g1339e86833
> $ git describe --first-parent
> v9.0.0.rc1-5143-g1339e86833

Sorry, but this is just even more confusing to me as neither tag is on
the first-parent history of `HEAD`.

> You have multiple parents in your tree of HEAD. This is probably
> confusing the interpretation. The most closely connected tag to HEAD
> is v9.3.0.rc0, from what I can read from your tree. Dates and times of
> the commit do not participate in this determination, to my knowledge.
> You can force selection of a subset of tags by specifying the
> --match=pattern argument.

I don't see how that is possible since v9.3.0.rc0 is v9.3.0.rc1~2. Note
the "not on the tag" commit count for the descriptions being wildly
different.

> There appears to be a merge at 446120fd88 which brings v9.3.0.rc0
> closer to HEAD than v9.3.0.rc1.

That is still giving an incorrect description as there are *fewer*
commits not on rc1 than rc0 relative to HEAD (as rc0 is an ancestor of
rc1).

Thanks,

--Ben

^ permalink raw reply

* Re: [BUG] `git describe` doesn't traverse the graph in topological order
From: 'Ben Boeckel' @ 2023-09-22 17:43 UTC (permalink / raw)
  To: Kristoffer Haugsbakk; +Cc: git
In-Reply-To: <8f034aa3-67ac-456c-a754-b0a86666bcdb@app.fastmail.com>

On Fri, Sep 22, 2023 at 19:35:01 +0200, Kristoffer Haugsbakk wrote:
> Looks related:
> 
> Link: https://public-inbox.org/git/CABPp-BH2zuYe87xhjdp5v7M7i+EfEgLHAZgwfzJUAxGk1CFgfA@mail.gmail.com/
> Message-ID: CABPp-BH2zuYe87xhjdp5v7M7i+EfEgLHAZgwfzJUAxGk1CFgfA@mail.gmail.com
> Via: https://stackoverflow.com/questions/72886894/git-describe-is-not-returning-the-expected-tag

Thanks. It seems that these discussions previously determined the same
(painful) pill:

SZEDER Gábor at https://lore.kernel.org/git/20191008123156.GG11529@szeder.dev/:

    I think the proper way to fix this issue would be to make 'git
    describe' traverse the history in topographical order.  Alas, I'm
    afraid this would result in a noticable performance penalty on big
    histories without a commit graph.

The `sleep 1` is probably the remedy we'll use if time to actually fix
this doesn't come up (or the "proper" fix is deemed as "too expensive").

Thanks for the links,

--Ben

^ 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