Commit Graph

79695 Commits

Author SHA1 Message Date
Junio C Hamano
453e7b744a Merge branch 'master' of https://github.com/j6t/gitk
* 'master' of https://github.com/j6t/gitk:
  gitk: fix msgfmt being required
  gitk: fix highlighted remote prefix of branches with directories
2026-02-11 14:49:53 -08:00
Junio C Hamano
6fcee47852 The 3rd batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-11 12:29:08 -08:00
Junio C Hamano
06cef761b1 Merge branch 'rs/blame-ignore-colors-fix'
"git blame --ignore-revs=... --color-lines" did not account for
ignored revisions passing blame to the same commit an adjacent line
gets blamed for.

* rs/blame-ignore-colors-fix:
  blame: fix coloring for repeated suspects
2026-02-11 12:29:08 -08:00
Junio C Hamano
ea03b35bb5 Merge branch 'hs/t9160-test-paths'
Test update.

* hs/t9160-test-paths:
  t9160:modernize test path checking
2026-02-11 12:29:07 -08:00
Junio C Hamano
18df0fa3ca Merge branch 'am/doc-github-contributiong-link-to-submittingpatches'
GitHub repository banner update.

* am/doc-github-contributiong-link-to-submittingpatches:
  .github/CONTRIBUTING.md: link to SubmittingPatches on git-scm.com
2026-02-11 12:29:07 -08:00
Junio C Hamano
40c59964b3 Merge branch 'kh/doc-shortlog-fix'
Doc fix.

* kh/doc-shortlog-fix:
  doc: shortlog: put back trailer paragraphs
2026-02-11 12:29:07 -08:00
Junio C Hamano
cf5b37fb43 Merge branch 'sp/show-index-warn-fallback'
When "git show-index" is run outside a repository, it silently
defaults to SHA-1; the tool now warns when this happens.

* sp/show-index-warn-fallback:
  show-index: use gettext wrapping in user facing error messages
  show-index: warn when falling back to SHA-1 outside a repository
2026-02-11 12:29:06 -08:00
Junio C Hamano
864f55e190 The second batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-09 12:09:10 -08:00
Junio C Hamano
6a3c66d72e Merge branch 'ty/perf-3400-optim'
Improve set-up time of a perf test.

* ty/perf-3400-optim:
  t/perf/p3400: speed up setup using fast-import
2026-02-09 12:09:10 -08:00
Junio C Hamano
35e17b2526 Merge branch 'ac/string-list-sort-u-and-tests'
The string_list API gains a new helper, string_list_sort_u(), and
new unit tests to extend coverage.

* ac/string-list-sort-u-and-tests:
  string-list: add string_list_sort_u() that mimics "sort -u"
  u-string-list: add unit tests for string-list methods
2026-02-09 12:09:10 -08:00
Junio C Hamano
4f3929275b Merge branch 'sb/doc-worktree-prune-expire-improvement'
The help text and the documentation for the "--expire" option of
"git worktree [list|prune]" have been improved.

* sb/doc-worktree-prune-expire-improvement:
  worktree: clarify that --expire only affects missing worktrees
2026-02-09 12:09:10 -08:00
Junio C Hamano
6176ee2349 Merge branch 'kn/ref-batch-output-error-reporting-fix'
A handful of code paths that started using batched ref update API
(after Git 2.51 or so) lost detailed error output, which have been
corrected.

* kn/ref-batch-output-error-reporting-fix:
  fetch: delay user information post committing of transaction
  receive-pack: utilize rejected ref error details
  fetch: utilize rejected ref error details
  update-ref: utilize rejected error details if available
  refs: add rejection detail to the callback function
  refs: skip to next ref when current ref is rejected
2026-02-09 12:09:10 -08:00
Junio C Hamano
8087aae540 Merge branch 'pw/replay-drop-empty'
"git replay" is taught to drop commits that become empty (not the
ones that are empty in the original).

