Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Tags: gitgitgadget/git

Tags

pr-git-2198/joaquimrocha/apply-directory-dot-slash-prefix-v1

Toggle pr-git-2198/joaquimrocha/apply-directory-dot-slash-prefix-v1's commit message
apply: strip ./ prefix from --directory argument

From: Joaquim Rocha <[email protected]>

When passing a relative path like --directory=./some/sub, the leading
"./" caused apply to prepend it literally to patch filenames, resulting
in an error (invalid path).

Since using "./" is almost memory muscle for many, strip the "./"
prefix so it behaves the same as --directory=some/sub.

Signed-off-by: Joaquim Rocha <[email protected]>

Submitted-As: https://lore.kernel.org/git/[email protected]

pr-2040/mjcheetham/trace2-macos-ancestry-v2

Toggle pr-2040/mjcheetham/trace2-macos-ancestry-v2's commit message
trace2: add macOS and Windows process ancestry tracing

In 353d3d7 (trace2: collect Windows-specific process information,
2019-02-22) Windows-specific process ancestry information was added as a
data_json event to TRACE2. Furthermore in 2f732bf (tr2: log parent
process name, 2021-07-21) similar functionality was added for Linux-based
systems, using procfs.

Let's teach Git on macOS to also gather process ancestry information, and
emit it as a cmd_ancestry TRACE2 event.

Furthermore, let's refactor the Windows implementation to align with the
Linux and macOS versions - by emitting the ancestry information as a
cmd_ancestry event. We keep the older, custom data_json event type on
Windows for compatibility for consumers of the TRACE2 data that use the
older event.

Finally, we add tests of the cmd_ancestry events in the new t0213 test
script. Extend the trace2 test helper to allow us to execute commands with a
known process in the ancestry ("test-tool"); we use this to allow tests to
filter out the uncontrolled environment (how the test script was run, and on
what system).

Thanks, Matthew

Updates in v2
=============

 * On macOS do not filter out PPID 1 or 0, to match what the Linux
   implementation does.

   Stopping before PID 1 and 0 means we do not emit the launchd init process
   on macOS. The Linux implementation does not do this, nor does the Windows
   implementation.

 * Add t0213-trace2-ancestry tests and extend the trace2 test helper.

   The tests use the "400ancestry" test helper to spawn child processes with
   controlled trace2 environments. Verify that the process ancestry is being
   correctly captured on platforms that support cmd_ancestry.

 * Drop USE_THE_REPOSITORY_VARIABLE macro as it was not required.

 * Updated commit messages to use more standard format to refer to existing
   commits.

Matthew John Cheetham (6):
  trace2: add macOS process ancestry tracing
  build: include procinfo.c impl for macOS
  trace2: refactor Windows process ancestry trace2 event
  trace2: emit cmd_ancestry data for Windows
  test-tool: extend trace2 helper with 400ancestry
  t0213: add trace2 cmd_ancestry tests

 compat/darwin/procinfo.c                 |  97 ++++++++++++
 compat/win32/trace2_win32_process_info.c |  58 ++++----
 config.mak.uname                         |   2 +
 contrib/buildsystems/CMakeLists.txt      |   2 +
 meson.build                              |   2 +
 t/helper/test-trace2.c                   |  59 ++++++++
 t/meson.build                            |   1 +
 t/t0210-trace2-normal.sh                 |   5 +-
 t/t0213-trace2-ancestry.sh               | 180 +++++++++++++++++++++++
 9 files changed, 379 insertions(+), 27 deletions(-)
 create mode 100644 compat/darwin/procinfo.c
 create mode 100755 t/t0213-trace2-ancestry.sh

base-commit: 9a2fb14

Submitted-As: https://lore.kernel.org/git/[email protected]
In-Reply-To: https://lore.kernel.org/git/[email protected]

pr-2046/KojiNakamaru/fix/osxkeychain-makefile-v2

Toggle pr-2046/KojiNakamaru/fix/osxkeychain-makefile-v2's commit message
osxkeychain: define build targets in the top-level Makefile.

From: Koji Nakamaru <[email protected]>

The fix for git-credential-osxkeychain in 4580bcd (osxkeychain: avoid
incorrectly skipping store operation) introduced linkage with libgit.a,
and its Makefile was adjusted accordingly. However, the build fails as
of 864f55e because several macOS-specific refinements were applied to
the top-level Makefile and config.mak.uname, such as:

  - 363837a (macOS: make Homebrew use configurable, 2025-12-24)
  - cee341e (macOS: use iconv from Homebrew if needed and present,
    2025-12-24)
  - d281241 (utf8.c: enable workaround for iconv under macOS 14/15,
    2026-01-12)

