Commit Graph

74140 Commits

Author SHA1 Message Date
Patrick Steinhardt
61419a42f6 path: expose do_git_common_path() as repo_common_pathv()
With the same reasoning as the preceding commit, expose the function
`do_git_common_path()` as `repo_common_pathv()`. While at it, reorder
parameters such that they match the order we have in `repo_git_pathv()`.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-08-13 10:01:00 -07:00
Patrick Steinhardt
b6c6bfef31 path: expose do_git_path() as repo_git_pathv()
We're about to move functions of the "path" subsytem that do not use a
`struct repository` into "path.h" as static inlined functions. This will
require us to call `do_git_path()`, which is internal to "path.c".

Expose the function as `repo_git_pathv()` to prepare for the change.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-08-13 10:01:00 -07:00
Junio C Hamano
92a29c2c39 Merge branch 'ps/refs-wo-the-repository' into ps/config-wo-the-repository
* ps/refs-wo-the-repository:
  refs/reftable: stop using `the_repository`
  refs/packed: stop using `the_repository`
  refs/files: stop using `the_repository`
  refs/files: stop using `the_repository` in `parse_loose_ref_contents()`
  refs: stop using `the_repository`
2024-08-07 14:13:20 -07:00
Junio C Hamano
406f326d27 The second batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-08-01 10:18:13 -07:00
Junio C Hamano
363337e6eb Merge branch 'as/show-ref-option-help-update'
A few descriptions in "git show-ref -h" have been clarified.

* as/show-ref-option-help-update:
  show-ref: improve short help messages of options
2024-08-01 10:18:12 -07:00
Junio C Hamano
f08cd19dca Merge branch 'jc/doc-reviewing-guidelines-positive-reviews'
The reviewing guidelines document now explicitly encourages people
to give positive reviews and how.

* jc/doc-reviewing-guidelines-positive-reviews:
  ReviewingGuidelines: encourage positive reviews more
2024-08-01 10:18:12 -07:00
Junio C Hamano
5617a8eee8 Merge branch 'jc/doc-rebase-fuzz-vs-offset-fix'
"git rebase --help" referred to "offset" (the difference between
the location a change was taken from and the change gets replaced)
incorrectly and called it "fuzz", which has been corrected.

* jc/doc-rebase-fuzz-vs-offset-fix:
  doc: difference in location to apply is "offset", not "fuzz"
2024-08-01 10:18:11 -07:00
Junio C Hamano
891ee3b9db Start the 2.47 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-07-31 13:34:21 -07:00
Junio C Hamano
3ff9ceca89 Merge branch 'jc/how-to-maintain-updates'
Doc update.

* jc/how-to-maintain-updates:
  howto-maintain: update daily tasks
  howto-maintain: cover a whole development cycle
2024-07-31 13:34:21 -07:00
Junio C Hamano
d18eb5ba79 Merge branch 'tn/doc-commit-fix'
Docfix.

* tn/doc-commit-fix:
  doc: remove dangling closing parenthesis
2024-07-31 13:34:20 -07:00
Junio C Hamano
ca9221c17d Merge branch 'jc/doc-one-shot-export-with-shell-func'
It has been documented that we avoid "VAR=VAL shell_func" and why.

* jc/doc-one-shot-export-with-shell-func:
  CodingGuidelines: document a shell that "fails" "VAR=VAL shell_func"
2024-07-31 13:34:20 -07:00
Junio C Hamano
6c70d65712 Merge branch 'cp/unit-test-reftable-merged'
Another reftable test has been ported to use the unit test framework.

* cp/unit-test-reftable-merged:
  t-reftable-merged: add test for REFTABLE_FORMAT_ERROR
  t-reftable-merged: use reftable_ref_record_equal to compare ref records
  t-reftable-merged: add tests for reftable_merged_table_max_update_index
  t-reftable-merged: improve the const-correctness of helper functions
  t-reftable-merged: improve the test t_merged_single_record()
  t: harmonize t-reftable-merged.c with coding guidelines
  t: move reftable/merged_test.c to the unit testing framework
2024-07-31 13:34:19 -07:00
Junio C Hamano
468ebc52f3 Merge branch 'kn/ci-clang-format'
A CI job that use clang-format to check coding style issues in new
code has been added.

* kn/ci-clang-format:
  ci/style-check: add `RemoveBracesLLVM` in CI job
  check-whitespace: detect if no base_commit is provided
  ci: run style check on GitHub and GitLab
  clang-format: formalize some of the spacing rules
  clang-format: avoid spacing around bitfield colon
  clang-format: indent preprocessor directives after hash
2024-07-31 13:34:18 -07:00
Junio C Hamano
90139ae377 Merge branch 'jc/checkout-no-op-switch-errors'
"git checkout --ours" (no other arguments) complained that the
option is incompatible with branch switching, which is technically
correct, but found confusing by some users.  It now says that the
user needs to give pathspec to specify what paths to checkout.

* jc/checkout-no-op-switch-errors:
  checkout: special case error messages during noop switching
2024-07-31 13:34:18 -07:00
Junio C Hamano
d71121c060 Merge branch 'pw/add-patch-with-suppress-blank-empty'
"git add -p" by users with diff.suppressBlankEmpty set to true
failed to parse the patch that represents an unmodified empty line
with an empty line (not a line with a single space on it), which
has been corrected.