* pw/replay-drop-empty:
  replay: drop commits that become empty
2026-02-09 12:09:09 -08:00
Junio C Hamano
7bf3785d09 Merge branch 'ps/history'
"git history" history rewriting UI.

* ps/history:
  builtin/history: implement "reword" subcommand
  builtin: add new "history" command
  wt-status: provide function to expose status for trees
  replay: support updating detached HEAD
  replay: support empty commit ranges
  replay: small set of cleanups
  builtin/replay: move core logic into "libgit.a"
  builtin/replay: extract core logic to replay revisions
2026-02-09 12:09:09 -08:00
Junio C Hamano
3e0db84c88 Start 2.54 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-05 15:42:01 -08:00
Junio C Hamano
96614e799c Merge branch 'sp/t5500-cleanup'
Test clean-up.

* sp/t5500-cleanup:
  t5500: simplify test implementation and fix git exit code suppression
2026-02-05 15:42:01 -08:00
Junio C Hamano
7758f84682 Merge branch 'tc/last-modified-options-cleanup'
The "-z" and "--max-depth" documentation (and implementation of
"-z") in the "git last-modified" command have been updated.

* tc/last-modified-options-cleanup:
  last-modified: change default max-depth to 0
  last-modified: document option '--max-depth'
  last-modified: document option '-z'
  last-modified: clarify in the docs the command takes a pathspec
2026-02-05 15:42:01 -08:00
Junio C Hamano
1f17604ce4 Merge branch 'lp/diff-stat-utf8-display-width-fix'
The computation of column width made by "git diff --stat" was
confused when pathnames contain non-ASCII characters.

* lp/diff-stat-utf8-display-width-fix:
  t4073: add test for diffstat paths length when containing UTF-8 chars
  diff: improve scaling of filenames in diffstat to handle UTF-8 chars
2026-02-05 15:42:01 -08:00
Junio C Hamano
d83491aeba Merge branch 'ac/sparse-checkout-string-list-cleanup'
Code clean-up.

* ac/sparse-checkout-string-list-cleanup:
  sparse-checkout: optimize string_list construction and add tests to verify deduplication.
2026-02-05 15:42:00 -08:00
Junio C Hamano
b77c91a49d Merge branch 'sp/myfirstcontribution-include-update'
Doc update.

* sp/myfirstcontribution-include-update:
  doc: MyFirstContribution: fix missing dependencies and clarify build steps
2026-02-05 15:42:00 -08:00
Junio C Hamano
d62717b182 Merge branch 'dd/t5403-modernise'
Test clean-up.

* dd/t5403-modernise:
  t5403: use test_cmp for post-checkout argument checks
  t5403: introduce check_post_checkout helper function
2026-02-05 15:42:00 -08:00
Junio C Hamano
4ae96a4c0e Merge branch 'ap/http-probe-rpc-use-auth'
HTTP transport failed to authenticate in some code paths, which has
been corrected.

* ap/http-probe-rpc-use-auth:
  remote-curl: use auth for probe_rpc() requests too
2026-02-05 15:41:58 -08:00
Junio C Hamano
c3a5261dc0 Merge branch 'ar/submodule-gitdir-tweak'
Avoid local submodule repository directory paths overlapping with
each other by encoding submodule names before using them as path
components.

* ar/submodule-gitdir-tweak:
  submodule: detect conflicts with existing gitdir configs
  submodule: hash the submodule name for the gitdir path
  submodule: fix case-folding gitdir filesystem collisions
  submodule--helper: fix filesystem collisions by encoding gitdir paths
  builtin/credential-store: move is_rfc3986_unreserved to url.[ch]
  submodule--helper: add gitdir migration command
  submodule: allow runtime enabling extensions.submodulePathConfig
  submodule: introduce extensions.submodulePathConfig
  builtin/submodule--helper: add gitdir command
  submodule: always validate gitdirs inside submodule_name_to_gitdir
  submodule--helper: use submodule_name_to_gitdir in add_submodule
