+
Skip to content

Tags: gitgitgadget/git

Tags

pr-1941/derrickstolee/git-sparse-checkout-clean-v1

Toggle pr-1941/derrickstolee/git-sparse-checkout-clean-v1's commit message
sparse-checkout: add 'clean' command

When using cone-mode sparse-checkout, users specify which tracked
directories they want (recursively) and any directory not part of the parent
paths for those directories are considered "out of scope". When changing
sparse-checkouts, there are a variety of reasons why these "out of scope"
directories could remain, including:

 * The user has .gitignore or .git/info/exclude files that tell Git to not
   remove files of a certain type.
 * Some filesystem blocker prevented the removal of a tracked file. This is
   usually more of an issue on Windows where a read handle will block file
   deletion.

Typically, this would not mean too much for the user experience. A few extra
filesystem checks might be required to satisfy git status commands, but the
scope of the performance hit is relative to how many cruft files are left
over in this situation.

However, when using the sparse index, these tracked sparse directories cause
significant performance issues. When noticing that the index contains a
sparse directory but that directory exists on disk, Git needs to expand that
sparse directory to determine which files are tracked or untracked. The
current mechanism expands the entire index to a full one, an expensive
operation that scales with the total number of paths at HEAD and not just
the number of cruft files left over.

Advice was added in 9479a31 (advice: warn when sparse index expands,
2024-07-08) to help users determine that they were in this state. However,
the advice doesn't actually recommend helpful ways to get out of this state.
Recommending "git clean" on its own is incomplete, as typically users
actually need 'git clean -dfx' to clear out the ignored or excluded files.
Even then, they may need 'git sparse-checkout reapply' afterwards to clear
the sparse directories.

The advice was successful in helping to alert users to the problem, which is
how I got wind of many of these cases for how users get into this state.
It's now time to give them a tool that helps them out of this state.

This series adds a new 'git sparse-checkout clean' command that currently
only works for cone-mode sparse-checkouts. The only thing it does is
collapse the index to a sparse index (as much as possible) and make sure
that any sparse directories are removed. These directories are listed to
stdout.

A --dry-run option is available to list the directories that would be
removed without actually deleting the directories.

This option would be preferred to something like 'git clean -dfx' since it
does not clear the excluded files that are still within the sparse-checkout.
Instead, it performs the exact filesystem operations required to refresh the
sparse index performance back to what is expected.

I spent a few weeks debating with myself about whether or not this was the
right interface, so please suggest alternatives if you have better ideas.
Among my rejected ideas include:

 * 'git sparse-checkout reapply -f -x' or similar augmentations of
   'reapply'.
 * 'git clean --sparse' to focus the clean operation on things outside of
   the sparse-checkout.

The implementation is rather simple with the current CLI. Future
augmentations could include a --quiet option to silence the output and a
--verbose option to list the files that exist within each directory and
would/will be removed.

Thanks, -Stolee

Derrick Stolee (3):
  sparse-checkout: remove use of the_repository
  sparse-checkout: add 'clean' command
  sparse-index: point users to new 'clean' action

 Documentation/git-sparse-checkout.adoc |  13 +-
 builtin/sparse-checkout.c              | 192 +++++++++++++++++--------
 sparse-index.c                         |   3 +-
 t/t1091-sparse-checkout-builtin.sh     |  48 +++++++
 4 files changed, 197 insertions(+), 59 deletions(-)

base-commit: 8b6f19c

Submitted-As: https://lore.kernel.org/git/pull.1941.git.1751973594.gitgitgadget@gmail.com

pr-1933/jnavila/doc_git_log-v3

Toggle pr-1933/jnavila/doc_git_log-v3's commit message
doc: convert git log man page to new synopsis format

This series converts the man page of git log to the synopsis format style.
Git log is the second largest manpage after git config, which makes the
changes quite large.

A special note about the log format description which required escaping the
synopsis processing of parentheses.

Changes since V1:

 * rework the grammar style when refering to plural placeholders . The text
   is more descriptive and does not rely on puns. Puns may be difficult to
   understand and to translate.
 * change commit message to reflect the conversion of inline description of
   several option to a list.