Since libgit.a and its corresponding header files depend on many flags
defined in the top-level Makefile, these flags must be consistently
defined when building git-credential-osxkeychain. Continuing to manually
adjust the git-credential-osxkeychain Makefile is cumbersome and
fragile.

Define the build targets for git-credential-osxkeychain in the top-level
Makefile and modify its local Makefile to simply rely on those targets.

Helped-by: Junio C Hamano <[email protected]>
Signed-off-by: Koji Nakamaru <[email protected]>

Submitted-As: https://lore.kernel.org/git/[email protected]
In-Reply-To: https://lore.kernel.org/git/[email protected]

pr-2045/shatachandra/pre-add-hooks-v2

Toggle pr-2045/shatachandra/pre-add-hooks-v2's commit message
add: support pre-add hook

From: Chandra Kethi-Reddy <[email protected]>

"git add" has no hook that lets users inspect what is about to be
staged. Users who want to reject certain paths or content must
wrap the command in a shell alias or wait for pre-commit, which
fires after staging is already done and objects may already be in
the object database.

Introduce a "pre-add" hook that runs after "git add" computes the
new index state but before committing it to disk. The hook
receives two arguments:

  $1 -- path to a temporary copy of the index before this "git add"
  $2 -- path to the lockfile containing the proposed index

$1 on first add can be a non-existent path representing an empty
index.

Hook authors can inspect the computed result with ordinary tools:

  GIT_INDEX_FILE="$2" git diff --cached --name-only HEAD

without needing to interpret pathspec or mode flags like "-u" or
"--renormalize" -- the proposed index already reflects their effect.

The implementation creates a temporary copy of the index via the
tempfile API when find_hook("pre-add") reports a hook is present,
then lets all staging proceed normally. At the finish label,
write_locked_index() writes the proposed index to the lockfile
without COMMIT_LOCK. If the hook approves, commit_lock_file()
atomically replaces the index. If the hook rejects,
rollback_lock_file() discards the lockfile and the original index
is left unchanged. When no hook is installed, the existing
write_locked_index(COMMIT_LOCK | SKIP_IF_UNCHANGED) path is still
taken.

The hook is bypassed with "--no-verify" and is not invoked for
--interactive, --patch, --edit, or --dry-run, nor by "git commit -a"
which stages through its own code path.

Register t3706-pre-add-hook.sh in t/meson.build to synchronize Meson
and Makefile lists.

Signed-off-by: Chandra Kethi-Reddy <[email protected]>

Submitted-As: https://lore.kernel.org/git/[email protected]
In-Reply-To: https://lore.kernel.org/git/[email protected]

pr-2046/KojiNakamaru/fix/osxkeychain-makefile-v1

Toggle pr-2046/KojiNakamaru/fix/osxkeychain-makefile-v1's commit message
osxkeychain: define build targets in the top-level Makefile.

From: Koji Nakamaru <[email protected]>

The fix for git-credential-osxkeychain in 4580bcd (osxkeychain: avoid
incorrectly skipping store operation) introduced linkage with libgit.a,
and its Makefile was adjusted accordingly. However, the build fails as
of 864f55e because several macOS-specific refinements were applied to
the top-level Makefile and config.mak.uname, such as:

  - 363837a (macOS: make Homebrew use configurable, 2025-12-24)
  - cee341e (macOS: use iconv from Homebrew if needed and present,
    2025-12-24)
  - d281241 (utf8.c: enable workaround for iconv under macOS 14/15,
    2026-01-12)

Since libgit.a and its corresponding header files depend on many flags
defined in the top-level Makefile, these flags must be consistently
defined when building git-credential-osxkeychain. Continuing to manually
adjust the git-credential-osxkeychain Makefile is cumbersome and
fragile.

Define the build targets for git-credential-osxkeychain in the top-level
Makefile and modify its local Makefile to simply rely on those targets.

Signed-off-by: Koji Nakamaru <[email protected]>

Submitted-As: https://lore.kernel.org/git/[email protected]

pr-2045/shatachandra/pre-add-hooks-v1

Toggle pr-2045/shatachandra/pre-add-hooks-v1's commit message
add: support pre-add hook

From: Chandra Kethi-Reddy <[email protected]>

git has no hook that fires during 'git add'.  Users who want to
validate files before staging must wrap 'git add' in a shell alias
or wait for pre-commit, which fires after staging is already done.