* pw/add-patch-with-suppress-blank-empty:
  add-patch: use normalize_marker() when recounting edited hunk
  add-patch: handle splitting hunks with diff.suppressBlankEmpty
2024-07-31 13:34:17 -07:00
Junio C Hamano
2794ac123d Merge branch 'rj/make-cleanup'
A build tweak knob has been simplified by not setting the value
that is already the default; another unused one has been removed.

* rj/make-cleanup:
  config.mak.uname: remove unused uname_P variable
  Makefile: drop -Wno-universal-initializer from SP_EXTRA_FLAGS
2024-07-31 13:34:17 -07:00
Junio C Hamano
f31e901332 Merge branch 'jt/doc-post-receive-hook-update'
Doc update.

* jt/doc-post-receive-hook-update:
  doc: clarify post-receive hook behavior
2024-07-31 13:34:16 -07:00
Junio C Hamano
f084c50de6 Merge branch 'ad/merge-with-diff-algorithm'
Many Porcelain commands that internally use the merge machinery
were taught to consistently honor the diff.algorithm configuration.

* ad/merge-with-diff-algorithm:
  merge-recursive: honor diff.algorithm
2024-07-31 13:34:16 -07:00
Junio C Hamano
6a52f307af Merge branch 'rs/t-strvec-use-test-msg'
Unit test clean-up.

* rs/t-strvec-use-test-msg:
  t-strvec: fix type mismatch in check_strvec
  t-strvec: improve check_strvec() output
  t-strvec: use test_msg()
2024-07-31 13:34:15 -07:00
Patrick Steinhardt
9d36dbd1ff refs/reftable: stop using the_repository
Convert the reftable ref backend to stop using `the_repository` in favor
of the repo that gets passed in via `struct ref_store`.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-07-30 13:41:24 -07:00
Patrick Steinhardt
79e54c6a4e refs/packed: stop using the_repository
Convert the packed ref backend to stop using `the_repository` in favor
of the repo that gets passed in via `struct ref_store`.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-07-30 13:41:24 -07:00
Patrick Steinhardt
a6ebc2c6d1 refs/files: stop using the_repository
Convert the files ref backend to stop using `the_repository` in favor of
the repo that gets passed in via `struct ref_store`.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-07-30 13:41:23 -07:00
Patrick Steinhardt
080b068ffb refs/files: stop using the_repository in parse_loose_ref_contents()
We implicitly rely on `the_repository` in `parse_loose_ref_contents()`
by calling `parse_oid_hex()`. Convert the function to instead use
`parse_oid_hex_algop()` and have callers pass in the hash algorithm to
use.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-07-30 13:41:23 -07:00
Patrick Steinhardt
f777f4d884 refs: stop using the_repository
Convert "refs.c" to stop using `the_repository` in favor of the repo
that gets passed in via `struct ref_store`.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-07-30 13:41:23 -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
Junio C Hamano
70058db385 doc: difference in location to apply is "offset", not "fuzz"
The documentation to "git rebase" says that the line numbers (in the
rebased change) may not exactly be the same as the line numbers the
change gets replayed on top of the new base, but uses a wrong noun
"fuzz".  It should have said "offset".

They are both terms of art.  "fuzz" is about context lines not
exactly matching.  "offset" is about the difference in the location
that a change was taken from the original and the change gets
replayed on the target.  "offset" is often inevitable and part of
normal life.  "fuzz" on the other hand is often a sign of trouble
(and indeed "Git" refuses to apply a change with "fuzz", except
there are options to be fuzzy about whitespaces).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-07-25 10:28:58 -07:00
Junio C Hamano
92e24c8b79 ReviewingGuidelines: encourage positive reviews more
I saw some contributors hesitate to give a positive review on
patches by their coworkers.  When written well, a positive review
does not have to be a hollow "looks good" that rubber stamps an
useless approval on a topic that is not interesting to others.

Let's add a few paragraphs to encourage positive reviews, which is a
bit harder to give than a review to point out things to improve.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-07-25 08:50:09 -07:00
Alexander Shopov
9885871248 show-ref: improve short help messages of options
Trivial change to indicate that branches and tags are real options
that can be used combined to get more information.  This helps with
linting translations and prompting the user that the terms represent
options.

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-07-25 08:04:34 -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
Karthik Nayak
1b8f306612 ci/style-check: add RemoveBracesLLVM in CI job
For 'clang-format', setting 'RemoveBracesLLVM' to 'true', adds a check
to ensure we avoid curly braces for single-statement bodies in
conditional blocks.

However, the option does come with two warnings [1]:

    This option will be renamed and expanded to support other styles.

and

    Setting this option to true could lead to incorrect code formatting
    due to clang-format’s lack of complete semantic information. As
    such, extra care should be taken to review code changes made by
    this option.

The latter seems to be of concern. While we want to experiment with the
rule, adding it to the in-tree '.clang-format' could affect end-users.
Let's only add it to the CI jobs for now. With time, we can evaluate
its efficacy and decide if we want to add it to '.clang-format' or
retract it entirely. We do so, by adding the existing rules in
'.clang-format' and this rule to a temp file outside the working tree,
which is then used by 'git clang-format'. This ensures we don't murk
with files in-tree.

[1]: https://clang.llvm.org/docs/ClangFormatStyleOptions.html#removebracesllvm

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-07-23 09:56:50 -07:00