Jean-Noël Avila (9):
  doc: convert git-log to new documentation format
  doc: git-log convert rev-list-description  to new doc format
  doc: git-log: convert line range options to new doc format
  doc: git-log: convert line range format to new doc format
  doc: git-log: convert rev list options to new doc format
  doc: git-log: convert pretty options to new doc format
  doc: git-log: convert pretty formats to new doc format
  doc: git-log: convert diff options to new doc format
  doc: git-log: convert log config to new doc format

 Documentation/asciidoc.conf.in             |   2 +-
 Documentation/asciidoctor-extensions.rb.in |   4 +-
 Documentation/config/log.adoc              |  47 +--
 Documentation/diff-options.adoc            |  40 ++-
 Documentation/git-log.adoc                 |  86 ++---
 Documentation/line-range-format.adoc       |  26 +-
 Documentation/line-range-options.adoc      |  10 +-
 Documentation/pretty-formats.adoc          | 283 +++++++--------
 Documentation/pretty-options.adoc          |  71 ++--
 Documentation/rev-list-description.adoc    |   6 +-
 Documentation/rev-list-options.adoc        | 390 ++++++++++-----------
 11 files changed, 493 insertions(+), 472 deletions(-)

base-commit: 8b6f19c

Submitted-As: https://lore.kernel.org/git/pull.1933.v3.git.1751914412.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1933.git.1749373787.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1933.v2.git.1751203241.gitgitgadget@gmail.com

pr-1940/strowk/master-v1

Toggle pr-1940/strowk/master-v1's commit message
docs: correct mistakes in git-merge

From: Timur Sultanaev <str.write@gmail.com>

Documentation for git-merge incorrectly notes that
tip of the current branch on ascii diagram is C
, while it is actually G (current branch is
master, HEAD on diagram is G).

Additionally diagrams on the page are adjusted
to use spaces instead of tabs, so that they align
regardless of tab size. This is in line with
diagrams on other git documentation pages.

Signed-off-by: Timur Sultanaev <str.write@gmail.com>

Submitted-As: https://lore.kernel.org/git/pull.1940.git.1751737158670.gitgitgadget@gmail.com

pr-git-2006/carenas/master-v1

Toggle pr-git-2006/carenas/master-v1's commit message
ci: update FreeBSD image to 14.3

From: =?UTF-8?q?Carlo=20Marcelo=20Arenas=20Bel=C3=B3n?= <carenas@gmail.com>

FreeBSD 13.4 is no longer supported, and 13.5 will be the last
release from that series, so jump instead to 14.3 which should
be supported for another 10 months and will be at that point
the oldest supported release with the interim release of 15.

While at it, move some variables to the environment and make
sure to skip a git grep test that assumes glibc regex.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>

Submitted-As: https://lore.kernel.org/git/pull.2006.git.git.1751345578742.gitgitgadget@gmail.com

pr-git-1962/brandb97/fix-pack-bitmap-leak-v6

Toggle pr-git-1962/brandb97/fix-pack-bitmap-leak-v6's commit message
pack-bitmap: fix memory leak if load_bitmap failed

Since it seems this patch has been inactive for some time, I have revised
the comments according to Taylor's feedback and submitted a new version.

This patch prevents pack-bitmap.c:load_bitmap() from nulling
bitmap_git->bitmap when loading failed. Thus eliminates memory leak. This
patch also add a test case in t5310 which use clang leak sanitizer to detect
whether leak happens when loading failed.

Lidong Yan (2):
  pack-bitmap: reword comments in test_bitmap_commits()
  pack-bitmap: add load corrupt bitmap test

Taylor Blau (1):
  pack-bitmap: fix memory leak if load_bitmap() failed

 pack-bitmap.c           | 88 ++++++++++++++++++++++++++++++-----------
 pack-bitmap.h           |  1 +
 t/helper/test-bitmap.c  |  8 ++++
 t/t5310-pack-bitmaps.sh | 30 ++++++++++++++
 4 files changed, 103 insertions(+), 24 deletions(-)

base-commit: f0135a9

Submitted-As: https://lore.kernel.org/git/pull.1962.v6.git.git.1751347929.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1962.git.git.1747052530271.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1962.v2.git.git.1747732991.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1962.v3.git.git.1748138764.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1962.v4.git.git.1748140983.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1962.v5.git.git.1748920444.gitgitgadget@gmail.com

pr-1933/jnavila/doc_git_log-v2

Toggle pr-1933/jnavila/doc_git_log-v2's commit message
doc: convert git log man page to new synopsis format

This series converts the man page of git log to the synopsis format style.
Git log is the second largest manpage after git config, which makes the
changes quite large.

A special note about the log format description which required escaping the
synopsis processing of parentheses.

Changes since V1:

 * rework the grammar style when refering to plural placeholders . The text
   is more descriptive and does not rely on puns. Puns may be difficult to
   understand and to translate.
 * change commit message to reflect the conversion of inline description of
   several option to a list.

