Commit Graph

74087 Commits

Author SHA1 Message Date
John Cai
cfd971520e refs: keep track of unresolved reference value in iterators
Since ref iterators do not hold onto the direct value of a reference
without resolving it, the only way to get ahold of a direct value of a
symbolic ref is to make a separate call to refs_read_symbolic_ref.

To make accessing the direct value of a symbolic ref more efficient,
let's save the direct value of the ref in the iterators for both the
files backend and the reftable backend.

Signed-off-by: John Cai <johncai86@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-08-09 08:47:33 -07:00
Junio C Hamano
39bf06adf9 Git 2.46
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-07-29 07:14:09 -07:00
Junio C Hamano
2ab3396b4e l10n-2.46.0-rnd2
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE37vMEzKDqYvVxs51k24VDd1FMtUFAmamM4AACgkQk24VDd1F
 MtVLXhAAsyc+AsclTNXqFjfkeTFV2U4lGcn8KcudgUYRZ3EJnHc3q4sFjqKI05vS
 9QvbSglsIcJmpJ+/RtidqjAd9PNihvVBZKMyKsccPUmj7oHEdROqAWonWRfa7H8a
 S8qAQVVp3iJyJRHkVKs9qbRLu4F4V4cxlEEu6CPqnr54AhxUUQT5/CfhvYOnWtFT
 ajrj7L7hjnh8N0RhQwy+ae47jJknAey7Cs7Pneo7l4MOrbNoGGE8QiRK5xl9bykE
 k+tdZLOz7ZjmaEyCWwyWs3q2V+45Pxf1ctFMGjvEfNCQz9fzjy90EJ5LUM3vqgwa
 xJZiA1axJ9FSphealxuIGCeCiAtzlQG3THMlQUTAGkT0Mpufcp2f75sFPM+OPbZI
 uwQxAKWUq4Iu6TelO43efr3gzIl7j7N2I15vcJs7kyFD7IKWWKH/oQJht6swvYzc
 HS76PBSJ4JZSYUvskPP4DWmUUGXFrJBFGmhwj6t+TJEVDcgdcGX7/bR6QpR+kW0V
 Qx6vVUUcG8W3dpmiX9vEwt2ZgDjFig9K/MVQMBn2R22sZZ2JwRam7yigIW5ibvPc
 Zl81C+Y2vc5NwSoP7TiY7zyZG3cFIsZSRQrETJxgyZgGg1bI7OUkWlev6BycicHI
 1AXX96PysXDZgRdOQpPhRU4MNjItLZPi6VEWC3zCURywtzrjJvs=
 =99A7
 -----END PGP SIGNATURE-----

Merge tag 'l10n-2.46.0-rnd2' of https://github.com/git-l10n/git-po

l10n-2.46.0-rnd2

* tag 'l10n-2.46.0-rnd2' of https://github.com/git-l10n/git-po:
  l10n: zh_CN: updated translation for 2.46
  l10n: sv.po: Update Swedish translation
  l10n: zh_TW: Git 2.46
  l10n: Update German translation
  l10n: vi: Updated translation for 2.46
  l10n: uk: v2.46 update
  l10n: bg.po: Updated Bulgarian translation (5734t)
  l10n: fr: v2.46.0
  l10n: tr: Update Turkish translations
  l10n: po-id for 2.46
2024-07-29 07:11:16 -07:00
Teng Long
de86879ace l10n: zh_CN: updated translation for 2.46
Signed-off-by: Teng Long <dyroneteng@gmail.com>
Co-authored-by: 依云 <lilydjwg@gmail.com>
Reviewed-by: 依云 <lilydjwg@gmail.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2024-07-28 19:52:41 +08:00
Peter Krefting
c28545a6e2 l10n: sv.po: Update Swedish translation
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2024-07-27 17:08:01 +08:00
Jiang Xin
5b29a57f54 Merge branch 'l10n/zh-TW/2024-07-24' of github.com:l10n-tw/git-po
* 'l10n/zh-TW/2024-07-24' of github.com:l10n-tw/git-po:
  l10n: zh_TW: Git 2.46
2024-07-27 16:27:25 +08:00
Jiang Xin
d02895cecc Merge branch 'l10n-de-2.46' of github.com:ralfth/git
* 'l10n-de-2.46' of github.com:ralfth/git:
  l10n: Update German translation