Add a pre-add hook that runs after pathspec validation and before
any files are staged.  If the hook exits non-zero, 'git add' aborts
without modifying the index.  The hook receives GIT_INDEX_FILE in
its environment, following the same convention as pre-commit.

The hook is bypassed with '--no-verify' (long flag only, since '-n'
is already '--dry-run' in 'git add').  It is not invoked for
--interactive, --patch, --edit, or --dry-run modes, nor by
'git commit -a' which stages files through its own code path in
builtin/commit.c.

The implementation calls run_hooks_opt() directly rather than the
run_commit_hook() wrapper, which sets GIT_EDITOR=: and is not
relevant for 'git add'.  When no hook is installed, there is no
performance impact.

Disclosure: developed with guidance from Claude Code (Anthropic)
and Codex CLI (OpenAI) for development, review and standards
compliance. The contributor handtyped and reviewed all tests, code,
and documentation.

Signed-off-by: Chandra Kethi-Reddy <[email protected]>

Submitted-As: https://lore.kernel.org/git/[email protected]

pr-2044/derrickstolee/config-list-type-v1

Toggle pr-2044/derrickstolee/config-list-type-v1's commit message
[RFC] Make 'git config list --type=' parse and filter types

I started down this road based on feedback on my 'git config-batch' RFC [1].

[1]
https://lore.kernel.org/git/[email protected]/

I had described my intention to use 'git config-batch' as a single process
to load multiple config values one-by-one. Brian mentioned that 'git config
list -z' would probably suffice, so I started experimenting in that
direction [2].

[2]
git-ecosystem/git-credential-manager@main...derrickstolee:config-list

However, I ran into a problem: the most critical performance bottleneck is
related to path-formatted config values that are queried with 'git config
get --type=path -z'. It wasn't hard to update things to lazily load the full
list of config values by type [3], but I then noticed a big problem!

[3]
git-ecosystem/git-credential-manager@d403c8e

Problem: 'git config list' doesn't respect --type=<X>!

This boils down to the fact that the iterator function show_all_config()
doesn't call format_config(), which includes the type-parsing code.

This wasn't super trivial to update:

 1. format_config() uses git_config_parse_*() methods, which die() on a bad
    parse.
 2. The path parsing code didn't have a gentle version.
 3. The two paths ('git config list' and 'git config --list') needed to
    standardize their display options to work with format_config().
 4. Finally, we need to filter out key-value pairs that don't match the
    given type.

This is marked as an RFC because I need to add some more tests and because
this is a behavior change! If there are any tools currently passing the
--type=<X> argument to git config list then they will have a change of
behavior with this series. It's an easy workaround: drop the --type argument
or add --no-type to go back to the previous behavior.

Thanks for any and all feedback, -Stolee

Derrick Stolee (5):
  config: move show_all_config()
  parse: add git_parse_maybe_pathname()
  config: allow format_config() to filter
  config: create special init for list mode
  config: make 'git config list --type=<X>' work

 Documentation/git-config.adoc |   3 +
 builtin/config.c              | 130 ++++++++++++++++++++++++----------
 config.c                      |  14 +---
 parse.c                       |  24 +++++++
 parse.h                       |   2 +
 t/t1300-config.sh             |  26 ++++++-
 6 files changed, 147 insertions(+), 52 deletions(-)

base-commit: 67ad421

Submitted-As: https://lore.kernel.org/git/[email protected]

pr-2039/ayushHardeniya/doc-fix-duplicate-to-v1

Toggle pr-2039/ayushHardeniya/doc-fix-duplicate-to-v1's commit message
Documentation: fix duplicated word in 2.49.1 release notes

From: Ayush Sharma <[email protected]>

Remove a duplicated "to" in the 2.49.1 release notes that
was introduced during CI-related wording updates.

Signed-off-by: Ayush Sharma <[email protected]>

Submitted-As: https://lore.kernel.org/git/[email protected]

pr-2043/ritovision/gitweb-mobile-responsive-v1

Toggle pr-2043/ritovision/gitweb-mobile-responsive-v1's commit message
gitweb: fix broken mobile layouts across views

Summary
=======

This patch series fixes mobile responsiveness bugs that currently break page
layouts in gitweb. The approach is adaptive rather than transformative:
preserve legacy desktop layout, add targeted mobile constraints at ≤768, and
prevent content from escaping its containers and breaking the layout.

Rationale
=========

Software development has traditionally been desktop-first and remains the
primary environment, but common contributor tasks like browsing history,
reading logs, reviewing diffs, and sharing links are increasingly done on
mobile devices while away from the workstation. This patch series aims to
support the emerging need by improving day-to-day usability for contributors
accessing gitweb on small screens.