Jean-Noël Avila (9):
  doc: convert git-log to new documentation format
  doc: git-log convert rev-list-description  to new doc format
  doc: git-log: convert line range options to new doc format
  doc: git-log: convert line range format to new doc format
  doc: git-log: convert rev list options to new doc format
  doc: git-log: convert pretty options to new doc format
  doc: git-log: convert pretty formats to new doc format
  doc: git-log: convert diff options to new doc format
  doc: git-log: convert log config to new doc format

 Documentation/asciidoc.conf.in             |   2 +-
 Documentation/asciidoctor-extensions.rb.in |   4 +-
 Documentation/config/log.adoc              |  47 +--
 Documentation/diff-options.adoc            |  40 ++-
 Documentation/git-log.adoc                 |  86 ++---
 Documentation/line-range-format.adoc       |  26 +-
 Documentation/line-range-options.adoc      |  10 +-
 Documentation/pretty-formats.adoc          | 283 +++++++--------
 Documentation/pretty-options.adoc          |  71 ++--
 Documentation/rev-list-description.adoc    |   6 +-
 Documentation/rev-list-options.adoc        | 390 ++++++++++-----------
 11 files changed, 493 insertions(+), 472 deletions(-)

base-commit: cf6f63e

Submitted-As: https://lore.kernel.org/git/pull.1933.v2.git.1751203241.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1933.git.1749373787.gitgitgadget@gmail.com

pr-1915/NinjaInShade/interactive-patch-context-v3

Toggle pr-1915/NinjaInShade/interactive-patch-context-v3's commit message
Better support for customising context lines in --patch commands

This series of patches attempt to give --interactive/--patch compatible
builtins ("add", "commit", "checkout", "reset", "restore" and "stash")
better support and nicer experience for configuring how many context lines
are shown in diffs through a variety of ways.

Prior to these patches, the user could not choose how many context lines
they saw in --patch commands (apart from one workaround by using
GIT_DIFF_OPTS=-u<number> ..., however this isn't a good user experience or a
persistent solution). Additionally, the behaviour around reading from the
diff.context and diff.interHunkContext configs was also inconsistent with
other diff generating commands such as "log -p".

The summarised changes below hopefully make this experience better and fix
some inconsistencies:

 * diff.context and diff.interHunkContext configs are now respected by
   --patch compatible commands
 * --unified and --inter-hunk-context command line options have been added
   to --patch compatible commands (which take prescendence over file
   configs)
 * "add" and "commit" in --interactive mode now expose a new "context"
   subcommand which configures the amount of context lines you wish to see
   in subsequent diffs generated from other subcommands such as "patch" or
   "diff"

The original discussion for this can be read at:

 * https://lore.kernel.org/git/CAP9jKjGb-Rcr=RLJEzeFdtrekYM+qmHy+1T1fykU3n9cV4GhGw@mail.gmail.com/

Changes since v1:

 * Update commit descriptions
 * Update tests to use the more modern and robust test_grep and test_config
   utils
 * Reword some documentation / user messages
 * Ensure each commit is atomic and builds/passes tests on it's own
 * Make new command line options DRY
 * Add tests for interhunk context interaction
 * Error if context config/command line options are negative
 * Drop previous last commit to do with new subcommand for --interactive
   add/commit. My motivations behind this patch series originally where
   quite simple, just for add-patch commands to respect context configs.
   This subcommand, after the discussion in v1, will require more thought
   and a larger implementation that what I had anticipated. I would prefer
   to leave this for another time as it's the least impactful but the most
   time intensive and complicated idea.