2026-02-05 15:41:58 -08:00
Junio C Hamano
ae78735c4b Merge branch 'aa/add-p-previous-decisions'
"git add -p" and friends note what the current status of the hunk
being shown is.

* aa/add-p-previous-decisions:
  add -p: show user's hunk decision when selecting hunks
2026-02-05 15:41:58 -08:00
Junio C Hamano
2b53e8b3ee Merge branch 'jk/remote-tracking-ref-leakfix'
Leakfix.

* jk/remote-tracking-ref-leakfix:
  remote: always allocate branch.push_tracking_ref
  remote: fix leak in branch_get_push_1() with invalid "simple" config
  remote: drop const return of tracking_for_push_dest()
  remote: return non-const pointer from error_buf()
2026-02-05 15:41:57 -08:00
Johannes Sixt
ddae547e37 Merge branch 'pks-meson-fix-missing-msgfmt' of https://github.com/pks-gitlab/gitk
* 'pks-meson-fix-missing-msgfmt' of https://github.com/pks-gitlab/gitk:
  gitk: fix msgfmt being required

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2026-02-05 13:45:51 +01:00
Patrick Steinhardt
97121bb017 gitk: fix msgfmt being required
While the Meson build instructions already handle the case where msgfmt
wasn't found, we forgot to mark the dependency itself as optional. This
causes an error in case the executable could not be found:

  Project name: gitk
  Project version: undefined
  Program sh found: YES (C:\Program Files\Git\bin\sh.EXE)
  Program wish found: YES (C:\Program Files\Git\mingw64\bin\wish.EXE)
  Program chmod found: YES (C:\Program Files\Git\usr\bin\chmod.EXE)
  Program mv found: YES (C:\Program Files\Git\usr\bin\mv.EXE)
  Program sed found: YES (C:\Program Files\Git\usr\bin\sed.EXE)
  Program msgfmt found: NO

  subprojects\gitk\meson.build:28:3: ERROR: Program 'msgfmt' not found or not executable

Fix the issue by adding the `required: false` parameter.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
2026-02-05 12:54:03 +01:00
Phil Hord
b2826b52eb .mailmap: fix email for Phil Hord
My canonical and old emails were reversed, somehow. Also add
an entry for a new email that may sneak in.

Signed-off-by: Phil Hord <phil.hord@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-03 10:29:00 -08:00
Kristoffer Haugsbakk
df1c5d7ed7 doc: shortlog: put back trailer paragraphs
47beb37b (shortlog: match commit trailers with --group, 2020-09-27)
added the `trailer` bullet point with three paragraphs.[1] Later,
3dc95e09 (shortlog: support arbitrary commit format `--group`s,
2022-10-24) put the single-paragraph bullet point about `format` right
after the first paragraph about `trailer`. That meant that the second
and third paragraphs for `trailer` got moved to `format`.

Move the two paragraphs back to `trailer`. We now also need one blank
line before the final bullet point so that it does not get joined with
the second bullet point.

† 1: Technically the bullet list formatting was immediately fixed to
     include all three paragraphs in 63d24fa0 (shortlog: allow multiple
     groups to be specified, 2020-09-27)

Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-03 07:36:50 -08:00
René Scharfe
d519082d4e blame: fix coloring for repeated suspects
The option --ignore-rev passes the blame to an older commit.  This can
cause adjacent scoreboard entries to blame the same commit.  Currently
we only look at the present entry when determining whether a line needs
to be colored for --color-lines.  Check the previous entry as well.

Reported-by: Seth McDonald <sethmcmail@pm.me>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-02 13:48:13 -08:00
HodaSalim
68060b9262 t9160:modernize test path checking
Replace old-style path checks with Git's dedicated test helpers:
- test -f → test_path_is_file
- test -d → test_path_is_dir
- test -s → test_file_not_empty

Fix typos with the word "subsequent"

Found using: git grep "test -[efd]" t/