2024-07-27 16:25:13 +08:00
Jiang Xin
c7dce0fde1 Merge branch 'vi-2.46' of github.com:Nekosha/git-po
* 'vi-2.46' of github.com:Nekosha/git-po:
  l10n: vi: Updated translation for 2.46
2024-07-27 16:24:48 +08:00
Jiang Xin
d8e2f4d1b1 Merge branch '2.46-uk-update' of github.com:arkid15r/git-ukrainian-l10n
* '2.46-uk-update' of github.com:arkid15r/git-ukrainian-l10n:
  l10n: uk: v2.46 update
2024-07-27 16:21:09 +08:00
Jiang Xin
caa3bf1503 Merge branch 'master' of github.com:alshopov/git-po
* 'master' of github.com:alshopov/git-po:
  l10n: bg.po: Updated Bulgarian translation (5734t)
2024-07-27 16:20:29 +08:00
Jiang Xin
c3dad83ba6 Merge branch 'l10N_fr_2.46' of github.com:jnavila/git
* 'l10N_fr_2.46' of github.com:jnavila/git:
  l10n: fr: v2.46.0
2024-07-27 16:18:53 +08:00
Jiang Xin
b81d65b6ad Merge branch 'tr-l10n' of github.com:bitigchi/git-po
* 'tr-l10n' of github.com:bitigchi/git-po:
  l10n: tr: Update Turkish translations
2024-07-27 16:17:45 +08:00
Jiang Xin
a956262045 Merge branch 'po-id' of github.com:bagasme/git-po
* 'po-id' of github.com:bagasme/git-po:
  l10n: po-id for 2.46
2024-07-27 16:16:43 +08:00
Yi-Jyun Pan
15b02a3d4b
l10n: zh_TW: Git 2.46
Co-authored-by: Lumynous <lumynou5.tw@gmail.com>
Co-authored-by: Ngoo Ka-iu <willy04wu69@gmail.com>
Co-authored-by: Nightfeather Chen <slat@nightfeather.me>
Co-authored-by: Kisaragi Hiu <mail@kisaragi-hiu.com>
Co-authored-by: hms5232 <hms5232@hhming.moe>
Signed-off-by: Yi-Jyun Pan <pan93412@gmail.com>
2024-07-27 15:01:30 +08:00
Ralf Thielow
be784de1c4 l10n: Update German translation
Reviewed-by: Matthias Rüster <matthias.ruester@gmail.com>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2024-07-26 17:48:59 +02:00
Vũ Tiến Hưng
db5104501b l10n: vi: Updated translation for 2.46
Signed-off-by: Vũ Tiến Hưng <newcomerminecraft@gmail.com>
2024-07-26 11:06:37 +07:00
Arkadii Yakovets
dadb75a2dd
l10n: uk: v2.46 update
Co-authored-by: Kate Golovanova <kate@kgthreads.com>
Signed-off-by: Arkadii Yakovets <ark@cho.red>
Signed-off-by: Kate Golovanova <kate@kgthreads.com>
2024-07-24 14:34:25 -07:00
Junio C Hamano
ad57f148c6 Git 2.46-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-07-23 16:54:35 -07:00
Junio C Hamano
c89facd58e Merge branch 'ps/ref-storage-migration-fix'
Hotfix for a topic already in -rc.

* ps/ref-storage-migration-fix:
  refs: fix format migration on Cygwin
2024-07-23 16:54:34 -07:00
Junio C Hamano
6fcd72d5ad Merge branch 'js/doc-markup-updates-fix'
Work around asciidoctor's css that renders `monospace` material
in the SYNOPSIS section of manual pages as block elements.

* js/doc-markup-updates-fix:
  Doc: fix Asciidoctor css workaround
  asciidoctor: fix `synopsis` rendering
2024-07-23 16:54:34 -07:00
Junio C Hamano
37b959ecfb Merge branch 'ja/doc-markup-updates-fix'
Fix documentation mark-up regression in 2.45.

* ja/doc-markup-updates-fix:
  doc: git-clone fix discrepancy between asciidoc and asciidoctor
2024-07-23 16:54:33 -07:00
Junio C Hamano
ec9d46588e Merge branch 'ds/midx-write-repack-fix'
Repacking a repository with multi-pack index started making stupid
pack selections in Git 2.45, which has been corrected.

