Skip to content

Tags: gitgitgadget/git

Tags

pr-1933/jnavila/doc_git_log-v2

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

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

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

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

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

pr-1774/ToBoMi/detect_renamed_files_when_opening_diff-v6

gitk: add external diff file rename detection

From: Tobias Boesch <tobias.boesch@miele.com>

If a file is renamed between commits and an external diff is started
through gitk on the original or the renamed file name,
gitk is unable to open the renamed file in the external diff editor.
It fails to fetch the renamed file from git, because it fetches it
using its original path in contrast to using the renamed path of the
file.
Detect the rename and open the external diff with the original and
the renamed file instead of no file (fetch the renamed file path and
name from git) no matter if the original or the renamed file is
selected in gitk.
Since moved or renamed file are handled the same way do this also
for moved files.

Signed-off-by: Tobias Boesch <tobias.boesch@miele.com>

Submitted-As: https://lore.kernel.org/git/pull.1774.v6.git.1750755954011.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1774.git.1724318874608.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1774.v2.git.1725607698680.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1774.v3.git.1741093275742.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1774.v4.git.1745830037917.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1774.v5.git.1749544174590.gitgitgadget@gmail.com

pr-git-2000/parched/restore-term-windows-fix-v1

Ensure restore_term works correctly with DUPLEX

From: James Duley <jagduley@gmail.com>

Previously, if save_term/restore_term was called with the DUPLEX flag
and then without the flag, an assertion was hit.
> Assertion failed: hconout != INVALID_HANDLE_VALUE,
> file compat/terminal.c, line 283

This is because save_term doesn't set cmode_out when not DUPLEX,
so an old version of cmode_out was being used.
Therefore, hconout is the correct thing for restore to check
to decide whether to restore stdout console mode.

I saw this on Windows with interactive.singleKey when doing `git add -p`.
Specifically, after hitting `e` to edit in vim, once on to the prompt
for the next hunk, pressing any key results in the assertion.

Signed-off-by: James Duley <jagduley@gmail.com>

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

v2.50.0

Verified

This tag was signed with the committer’s verified signature.
gitster Junio C Hamano
Git 2.50

pr-git-1998/mugitya03/mlk-3-v1

Allocate msg only after fatal checks to avoid leaks

From: jinyaoguo <guo846@purdue.edu>

In parse_reuse_arg, we previously called xmalloc and strbuf_init
before resolving the ref and reading the object, leading to a
leaked msg on die() paths. This change moves the allocation of
struct note_msg until after repo_get_oid and
repo_read_object_file succeed, ensuring no heap memory is held
when a fatal error is triggered.

Signed-off-by: jinyaoguo <guo846@purdue.edu>

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

pr-git-1997/mugitya03/mlk-2-v1

Fix memory leak in function handle_content_type

From: jinyaoguo <guo846@purdue.edu>

The function handle_content_type allocates memory for boundary
using xmalloc(sizeof(struct strbuf)). If (++mi->content_top >=
&mi->content[MAX_BOUNDARIES]) is true, the function returns
without freeing boundary.

Signed-off-by: Alex Guo <alexguo1023@gmail.com>

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