Before and After Screenshots
============================

Projects
========

Before projects-BEFORE
[https://github.com/user-attachments/assets/0742999e-99b7-46df-9a40-4283fd861e86]

After projects-AFTER
[https://github.com/user-attachments/assets/5926be36-626e-4fd4-9aee-91d87557693b]

Log
===

Before log-BEFORE
[https://github.com/user-attachments/assets/6f64ffea-0975-4d67-a1b4-35b471986ab0]

After Note: certain inputs contain non-breaking/escaped spaces (e.g., NBSP),
so the renderer treats the surrounding text as a single long continous
string. Under constrained widths this can present as “mid-word” wrapping,
but it is the correct handling of long strings; addressing that is a
content-normalization concern, not a layout concern. log-AFTER
[https://github.com/user-attachments/assets/f8852e95-4f31-4337-9b21-6d94232b1be7]

Commitdiff
==========

Before commitdiff-BEFORE
[https://github.com/user-attachments/assets/8bf8a9a7-8cab-4ba8-a7de-166410a5c52e]

After (Pre-scroll) commitdiff-AFTER-prescroll
[https://github.com/user-attachments/assets/fa00f6fa-fc20-4391-9066-a489f0625af5]

After (Post-scroll) Scrolling the tables to reveal the contents to the right
commitdiff-AFTER-postScroll
[https://github.com/user-attachments/assets/74ae24e0-e279-4582-8fa2-1634fe3133ec]

Commit & Footer
===============

Before Also notice the footer text wrapping down outside the footer
background along with the two buttons commit-BEFORE
[https://github.com/user-attachments/assets/1ec00258-fb71-44e9-8e8e-beaaab6cfd13]

After (Pre-scroll) commit-AFTER-prescroll
[https://github.com/user-attachments/assets/78ac7f13-9e1f-403c-9ae9-b37d82d4aa4e]

After (Post-scroll) Scrolling the table to reveal the contents to the right
commit-AFTER-postScroll
[https://github.com/user-attachments/assets/8650f835-cdc3-4b11-ae1e-1229fc88e352]

Tree
====

Before tree-BEFORE
[https://github.com/user-attachments/assets/35a5db37-0450-4eee-91de-777259a49214]

After (Pre-scroll) tree-AFTER-prescroll
[https://github.com/user-attachments/assets/d993f3be-65df-48db-af38-4a3d13158f20]

After (Post-scroll) Scrolling the table to reveal the contents to the right

tree-AFTER-postScroll
[https://github.com/user-attachments/assets/1faa3184-0d63-455d-a341-c01ecf741be2]

Rito Rhymes (5):
  gitweb: add viewport meta tag for mobile devices
  gitweb: prevent project search bar from overflowing on mobile
  gitweb: fix mobile page overflow across log/commit/blob/diff views
  gitweb: fix mobile footer overflow by wrapping text and clearing
    floats
  gitweb: let page header grow on mobile for long wrapped project names

 gitweb/gitweb.perl       |  1 +
 gitweb/static/gitweb.css | 74 ++++++++++++++++++++++++++++++++++++++--
 2 files changed, 73 insertions(+), 2 deletions(-)

base-commit: b2826b5

Submitted-As: https://lore.kernel.org/git/[email protected]

pr-git-2189/sambostock/sb/merge-ours-sparse-index-v2

Toggle pr-git-2189/sambostock/sb/merge-ours-sparse-index-v2's commit message
merge-ours: sparse-index integration

This short series teaches merge-ours to work with a sparse index as a small
step toward broader sparse-index support.

Patch 1 is a preparatory cleanup that converts merge-ours away from
the_repository global, using the repo parameter instead.

Patch 2 adds the actual sparse-index integration and tests.

Changes since v1:

 * Patch 1: note in commit message that RUN_SETUP guarantees repo is never
   NULL (Patrick, Junio)
 * Patch 2: rewrite commit message to follow the project's standard log
   message structure (Junio)

Thanks Junio and Patrick for the review.

Developed with AI assistance (Claude).

Sam Bostock (2):
  merge-ours: drop USE_THE_REPOSITORY_VARIABLE
  merge-ours: integrate with sparse-index

 builtin/merge-ours.c                     | 15 +++++++++------
 t/t1092-sparse-checkout-compatibility.sh | 14 ++++++++++++++
 2 files changed, 23 insertions(+), 6 deletions(-)

base-commit: b2826b5

Submitted-As: https://lore.kernel.org/git/[email protected]
In-Reply-To: https://lore.kernel.org/git/[email protected]