* ds/midx-write-repack-fix:
  midx-write: revert use of --stdin-packs
  t5319: add failing test case for repack/expire
2024-07-23 16:54:33 -07:00
Junio C Hamano
d44ce6ddd5 Doc: fix Asciidoctor css workaround
The previous step introduced docinfo.html to be used to tweak the
CSS used by the asciidoctor, that by default renders <code> inside
<pre> as a block element, breaking the SYNOPSIS section of a few
pages that adopted a new convention we use since Git 2.45.

But in this project, HTML files are all generated.  We do not force
any human to write HTML by hand, which is an unusual and cruel
punishment.  "*.html" is in the .gitignore file, and "make clean"
removes them.  Having a tracked .html file makes "make clean" make
the tree dirty by removing the tracked docinfo.html file.

Let's do an obvious, minimum and stupid workaround to generate that
file at runtime instead.  The mark-up is being rethought in a major
way for the next development cycle, and the CSS workaround we added
in the previous step may have to adjusted, possibly in a large way,
anyway.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-07-23 11:02:52 -07:00
Patrick Steinhardt
09c817383f refs: fix format migration on Cygwin
It was reported that t1460-refs-migrate.sh fails when using Cygwin with
errors like the following:

    error: could not link file '.git/ref_migration.sr9pEF/reftable' to '.git/reftable': Permission denied

As some debugging surfaced, the root cause of this is that some files of
the newly-initialized ref store are still open when the target format is
the "reftable" format, and Cygwin refuses to rename open files.

Fix this issue by closing the new ref store before renaming its files
into place. This is a slight change in behaviour compared to before,
where we kept the new ref store open and then updated the repository's
ref store to point to it.

While we could re-open the new ref store after we have moved files
around, this is ultimately unnecessary. We know that the only user of
`repo_migrate_ref_storage_format()` is the git-refs(1) command, and it
won't access the ref store after it has been migrated anyway. So
reinitializing the ref store would be a waste of time. Regardless of
that it is still sensible to leave the repository in a consistent state.
But instead of reinitializing the ref store, we can simply unset the
repo's ref store altogether and let `get_main_ref_store()` lazily
initialize the new ref store as required.

Reported-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-07-23 08:58:03 -07:00
Johannes Schindelin
8bfc3e47a7 asciidoctor: fix synopsis rendering
Since 76880f0510 (doc: git-clone: apply new documentation formatting
guidelines, 2024-03-29), the synopsis of `git clone`'s manual page is
rendered differently than before; Its parent commit did the same for
`git init`.

The result looks quite nice. When rendered with AsciiDoc, that is. When
rendered using AsciiDoctor and displayed in a graphical web browser such
as Firefox, Chrome, Edge, etc, the result is quite unpleasant to my eye,
reading something like this:

	SYNOPSIS

	 git clone
	  [
	 --template=
	 <template-directory>]
		  [
	 -l
	 ] [
	 -s
	 ] [
	 --no-hardlinks
	 ] [
	 -q
	 ] [
	[... continuing like this ...]

The reason is that AsciiDoctor's default style sheet contains this (see
https://github.com/asciidoctor/asciidoctor/blob/854923b15533/src/stylesheets/asciidoctor.css#L519-L521
for context):

	pre > code {
	  display: block;
	}

It is this `display: block` that forces the parts that are enclosed in
`<code>` tags (such as the `git clone` or the `--template=` part) to be
rendered on their own line.

Side note: This seems not to affect console web browsers like `lynx` or
`w3m`, most likely because most style sheet directions cannot be
respected in text terminals and therefore they seem to punt on style
sheets altogether.

To fix this, let's apply the method recommended by AsciiDoctor in
https://docs.asciidoctor.org/asciidoctor/latest/html-backend/default-stylesheet/#customize-docinfo
to partially override AsciiDoctor's default style sheet so that the
`<code>` sections of the synopsis are no longer each rendered on their
own, individual lines.

This fixes https://github.com/git-for-windows/git/issues/5063.