Changes since v2:

 * Update tests to only test single command (following Philip's suggestion)
 * Add negative option checks
 * Minor commit re-wording

Leon Michalak (4):
  test: use "test_grep"
  test: use "test_config"
  add-patch: respect diff.context configuration
  add-patch: add diff.context command line overrides

 Documentation/diff-context-options.adoc |  10 ++
 Documentation/git-add.adoc              |   2 +
 Documentation/git-checkout.adoc         |   2 +
 Documentation/git-commit.adoc           |   2 +
 Documentation/git-reset.adoc            |   2 +
 Documentation/git-restore.adoc          |   2 +
 Documentation/git-stash.adoc            |   2 +
 add-interactive.c                       |  53 +++++++++--
 add-interactive.h                       |  17 +++-
 add-patch.c                             |  11 ++-
 builtin/add.c                           |  21 ++++-
 builtin/checkout.c                      |  31 +++++-
 builtin/commit.c                        |  16 +++-
 builtin/reset.c                         |  17 +++-
 builtin/stash.c                         |  56 ++++++++---
 commit.h                                |   3 +-
 parse-options.h                         |   2 +
 t/t3701-add-interactive.sh              | 119 +++++++++++++++++++-----
 t/t4055-diff-context.sh                 |  72 +++++++++-----
 t/t9902-completion.sh                   |   2 +
 20 files changed, 362 insertions(+), 80 deletions(-)
 create mode 100644 Documentation/diff-context-options.adoc

base-commit: cf6f63e

Submitted-As: https://lore.kernel.org/git/pull.1915.v3.git.1751128486.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1915.git.1746436719.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1915.v2.git.1746884789.gitgitgadget@gmail.com

pr-git-2002/carenas/siginterrupt-v3

Toggle pr-git-2002/carenas/siginterrupt-v3's commit message
daemon: explicitly allow EINTR during poll()

This series addresses and ambiguity that is at least visible in OpenBSD,
where zombie proceses would only be cleared after a new connection is
received.

The underlying problem is that when this code was originally introduced,
SA_RESTART was not widely implemented, and the signal() call usually
implemented SysV like semantics, at least until it started being
reimplemented by calling sigaction() internally.

Changes since v2

 * Add a new patch 2 that modifies windows' sigaction so there is no more
   need for a fallback
 * Hopefully no more silly mistakes and a variable that finally makes sense

Changes since v1

 * Almost all references to siginterrupt has been removed and a better named
   variable used instead
 * Changes had been abstracted to minimize ifdefs and their introduction
   staged more naturally

Carlo Marcelo Arenas Belón (4):
  compat/posix.h: track SA_RESTART fallback
  compat/mingw: allow sigaction(SIGCHLD)
  daemon: use sigaction() to install child_handler()
  daemon: explicitly allow EINTR during poll()

 Makefile             |  5 +++++
 compat/mingw-posix.h |  2 +-
 compat/mingw.c       |  4 +++-
 compat/posix.h       |  8 ++++++++
 config.mak.uname     |  7 ++++---
 configure.ac         | 16 ++++++++++++++++
 daemon.c             | 33 ++++++++++++++++++++++++++++-----
 meson.build          |  4 ++++
 8 files changed, 69 insertions(+), 10 deletions(-)

base-commit: cb3b403

Submitted-As: https://lore.kernel.org/git/pull.2002.v3.git.git.1750927988.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.2002.git.git.1750774122.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.2002.v2.git.git.1750836928.gitgitgadget@gmail.com

pr-git-2002/carenas/siginterrupt-v2

Toggle pr-git-2002/carenas/siginterrupt-v2's commit message
daemon: explicitly allow EINTR during poll()

This series addresses and ambiguity that is at least visible in OpenBSD,
where zombie proceses would only be cleared after a new connection is
received.

The underlying problem is that when this code was originally introduced,
SA_RESTART was not widely implemented, and the signal() call usually
implemented SysV like semantics, at least until it started being
reimplemented by calling sigaction() internally.

Changes since v1

 * Almost all references to siginterrupt has been removed and a better named
   variable used instead
 * Changes had been anstracted to minimize ifdefs and their introduction
   staged more naturally

Carlo Marcelo Arenas Belón (3):
  compat/posix.h: track SA_RESTART fallback
  daemon: use sigaction() to install child_handler()
  daemon: explicitly allow EINTR during poll()

 Makefile             |  6 +++++
 compat/mingw-posix.h |  1 -
 compat/posix.h       |  8 +++++++
 config.mak.uname     |  7 +++---
 configure.ac         | 17 +++++++++++++++
 daemon.c             | 52 +++++++++++++++++++++++++++++++++++++++-----
 meson.build          |  4 ++++
 7 files changed, 85 insertions(+), 10 deletions(-)

base-commit: cb3b403

Submitted-As: https://lore.kernel.org/git/pull.2002.v2.git.git.1750836928.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.2002.git.git.1750774122.gitgitgadget@gmail.com

pr-git-2002/carenas/siginterrupt-v1

Toggle pr-git-2002/carenas/siginterrupt-v1's commit message
daemon: explicitly allow EINTR during poll()

This series addresses and ambiguity that is at least visible in OpenBSD,
where zombie proceses would only be cleared after a new connection is
received.

The underlying problem is that when this code was originally introduced,
SA_RESTART was not widely implemented, and the signal() call usually
implemented SysV like semantics, at least until it started being
reimplemented by calling sigaction() internally.

The main change is implemented in the third patch, but the changes to
prepare for it that were done in the second patch, also solve a know crasher
in AIX.

Carlo Marcelo Arenas Belón (3):
  compat/posix.h: track SA_RESTART fallback
  daemon: use sigaction() to install child_handler()
  daemon: explicitly allow EINTR during poll()

 Makefile         |  6 ++++++
 compat/posix.h   |  7 +++++++
 config.mak.uname |  7 ++++---
 configure.ac     |  5 +++++
 daemon.c         | 30 +++++++++++++++++++++++++-----
 meson.build      |  1 +
 6 files changed, 48 insertions(+), 8 deletions(-)

base-commit: cb3b403

Submitted-As: https://lore.kernel.org/git/pull.2002.git.git.1750774122.gitgitgadget@gmail.com
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载