This improves test readability and provides better error messages
when path checks fail.

Signed-off-by: HodaSalim <hoda.s.salim@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-02 11:00:30 -08:00
Abdalrhman Mohamed
2d45507f15 .github/CONTRIBUTING.md: link to SubmittingPatches on git-scm.com
The relative link to SubmittingPatches is broken when viewed through
GitHub's specialized "Contributing" tab. Update the link to point to
the documentation on git-scm.com to be consistent with other links in
the same file. Also, wrap the line to improve readability.

Signed-off-by: Abdalrhman Mohamed <Eng.Abdalrhman.Abdalmonem@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-02 09:56:44 -08:00
Junio C Hamano
67ad42147a Git 2.53
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v2.53.0
2026-02-01 18:15:01 -08:00
Junio C Hamano
6f328bc9e3 Merge tag 'l10n-2.53.0-v1' of https://github.com/git-l10n/git-po
l10n-2.53.0-v1

* tag 'l10n-2.53.0-v1' of https://github.com/git-l10n/git-po:
  l10n: zh_CN: standardize glossary terms
  l10n: zh_CN: updated translation for 2.53
  l10n: zh_CN: fix inconsistent use of standard vs. wide colons
  l10n: fr: v2.53
  l10n: zh_TW.po: update Git 2.53 translation
  l10n: tr: Update Turkish translations
  l10n: sv.po: Update Swedish translation
  l10n: po-id for 2.53
  l10n: ga.po: Fix git-po-helper warnings
  l10n: bg.po: Updated Bulgarian translation (6091t)
  l10n: ga.po: Update Irish translation for Git 2.53
2026-02-01 18:13:52 -08:00
Carlo Marcelo Arenas Belón
239b7f686c RelNotes: fully spell negation
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-01 18:07:39 -08:00
Jiang Xin
532543fa46 Merge branch 'jx/zh_CN' of github.com:jiangxin/git
* 'jx/zh_CN' of github.com:jiangxin/git:
  l10n: zh_CN: standardize glossary terms
  l10n: zh_CN: updated translation for 2.53
  l10n: zh_CN: fix inconsistent use of standard vs. wide colons
2026-01-31 21:32:54 +08:00
Jiang Xin
5a83d800f3 Merge branch 'l10n/zh-TW/git-2-53' of github.com:l10n-tw/git-po
* 'l10n/zh-TW/git-2-53' of github.com:l10n-tw/git-po:
  l10n: zh_TW.po: update Git 2.53 translation
2026-01-31 21:20:06 +08:00
Jiang Xin
e996719801 Merge branch 'po-id' of github.com:bagasme/git-po
* 'po-id' of github.com:bagasme/git-po:
  l10n: po-id for 2.53
2026-01-31 21:15:38 +08:00
Jiang Xin
8ef65d7efd Merge branch 'l10n-ga-2.53' of github.com:aindriu80/git-po
* 'l10n-ga-2.53' of github.com:aindriu80/git-po:
  l10n: ga.po: Fix git-po-helper warnings
  l10n: ga.po: Update Irish translation for Git 2.53
2026-01-31 21:13:55 +08:00
Jiang Xin
b386b3aea7 Merge branch 'master' of github.com:alshopov/git-po
* 'master' of github.com:alshopov/git-po:
  l10n: bg.po: Updated Bulgarian translation (6091t)
2026-01-31 21:11:50 +08:00
Jiang Xin
af1a298e2c Merge branch 'fr_2.53' of github.com:jnavila/git
* 'fr_2.53' of github.com:jnavila/git:
  l10n: fr: v2.53
2026-01-31 21:08:43 +08:00
Jiang Xin
6f75c474d7 Merge branch 'tr-l10n' of github.com:bitigchi/git-po
* 'tr-l10n' of github.com:bitigchi/git-po:
  l10n: tr: Update Turkish translations