Even on the Git home page, where AsciiDoctor's default stylesheet is
_not_ used, this change resulted in some unpleasant rendering where not
only the font is changed for the `<code>` sections of the synopsis, but
padding and a different background color make the visual impression
quite uneven. This has been addressed in the meantime, via
https://github.com/git/git-scm.com/commit/a492d0565512.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-07-22 14:13:44 -07:00
Alexander Shopov
9200fe2a93 l10n: bg.po: Updated Bulgarian translation (5734t)
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2024-07-21 22:31:10 +03:00
Jean-Noël Avila
6474da0aa4 doc: git-clone fix discrepancy between asciidoc and asciidoctor
Asciidoc.py does not have the concept of generalized roles, whereas
asciidoctor interprets [foo]`blah` as blah with role foo in the
synopsis, making in effect foo disappear in the output. Note that
square brackets not directly followed by an inline markup do not
define a role, which is why we do not have the issue on other parts of
the documentation.

In order to get a consistant result across asciidoctor and
asciidoc.py, the hack is to use the {empty} entity
to split the bracket part from the inline format part.

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-07-20 16:24:12 -07:00
Jean-Noël Avila
ebe8720ed4 l10n: fr: v2.46.0
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
2024-07-19 20:26:18 +02:00
Derrick Stolee
8fb6d11fad midx-write: revert use of --stdin-packs
This reverts b7d6f23a17 (midx-write.c: use `--stdin-packs` when
repacking, 2024-04-01) and then marks the test created in the previous
change as passing.

The fundamental issue with the reverted change is that the focus on
pack-files separates the object selection from how the multi-pack-index
selects a single pack-file for an object ID with multiple copies among
the tracked pack-files.

The change was made with the intention of improving delta compression in
the resulting pack-file, but that can be resolved with the existing
object list mechanism. There are other potential pitfalls of doing an
object walk at this time if the repository is a blobless partial clone,
and that will require additional testing on top of the one that changes
here.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
Acked-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-07-19 07:19:01 -07:00
Emir SARI
ebd7b1ebd5 l10n: tr: Update Turkish translations
Signed-off-by: Emir SARI <emir_sari@icloud.com>
2024-07-19 14:03:18 +03:00
Bagas Sanjaya
68f66648de l10n: po-id for 2.46
Update following components:

  * builtin/clone.c
  * builtin/config.c
  * builtin/for-each-repo.c
  * builtin/refs.c
  * command-list.h
  * commit-graph.c
  * http.c
  * pack-bitmap-write.c
  * pack-bitmap.c
  * promisor-remote.c
  * refs.c
  * sequencer.c

Translate following new components:

  * pseudo-merge.c
  * refs/files-backend.c

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
2024-07-19 14:28:41 +07:00
Derrick Stolee
738fab524c t5319: add failing test case for repack/expire
Git 2.45.0 included the change b7d6f23a17 (midx-write.c: use
`--stdin-packs` when repacking, 2024-04-01) which caused the 'git
multi-pack-index repack' command to use 'git pack-objects --stdin-packs'
instead of listing the objects to repack. While this change was
motivated by efficient cross-process communication and the ability to
improve delta compression, it breaks a fundamental function of the
'incremental-repack' task that is enabled by default in Scalar clones or
Git repositories that run 'git maintenance start'.

The 'incremental-repack' task performs a two-step process of the
'expire' and 'repack' subcommands of the 'git multi-pack-index' builtin.
The 'expire' command removes any pack-files listed in the
multi-pack-index but without any referenced objects. The 'repack' task
then finds a batch of pack-files to repack and sends their objects to
'git pack-objects'. Both the pack-files chosen for the batch and the
objects chosen to repack are based on the ones that the multi-pack-index
references. Objects that appear in a pack-file but have a duplicate copy
in a newer pack-file are not considered in this case. Since the
multi-pack-index references only the newest copy of an object, this
allows the next 'incremental-repack' task to remove the pack-files in
the next 'expire' task. This delay is intentional due to how Windows
handles may block deletion of files with open read handles.

However, the mentioned commit changed this behavior to divorce the set
of objects referenced by the multi-pack-index and instead use a set of
"included" and "excluded" pack-files in the 'git pack-objects' builtin.
When a pack-file is selected as "included", only the objects it contains
but are not in any "excluded" pack-files are considered for repacking.
This has led to client repositories failing to remove old pack-files as
they still have some referenced objects. This grows over time until the
point that Git is trying to repack the same pack-files over and over.