2026-01-31 21:06:38 +08:00
Jiang Xin
3eaaa7fea4 Merge branch 'master' of github.com:nafmo/git-l10n-sv
* 'master' of github.com:nafmo/git-l10n-sv:
  l10n: sv.po: Update Swedish translation
2026-01-31 21:03:10 +08:00
Jiang Xin
eb816ef79e l10n: zh_CN: standardize glossary terms
Add preferred Chinese terminology notes and align existing translations
to the updated glossary. AI-assisted review was used to check and
improve legacy translations.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2026-01-31 20:51:27 +08:00
Junio C Hamano
2258446484 RelNotes: correct "fast-import" option name
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-01-30 09:50:03 -08:00
Tian Yuchen
8466efa4bd t/perf/p3400: speed up setup using fast-import
The setup phase in 't/perf/p3400-rebase.sh' generates 100 commits to
simulate a noisy history. It currently uses a shell loop that invokes
'git add', 'git commit', 'test_seq', and 'sort' in each iteration.
This incurs significant overhead due to repeated process spawning.

Optimize the setup by using 'git fast-import' to generate the commit
history. Additionally, pre-compute the forward and reversed file contents
to avoid repetitive execution of 'seq' and 'sort'.

To ensure the test measures rebase performance against a consistent
object layout (rather than the suboptimal pack/loose objects created
by the raw import), perform a full repack (`git repack -a -d`) at the
end of the setup.

This reduces the setup time significantly while maintaining the validity
of the subsequent performance tests.

Performance enhancement (Average value of 5 tests):
            Real        Rebase
  Before:  29.045s      13.34s
   After:  21.989s      12.84s

Measured on Lenovo Yoga 2020, Ubuntu 24.04.

Signed-off-by: Tian Yuchen <a3205153416@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-01-30 09:13:47 -08:00
Shreyansh Paliwal
227e2cc4e1 show-index: use gettext wrapping in user facing error messages
Multiple 'die()' calls in show-index.c use literal strings directly.

Wrap all user-facing 'die()' messages with '_()' so they can be translated
via gettext, this ensures better support for users.

Signed-off-by: Shreyansh Paliwal <shreyanshpaliwalcmsmn@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-01-30 08:58:12 -08:00
Shreyansh Paliwal
ea39808a22 show-index: warn when falling back to SHA-1 outside a repository
When 'git show-index' is run outside of a repository and no hashing
algorithm is specified via --object-format, it silently falls back
to SHA-1, relying on the historical default.

This works for existing SHA-1 based index files, but the behavior can
be ambiguous and confusing when the input index file uses a different
hash algorithm, such as SHA-256.

Add a warning when this fallback happens to make the assumption
explicit and to guide users toward using --object-format when needed.

Signed-off-by: Shreyansh Paliwal <shreyanshpaliwalcmsmn@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-01-30 08:58:12 -08:00
Amisha Chhajed
2e711acfbd string-list: add string_list_sort_u() that mimics "sort -u"
Many callsites of string_list_remove_duplicates() call it
immdediately after calling string_list_sort(), understandably
as the former requires string-list to be sorted, it is clear
that these places are sorting only to remove duplicates and
for no other reason.

Introduce a helper function string_list_sort_u that combines
these two calls that often appear together, to simplify
these callsites. Replace the current calls of those methods with
string_list_sort_u().

Signed-off-by: Amisha Chhajed <amishhhaaaa@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-01-29 09:32:50 -08:00
Amisha Chhajed
208642cfbb u-string-list: add unit tests for string-list methods
Unit tests in u-string-list.c does not cover several methods
in string-list, this gap in coverage makes it difficult to
ensure no regressions are introduced in future changes.

Add unit tests for the following methods to enhance coverage:
string_list_remove_empty_items()
unsorted_string_list_has_string()
unsorted_string_list_delete_item()
string_list_has_string()
string_list_insert()
string_list_sort()
string_list_remove()

Signed-off-by: Amisha Chhajed <amishhhaaaa@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-01-29 09:32:50 -08:00