For now, create a test case that demonstrates the expected behavior, but
also fails in its final line. The setup here it attempting to recreate a
typical situation for a repository that uses a blobless partial clone.
There would be a large initial pack-file from the clone that is never
selected in the 'repack' batch. There are other pack-files that have a
combination of new objects from incremental fetches and possibly blobs
that are not connected to those incremental fetches; these blobs could
be filled in from commands like 'git checkout' or 'git blame'. The
pack-files also have some overlap on purpose so test-1 has some
duplicates in test-2 and test-2 has some duplicates in test-3.

At the end of the test, the test-2 pack-file still exists though it
should have been expired. This test will pass when reverting the
offending commit.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-07-18 14:53:27 -07:00
Junio C Hamano
d19b6cd2dd Git 2.46-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-07-18 08:30:28 -07:00
Junio C Hamano
1aac20a4b0 Merge branch 'jk/am-retry'
Test fix as a follow-up to an already graduated topic.

* jk/am-retry:
  t4153: stop redirecting input from /dev/zero
2024-07-18 08:30:27 -07:00
Junio C Hamano
d07b5d9ad5 Merge branch 'tb/pseudo-merge-reachability-bitmap'
Doc update.

* tb/pseudo-merge-reachability-bitmap:
  Documentation/gitpacking: make sample configs listing blocks
2024-07-18 08:30:27 -07:00
Junio C Hamano
ef2447d97c Merge branch 'ps/pseudo-ref-terminology'
Doc update.

* ps/pseudo-ref-terminology:
  Documentation/glossary: fix double word
2024-07-18 08:30:26 -07:00
Junio C Hamano
ca12618b7b Merge branch 'tb/doc-max-tree-depth-fix'
Doc update.

* tb/doc-max-tree-depth-fix:
  Documentation: fix default value for core.maxTreeDepth
2024-07-18 08:30:26 -07:00
Junio C Hamano
f9e4f2599c Merge branch 'ch/refs-without-the-repository-fix'
Comment fix.

* ch/refs-without-the-repository-fix:
  refs: correct the version numbers in a comment
2024-07-18 08:30:25 -07:00
Junio C Hamano
1c4a234a1c Post 2.46-rc0 batch #3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-07-17 10:47:27 -07:00
Junio C Hamano
219719cc55 Merge branch 'js/unit-test-oidtree-cmake-fix'
Build fix.

* js/unit-test-oidtree-cmake-fix:
  cmake: fix build of `t-oidtree`
2024-07-17 10:47:27 -07:00
Junio C Hamano
76e018b9a1 Merge branch 'js/var-git-shell-path'
"git var GIT_SHELL_PATH" should report the path to the shell used
to spawn external commands, but it didn't do so on Windows, which
has been corrected.

* js/var-git-shell-path:
  var(win32): do report the GIT_SHELL_PATH that is actually used
  run-command: declare the `git_shell_path()` function globally
  run-command(win32): resolve the path to the Unix shell early
  mingw(is_msys2_sh): handle forward slashes in the `sh.exe` path, too
  win32: override `fspathcmp()` with a directory separator-aware version
  strvec: declare the `strvec_push_nodup()` function globally
  run-command: refactor getting the Unix shell path into its own function
2024-07-17 10:47:27 -07:00
Junio C Hamano
c7e8aaee98 Merge branch 'ps/doc-http-empty-cookiefile'
What happens when http.cookieFile gets the special value "" has
been clarified in the documentation.

* ps/doc-http-empty-cookiefile:
  doc: update http.cookieFile with in-memory cookie processing
2024-07-17 10:47:26 -07:00
Junio C Hamano
e13feda98f Merge branch 'kn/push-empty-fix'
"git push '' HEAD:there" used to hit a BUG(); it has been corrected
to die with "fatal: bad repository ''".

* kn/push-empty-fix:
  builtin/push: call set_refspecs after validating remote
2024-07-17 10:47:26 -07:00
Junio C Hamano
dd6d10285b Merge branch 'jc/http-cookiefile'
The http.cookieFile and http.saveCookies configuration variables
have a few values that need to be avoided, which are now ignored
with warning messages.

* jc/http-cookiefile:
  http.c: cookie file tightening
2024-07-17 10:47:26 -07:00
Junio C Hamano
b19a8c00c6 Merge branch 'jk/test-body-in-here-doc'
The test framework learned to take the test body not as a single
string but as a here-document.

* jk/test-body-in-here-doc:
  t/.gitattributes: ignore whitespace in chainlint expect files
  t: convert some here-doc test bodies
  test-lib: allow test snippets as here-docs
  chainlint.pl: add tests for test body in heredoc
  chainlint.pl: recognize test bodies defined via heredoc
  chainlint.pl: check line numbers in expected output
  chainlint.pl: force CRLF conversion when opening input files
  chainlint.pl: do not spawn more threads than we have scripts
  chainlint.pl: only start threads if jobs > 1
  chainlint.pl: add test_expect_success call to test snippets
2024-07-17 10:47:25 -07:00
Junio C Hamano
6da44da936 Merge branch 'rj/test-sanitize-leak-log-fix'
Tests that use GIT_TEST_SANITIZE_LEAK_LOG feature got their exit
status inverted, which has been corrected.

* rj/test-sanitize-leak-log-fix:
  test-lib: GIT_TEST_SANITIZE_LEAK_LOG enabled by default
  test-lib: fix GIT_TEST_SANITIZE_LEAK_LOG
2024-07-17 10:47:24 -07:00
Taylor Blau
616e94ca24 Documentation: fix default value for core.maxTreeDepth
When `core.maxTreeDepth` was originally introduced via be20128bfa (add
core.maxTreeDepth config, 2023-08-31), its default value was 4096.

There have since been a couple of updates to its default value that were
not reflected in the documentation for `core.maxTreeDepth`:

  - 4d5693ba05 (lower core.maxTreeDepth default to 2048, 2023-08-31)
  - b64d78ad02 (max_tree_depth: lower it for MSVC to avoid stack
    overflows, 2023-11-01)

Commit 4d5693ba05 lowers the default to 2048 for platforms with smaller
stack sizes, and commit b64d78ad02 lowers the default even further when
Git is compiled with MSVC.

Neither of these changes were reflected in the documentation, which I
noticed while merging newer releases back into GitHub's private fork
(which contained the original implementation of `core.maxTreeDepth`).

Update the documentation to reflect what the platform-specific default
values are.

Noticed-by: Keith W. Campbell <keithc@ca.ibm.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-07-17 08:51:14 -07:00
Martin Ågren
b25a2e8f37 Documentation/glossary: fix double word
Remove a spurious "that".

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-07-17 08:49:09 -07:00
Martin Ågren
df8b05672c Documentation/gitpacking: make sample configs listing blocks
This document contains a few sample config snippets. At least with
Asciidoctor, the section headers are rendered *more* indented than the
variables that follow:

       [bitmapPseudoMerge "all"]
    pattern = "refs/"
    ...

To address this, wrap these listings in AsciiDoc listing blocks. Remove
the indentation from the section headings. This is similar to how we
handle such sample config elsewhere, e.g., in config.txt.

While we're here, fix the nearby "wiht" typo.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-07-17 08:48:30 -07:00
Jeff King
2a959ec21a t4153: stop redirecting input from /dev/zero
Commit 852a171018 (am: let command-line options override saved options,
2015-08-04) redirected a few "git am" invocations from /dev/zero, even
though it did not expect "am" to read the input. This was necessary at
the time because those tests used test_terminal, and as described in
18d8c26930 (test_terminal: redirect child process' stdin to a pty,
2015-08-04):

  Note that due to the way the code is structured, the child's stdin
  pseudo-tty will be closed when we finish reading from our stdin. This
  means that in the common case, where our stdin is attached to /dev/null,
  the child's stdin pseudo-tty will be closed immediately. Some operations
  like isatty(), which git-am uses, require the file descriptor to be
  open, and hence if the success of the command depends on such functions,
  test_terminal's stdin should be redirected to a source with large amount
  of data to ensure that the child's stdin is not closed, e.g.

              test_terminal git am --3way </dev/zero

But we later dropped the use of test_terminal in 53ce2e3f0a (am: add
explicit "--retry" option, 2024-06-06). That commit dropped one of the
redirections from /dev/zero but not the other.

In theory the remaining one should not cause any problems, but it turns
out that at least one platform (NonStop) does not have /dev/zero at all.
We never noticed before because it also did not pass the TTY prereq,
meaning these tests were not run at all there until 53ce2e3f0a.

So let's drop the useless /dev/zero mention. There are others in the
test suite, but they are run only for tests marked with EXPENSIVE (so
not typically by default).

Reported-by: Randall S. Becker <rsbecker@nexbridge.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-07-17 08:31:27 -07:00