Git development
 help / color / mirror / Atom feed
* Re: [PATCH 07/12] fsmonitor: refactor untracked-cache invalidation
From: Junio C Hamano @ 2024-02-14 16:46 UTC (permalink / raw)
  To: Jeff Hostetler via GitGitGadget; +Cc: git, Jeff Hostetler
In-Reply-To: <1df4019931c29824b174defb75e09823d604219e.1707857541.git.gitgitgadget@gmail.com>

"Jeff Hostetler via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Jeff Hostetler <jeffhostetler@github.com>
>
> Signed-off-by: Jeff Hostetler <jeffhostetler@github.com>
> ---
>  fsmonitor.c | 38 ++++++++++++++++++++++++++------------
>  1 file changed, 26 insertions(+), 12 deletions(-)

Sorry, but the proposed commit log is way lacking for this
particular step.  Readers have already understood, after reading
steps like [04/12] and [05/12], that you use the verb "refactor" in
its usual sense, i.e. reorganize the code around without changing
behaviour in order to enhance readability and to make it easier for
code reuse in future steps, and these two steps did exactly that:
helper functions are split out of larger functions, presumably
either to allow adding new callers to the helpers, or to make the
result of adding more code to the caller easier to follow [*].

However, the changes in this step look vastly different, and it is
not even clear if this change intends to keep the behaviour before
and after it the same, or if it does, how they are the same.

I can sort-of see that the original code made a call to
untracked_cache_invalidate_path() at the very end of the
fsmonitor_refresh_callback(), but the updated code no longer does
so.  Why?  Is it because it is the root cause of an unstated bug
that we don't do so until the end in the current code?  Is it
because the order does not matter (how and why?) and the resulting
code becomes better (how?  simpler to follow? more performant?
avoids duplicated work?  something else)?

It does not help to call a new helper function with a cryptic "my_"
name, either.

Please try again?  Thanks.


[Footnote] 

 * These two are vastly different goals, and there may be other
   reasons why you are doing such refactoring.  It would have been
   nicer if such a preliminary refactoring steps had explained what
   the intended course of evolution for the code involved in the
   refactoring is.



>
> diff --git a/fsmonitor.c b/fsmonitor.c
> index 754fe20cfd0..14585b6c516 100644
> --- a/fsmonitor.c
> +++ b/fsmonitor.c
> @@ -183,11 +183,35 @@ static int query_fsmonitor_hook(struct repository *r,
>  	return result;
>  }
>  
> +/*
> + * Invalidate the untracked cache for the given pathname.  Copy the
> + * buffer to a proper null-terminated string (since the untracked
> + * cache code does not use (buf, len) style argument).  Also strip any
> + * trailing slash.
> + */
> +static void my_invalidate_untracked_cache(
> +	struct index_state *istate, const char *name, int len)
> +{
> +	struct strbuf work_path = STRBUF_INIT;
> +
> +	if (!len)
> +		return;
> +
> +	if (name[len-1] == '/')
> +		len--;
> +
> +	strbuf_add(&work_path, name, len);
> +	untracked_cache_invalidate_path(istate, work_path.buf, 0);
> +	strbuf_release(&work_path);
> +}
> +
>  static void fsmonitor_refresh_callback_unqualified(
>  	struct index_state *istate, const char *name, int len, int pos)
>  {
>  	int i;
>  
> +	my_invalidate_untracked_cache(istate, name, len);
> +
>  	if (pos >= 0) {
>  		/*
>  		 * We have an exact match for this path and can just
> @@ -253,6 +277,8 @@ static int fsmonitor_refresh_callback_slash(
>  	int i;
>  	int nr_in_cone = 0;
>  
> +	my_invalidate_untracked_cache(istate, name, len);
> +
>  	if (pos < 0)
>  		pos = -pos - 1;
>  
> @@ -278,21 +304,9 @@ static void fsmonitor_refresh_callback(struct index_state *istate, char *name)
>  
>  	if (name[len - 1] == '/') {
>  		fsmonitor_refresh_callback_slash(istate, name, len, pos);
> -
> -		/*
> -		 * We need to remove the traling "/" from the path
> -		 * for the untracked cache.
> -		 */
> -		name[len - 1] = '\0';
>  	} else {
>  		fsmonitor_refresh_callback_unqualified(istate, name, len, pos);
>  	}
> -
> -	/*
> -	 * Mark the untracked cache dirty even if it wasn't found in the index
> -	 * as it could be a new untracked file.
> -	 */
> -	untracked_cache_invalidate_path(istate, name, 0);
>  }
>  
>  /*

^ permalink raw reply

* Re: [PATCH v2 4/4] rev-list: allow missing tips with --missing=[print|allow*]
From: Junio C Hamano @ 2024-02-14 16:49 UTC (permalink / raw)
  To: Christian Couder
  Cc: Linus Arver, git, Patrick Steinhardt, John Cai, Christian Couder
In-Reply-To: <CAP8UFD25urs1ud16c4BhMLFxHQHuDde+KV71BN6M3vDQqJ-YwA@mail.gmail.com>

Christian Couder <christian.couder@gmail.com> writes:

>> >> +            /* Already add missing tips */
>> >> +            oidset_insert_from_set(&missing_objects, &revs.missing_commits);
>> >> +            oidset_clear(&revs.missing_commits);
>> >> +    }
>> >
>> > It is unclear what "already" here refers to, at least to me.
>
> I wanted to hint that we already have some missing objects that we can
> add to the set. But it's not an important detail and I agree it can be
> confusing.

I was confused primarily because "already" was not sitting next to
"missing".  I would have understood "Add already-missing tips" just
fine ;-)

^ permalink raw reply

* Re: What's cooking in git.git (Feb 2024, #05; Tue, 13)
From: Junio C Hamano @ 2024-02-14 16:57 UTC (permalink / raw)
  To: Ghanshyam Thakkar; +Cc: git
In-Reply-To: <CZ4WA9QJXMX2.3BK6C9ZGOSN7A@gmail.com>

"Ghanshyam Thakkar" <shyamthakkar001@gmail.com> writes:

> I see that it is already in 'next'. However, I have rerolled it for a
> single line change. If find it is worth it, here it is: 
> https://lore.kernel.org/git/20240213000601.520731-2-shyamthakkar001@gmail.com/

The usual procedure is that once a topic hits 'next', it gets
improved only by piling incremental updates on top with explanation.
The idea is: if all of us thought it has seen enough eyeballs and is
good enough for 'next', yet we later find there was something we all
missed, that is worth a separate explanation, e.g., "The primary
motivation behind the series is still good, but for such and such
reasons we missed this case we are fixing."

Unless it turns out that the approach was fundamentally wrong and
such an incremental update boils down to almost reverting the
earlier one entirely and replacing it with the newer one.  In such a
case, we do revert the earlier and replace it with the newer, in
'next'.

But as the development community members work across timezones on
their own pace, mails cross and mistakes happen.  I've reverted the
merge of the previous one from 'next' and queued the new one (I do
not recall offhand if the updated one is already in 'next', though).

Thanks.

^ permalink raw reply

* Re: [PATCH v4 1/5] refs: introduce `is_pseudoref()` and `is_headref()`
From: Junio C Hamano @ 2024-02-14 16:59 UTC (permalink / raw)
  To: Karthik Nayak; +Cc: Patrick Steinhardt, git, phillip.wood123, Jeff King
In-Reply-To: <CAOLa=ZQN17Nyxo-uv7CytO1RkaPu9TPfeVHANvV=tycCGpy+Ng@mail.gmail.com>

Karthik Nayak <karthik.188@gmail.com> writes:

> Junio, let me know if you want me to reroll for the whitespace issues.

I think I applied with "am --whitespace=fix", so we should be OK,
but if you can double check the result that would be appreciated.

^ permalink raw reply

* [ANNOUNCE] Git v2.44.0-rc1
From: Junio C Hamano @ 2024-02-14 17:04 UTC (permalink / raw)
  To: git; +Cc: Linux Kernel, git-packagers

A release candidate Git v2.44.0-rc1 is now available for testing at
the usual places.  It is comprised of 473 non-merge commits since
v2.43.0, contributed by 72 people, 33 of which are new faces [*].

The tarballs are found at:

    https://www.kernel.org/pub/software/scm/git/testing/

The following public repositories all have a copy of the
'v2.44.0-rc1' tag and the 'master' branch that the tag points at:

  url = https://git.kernel.org/pub/scm/git/git
  url = https://kernel.googlesource.com/pub/scm/git/git
  url = git://repo.or.cz/alt-git.git
  url = https://github.com/gitster/git

New contributors whose contributions weren't in v2.43.0 are as follows.
Welcome to the Git development community!

  Achu Luma, Antonin Delpeuch, Benjamin Lehmann, Britton Leo
  Kerin, Carlos Andrés Ramírez Cataño, Chandra Pratap, Ghanshyam
  Thakkar, Illia Bobyr, James Touton, Janik Haag, Joanna Wang, Josh
  Brobst, Julian Prein, Justin Tobler, Kyle Lippincott, Maarten van
  der Schrieck, Marcel Krause, Marcelo Roberto Jimenez, Michael
  Lohmann, moti sd, Nikolay Borisov, Nikolay Edigaryev, Ondrej
  Pohorelsky, Sam Delmerico, Sergey Kosukhin, Shreyansh Paliwal,
  Sören Krecker, Stan Hu, Tamino Bauknecht, Wilfred Hughes,
  Willem Verstraeten, Xiaoguang WANG, and Zach FettersMoore.

Returning contributors who helped this release are as follows.
Thanks for your continued support.

  Andy Koppe, Arthur Chan, Calvin Wan, Carlo Marcelo Arenas Belón,
  Christian Couder, Dragan Simic, Elijah Newren, Eric Sunshine,
  Glen Choo, Han-Wen Nienhuys, Jean-Noël Avila, Jeff Hostetler,
  Jeff King, Jiang Xin, Johannes Schindelin, John Cai, Jonathan
  Tan, Josh Soref, Josh Steadmon, Josip Sokcevic, Junio C Hamano,
  Konstantin Ryabitsev, Kristoffer Haugsbakk, Linus Arver,
  Matthias Aßhauer, M Hickford, Oswald Buddenhagen, Patrick
  Steinhardt, Philippe Blain, Phillip Wood, Randall S. Becker,
  René Scharfe, Rubén Justo, Simon Ser, SZEDER Gábor, Taylor
  Blau, Todd Zullinger, Toon Claes, and Victoria Dye.

[*] We are counting not just the authorship contribution but issue
    reporting, mentoring, helping and reviewing that are recorded in
    the commit trailers.

----------------------------------------------------------------

Git v2.44 Release Notes (draft)
===============================

Backward Compatibility Notes

 * "git chekcout -B <branch>" used to allow switching to a branch that
   is in use on another worktree, but this was by mistake.  The users
   need to use "--ignore-other-worktrees" option.


UI, Workflows & Features

 * "git add" and "git stash" learned to support the ":(attr:...)"
   magic pathspec.

 * "git rebase --autosquash" is now enabled for non-interactive rebase,
   but it is still incompatible with the apply backend.

 * Introduce "git replay", a tool meant on the server side without
   working tree to recreate a history.

 * "git merge-file" learned to take the "--diff-algorithm" option to
   use algorithm different from the default "myers" diff.

 * Command line completion (in contrib/) learned to complete path
   arguments to the "add/set" subcommands of "git sparse-checkout"
   better.

 * "git checkout -B <branch> [<start-point>]" allowed a branch that is
   in use in another worktree to be updated and checked out, which
   might be a bit unexpected.  The rule has been tightened, which is a
   breaking change.  "--ignore-other-worktrees" option is required to
   unbreak you, if you are used to the current behaviour that "-B"
   overrides the safety.

 * The builtin_objectmode attribute is populated for each path
   without adding anything in .gitattributes files, which would be
   useful in magic pathspec, e.g., ":(attr:builtin_objectmode=100755)"
   to limit to executables.

 * "git fetch" learned to pay attention to "fetch.all" configuration
   variable, which pretends as if "--all" was passed from the command
   line when no remote parameter was given.

 * In addition to (rather cryptic) Security Identifiers, show username
   and domain in the error message when we barf on mismatch between
   the Git directory and the current user on Windows.

 * The error message given when "git branch -d branch" fails due to
   commits unique to the branch has been split into an error and a new
   conditional advice message.

 * When given an existing but unreadable file as a configuration file,
   gitweb behaved as if the file did not exist at all, but now it
   errors out.  This is a change that may break backward compatibility.

 * When $HOME/.gitignore is missing but XDG config file available, we
   should write into the latter, not former.  "git gc" and "git
   maintenance" wrote into a wrong "global config" file, which have
   been corrected.

 * Define "special ref" as a very narrow set that consists of
   FETCH_HEAD and MERGE_HEAD, and clarify everything else that used to
   be classified as such are actually just pseudorefs.

 * All conditional "advice" messages show how to turn them off, which
   becomes repetitive.  Setting advice.* configuration explicitly on
   now omits the instruction part.

 * The "disable repository discovery of a bare repository" check,
   triggered by setting safe.bareRepository configuration variable to
   'explicit', has been loosened to exclude the ".git/" directory inside
   a non-bare repository from the check.  So you can do "cd .git &&
   git cmd" to run a Git command that works on a bare repository without
   explicitly specifying $GIT_DIR now.

 * The completion script (in contrib/) learned more options that can
   be used with "git log".

 * The labels on conflict markers for the common ancestor, our version,
   and the other version are available to custom 3-way merge driver
   via %S, %X, and %Y placeholders.

 * The write codepath for the reftable data learned to honor
   core.fsync configuration.

 * The "--fsck-objects" option of "git index-pack" now can take the
   optional parameter to tweak severity of different fsck errors.

 * The wincred credential backend has been taught to support oauth
   refresh token the same way as credential-cache and
   credential-libsecret backends.

 * Command line completion support (in contrib/) has been
   updated for "git bisect".

 * "git branch" and friends learned to use the formatted text as
   sorting key, not the underlying timestamp value, when the --sort
   option is used with author or committer timestamp with a format
   specifier (e.g., "--sort=creatordate:format:%H:%M:%S").


Performance, Internal Implementation, Development Support etc.

 * Process to add some form of low-level unit tests has started.

 * Add support for GitLab CI.

 * "git for-each-ref --no-sort" still sorted the refs alphabetically
   which paid non-trivial cost.  It has been redefined to show output
   in an unspecified order, to allow certain optimizations to take
   advantage of.

 * Simplify API implementation to delete references by eliminating
   duplication.

 * Subject approxidate() and show_date() machinery to OSS-Fuzz.

 * A new helper to let us pretend that we called lstat() when we know
   our cache_entry is up-to-date via fsmonitor.

 * The optimization based on fsmonitor in the "diff --cached"
   codepath is resurrected with the "fake-lstat" introduced earlier.

 * Test balloon to use C99 "bool" type from <stdbool.h> has been
   added.

 * "git clone" has been prepared to allow cloning a repository with
   non-default hash function into a repository that uses the reftable
   backend.

 * Streaming spans of packfile data used to be done only from a
   single, primary, pack in a repository with multiple packfiles.  It
   has been extended to allow reuse from other packfiles, too.

 * Comment updates to help developers not to attempt to modify
   messages from plumbing commands that must stay constant.

   It might make sense to reassess the plumbing needs every few years,
   but that should be done as a separate effort.

 * Move test-ctype helper to the unit-test framework.

 * Instead of manually creating refs/ hierarchy on disk upon a
   creation of a secondary worktree, which is only usable via the
   files backend, use the refs API to populate it.

 * CI for GitLab learned to drive macOS jobs.

 * A few tests to "git commit -o <pathspec>" and "git commit -i
   <pathspec>" has been added.

 * Tests on ref API are moved around to prepare for reftable.

 * The Makefile often had to say "-L$(path) -R$(path)" that repeats
   the path to the same library directory for link time and runtime.
   A Makefile template is used to reduce such repetition.

 * The priority queue test has been migrated to the unit testing
   framework.

 * Setting `feature.experimental` opts the user into multi-pack reuse
   experiment

 * Squelch node.js 16 deprecation warnings from GitHub Actions CI
   by updating actions/github-script and actions/checkout that use
   node.js 20.

 * The mechanism to report the filename in the source code, used by
   the unit-test machinery, assumed that the compiler expanded __FILE__
   to the path to the source given to the $(CC), but some compilers
   give full path, breaking the output.  This has been corrected.


Fixes since v2.43
-----------------

 * The way CI testing used "prove" could lead to running the test
   suite twice needlessly, which has been corrected.

 * Update ref-related tests.

 * "git format-patch --encode-email-headers" ignored the option when
   preparing the cover letter, which has been corrected.

 * Newer versions of Getopt::Long started giving warnings against our
   (ab)use of it in "git send-email".  Bump the minimum version
   requirement for Perl to 5.8.1 (from September 2002) to allow
   simplifying our implementation.

 * Earlier we stopped relying on commit-graph that (still) records
   information about commits that are lost from the object store,
   which has negative performance implications.  The default has been
   flipped to disable this pessimization.

 * Stale URLs have been updated to their current counterparts (or
   archive.org) and HTTP links are replaced with working HTTPS links.

 * trace2 streams used to record the URLs that potentially embed
   authentication material, which has been corrected.

 * The sample pre-commit hook that tries to catch introduction of new
   paths that use potentially non-portable characters did not notice
   an existing path getting renamed to such a problematic path, when
   rename detection was enabled.

 * The command line parser for the "log" family of commands was too
   loose when parsing certain numbers, e.g., silently ignoring the
   extra 'q' in "git log -n 1q" without complaining, which has been
   tightened up.

 * "git $cmd --end-of-options --rev -- --path" for some $cmd failed
   to interpret "--rev" as a rev, and "--path" as a path.  This was
   fixed for many programs like "reset" and "checkout".

 * "git bisect reset" has been taught to clean up state files and refs
   even when BISECT_START file is gone.

 * Some codepaths did not correctly parse configuration variables
   specified with valueless "true", which has been corrected.

 * Code clean-up for sanity checking of command line options for "git
   show-ref".

 * The code to parse the From e-mail header has been updated to avoid
   recursion.

 * "git fetch --atomic" issued an unnecessary empty error message,
   which has been corrected.

 * Command line completion script (in contrib/) learned to work better
   with the reftable backend.

 * "git status" is taught to show both the branch being bisected and
   being rebased when both are in effect at the same time.

 * "git archive --list extra garbage" silently ignored excess command
   line parameters, which has been corrected.

 * "git sparse-checkout set" added default patterns even when the
   patterns are being fed from the standard input, which has been
   corrected.

 * "git sparse-checkout (add|set) --[no-]cone --end-of-options" did
   not handle "--end-of-options" correctly after a recent update.

 * Unlike other environment variables that took the usual
   true/false/yes/no as well as 0/1, GIT_FLUSH only understood 0/1,
   which has been corrected.

 * Clearing in-core repository (happens during e.g., "git fetch
   --recurse-submodules" with commit graph enabled) made in-core
   commit object in an inconsistent state by discarding the necessary
   data from commit-graph too early, which has been corrected.

 * Update to a new feature recently added, "git show-ref --exists".

 * oss-fuzz tests are built and run in CI.
   (merge c4a9cf1df3 js/oss-fuzz-build-in-ci later to maint).

 * Rename detection logic ignored the final line of a file if it is an
   incomplete line.

 * GitHub CI update.
   (merge 0188b2c8e0 pb/ci-github-skip-logs-for-broken-tests later to maint).

 * "git diff --no-rename A B" did not disable rename detection but did
   not trigger an error from the command line parser.

 * "git archive --remote=<remote>" learned to talk over the smart
   http (aka stateless) transport.
   (merge 176cd68634 jx/remote-archive-over-smart-http later to maint).

 * Fetching via protocol v0 over Smart HTTP transport sometimes failed
   to correctly auto-follow tags.
   (merge fba732c462 jk/fetch-auto-tag-following-fix later to maint).

 * The documentation for the --exclude-per-directory option marked it
   as deprecated, which confused readers into thinking there may be a
   plan to remove it in the future, which was not our intention.
   (merge 0009542cab jc/ls-files-doc-update later to maint).

 * "git diff --no-index file1 file2" segfaulted while invoking the
   external diff driver, which has been corrected.

 * Rewrite //-comments to /* comments */ in files whose comments
   prevalently use the latter.

 * Cirrus CI jobs started breaking because we specified version of
   FreeBSD that is no longer available, which has been corrected.
   (merge 81fffb66d3 cb/use-freebsd-13-2-at-cirrus-ci later to maint).

 * A caller called index_file_exists() that takes a string expressed
   as <ptr, length> with a wrong length, which has been corrected.
   (merge 156e28b36d jh/sparse-index-expand-to-path-fix later to maint).

 * A failed "git tag -s" did not necessarily result in an error
   depending on the crypto backend, which has been corrected.

 * "git stash" sometimes was silent even when it failed due to
   unwritable index file, which has been corrected.

 * "git show-ref --verify" did not show things like "CHERRY_PICK_HEAD",
   which has been corrected.

 * Recent conversion to allow more than 0/1 in GIT_FLUSH broke the
   mechanism by flipping what yes/no means by mistake, which has been
   corrected.

 * Other code cleanup, docfix, build fix, etc.
   (merge 5aea3955bc rj/clarify-branch-doc-m later to maint).
   (merge 9cce3be2df bk/bisect-doc-fix later to maint).
   (merge 8430b438f6 vd/fsck-submodule-url-test later to maint).
   (merge 3cb4384683 jc/t0091-with-unknown-git later to maint).

----------------------------------------------------------------

Changes since v2.43.0 are as follows:

Achu Luma (2):
      unit-tests: rewrite t/helper/test-ctype.c as a unit test
      t2400: avoid losing exit status to pipes

Andy Koppe (3):
      rebase: fully ignore rebase.autoSquash without -i
      rebase: support --autosquash without -i
      rebase: rewrite --(no-)autosquash documentation

Antonin Delpeuch (2):
      merge-file: add --diff-algorithm option
      merge-ll: expose revision names to custom drivers

Arthur Chan (1):
      fuzz: add new oss-fuzz fuzzer for date.c / date.h

Britton Leo Kerin (9):
      doc: use singular form of repeatable path arg
      doc: refer to pathspec instead of path
      completion: tests: always use 'master' for default initial branch name
      completion: bisect: complete bad, new, old, and help subcommands
      completion: bisect: complete custom terms and related options
      completion: bisect: complete missing --first-parent and - -no-checkout options
      completion: new function __git_complete_log_opts
      completion: bisect: complete log opts for visualize subcommand
      completion: bisect: recognize but do not complete view subcommand

Carlo Marcelo Arenas Belón (1):
      ci: update FreeBSD cirrus job

Chandra Pratap (4):
      sideband.c: remove redundant 'NEEDSWORK' tag
      write-or-die: make GIT_FLUSH a Boolean environment variable
      t4129: prevent loss of exit code due to the use of pipes
      tests: move t0009-prio-queue.sh to the new unit testing framework

Elijah Newren (32):
      t6429: remove switching aspects of fast-rebase
      replay: introduce new builtin
      replay: start using parse_options API
      replay: die() instead of failing assert()
      replay: introduce pick_regular_commit()
      replay: change rev walking options
      replay: add an important FIXME comment about gpg signing
      replay: remove progress and info output
      replay: remove HEAD related sanity check
      replay: make it a minimal server side command
      replay: use standard revision ranges
      replay: add --advance or 'cherry-pick' mode
      replay: add --contained to rebase contained branches
      replay: stop assuming replayed branches do not diverge
      completion: squelch stray errors in sparse-checkout completion
      completion: fix logic for determining whether cone mode is active
      completion: avoid misleading completions in cone mode
      completion: avoid user confusion in non-cone mode
      treewide: remove unnecessary includes from header files
      treewide: remove unnecessary includes in source files
      archive.h: remove unnecessary include
      blame.h: remove unnecessary includes
      fsmonitor--daemon.h: remove unnecessary includes
      http.h: remove unnecessary include
      line-log.h: remove unnecessary include
      pkt-line.h: remove unnecessary include
      submodule-config.h: remove unnecessary include
      trace2/tr2_tls.h: remove unnecessary include
      treewide: add direct includes currently only pulled in transitively
      treewide: remove unnecessary includes in source files
      sparse-checkout: be consistent with end of options markers
      diffcore-delta: avoid ignoring final 'line' of file

Eric Sunshine (1):
      git-add.txt: add missing short option -A to synopsis

Ghanshyam Thakkar (4):
      t7501: add tests for --include and --only
      t7501: add tests for --amend --signoff
      t0024: avoid losing exit status to pipes
      t0024: style fix

Illia Bobyr (1):
      rebase: clarify --reschedule-failed-exec default

James Touton (1):
      git-p4: use raw string literals for regular expressions

Jean-Noël Avila (2):
      doc: enforce dashes in placeholders
      doc: enforce placeholders in documentation

Jeff Hostetler (4):
      trace2: fix signature of trace2_def_param() macro
      t0211: test URL redacting in PERF format
      t0212: test URL redacting in EVENT format
      sparse-index: pass string length to index_file_exists()

Jeff King (38):
      commit-graph: handle overflow in chunk_size checks
      midx: check consistency of fanout table
      commit-graph: drop redundant call to "lite" verification
      commit-graph: clarify missing-chunk error messages
      commit-graph: abort as soon as we see a bogus chunk
      commit-graph: use fanout value for graph size
      commit-graph: check order while reading fanout chunk
      commit-graph: drop verify_commit_graph_lite()
      commit-graph: mark chunk error messages for translation
      parse-options: decouple "--end-of-options" and "--"
      bisect: always clean on reset
      config: handle NULL value when parsing non-bools
      setup: handle NULL value when parsing extensions
      trace2: handle NULL values in tr2_sysenv config callback
      help: handle NULL value for alias.* config
      submodule: handle NULL value when parsing submodule.*.branch
      trailer: handle NULL value when parsing trailer-specific config
      fsck: handle NULL value when parsing message config
      config: reject bogus values for core.checkstat
      git_xmerge_config(): prefer error() to die()
      imap-send: don't use git_die_config() inside callback
      config: use config_error_nonbool() instead of custom messages
      diff: give more detailed messages for bogus diff.* config
      config: use git_config_string() for core.checkRoundTripEncoding
      push: drop confusing configset/callback redundancy
      gpg-interface: drop pointless config_error_nonbool() checks
      sequencer: simplify away extra git_config_string() call
      mailinfo: fix out-of-bounds memory reads in unquote_quoted_pair()
      t5100: make rfc822 comment test more careful
      mailinfo: avoid recursion when unquoting From headers
      t1006: add tests for %(objectsize:disk)
      commit-graph: retain commit slab when closing NULL commit_graph
      index-pack: spawn threads atomically
      transport-helper: re-examine object dir after fetching
      diff: handle NULL meta-info when spawning external diff
      Makefile: use mkdir_p_parent_template for UNIT_TEST_BIN
      Makefile: remove UNIT_TEST_BIN directory with "make clean"
      t/Makefile: get UNIT_TESTS list from C sources

Jiang Xin (11):
      t5574: test porcelain output of atomic fetch
      fetch: no redundant error message for atomic fetch
      test-pkt-line: add option parser for unpack-sideband
      pkt-line: memorize sideband fragment in reader
      pkt-line: do not chomp newlines for sideband messages
      transport-helper: no connection restriction in connect_helper
      remote-curl: supports git-upload-archive service
      transport-helper: protocol v2 supports upload-archive
      http-backend: new rpc-service for git-upload-archive
      transport-helper: call do_take_over() in connect_helper
      transport-helper: call do_take_over() in process_connect

Joanna Wang (2):
      attr: enable attr pathspec magic for git-add and git-stash
      attr: add builtin objectmode values support

Johannes Schindelin (13):
      artifacts-tar: when including `.dll` files, don't forget the unit-tests
      cmake: fix typo in variable name
      cmake: also build unit tests
      cmake: use test names instead of full paths
      unit-tests: do not mistake `.pdb` files for being executable
      cmake: handle also unit tests
      unit-tests: do show relative file paths
      ci: avoid running the test suite _twice_
      packfile.c: fix a typo in `each_file_in_pack_dir_fn()`'s declaration
      trace2: redact passwords from https:// URLs by default
      win32: special-case `ENOSPC` when writing to a pipe
      ci: bump remaining outdated Actions versions
      ci(linux32): add a note about Actions that must not be updated

John Cai (15):
      t3210: move to t0601
      remove REFFILES prerequisite for some tests in t1405 and t2017
      t1414: convert test to use Git commands instead of writing refs manually
      t1404: move reffiles specific tests to t0600
      t1405: move reffiles specific tests to t0601
      t1406: move reffiles specific tests to t0600
      t1410: move reffiles specific tests to t0600
      t1415: move reffiles specific tests to t0601
      t1503: move reffiles specific tests to t0600
      t3903: make drop stash test ref backend agnostic
      t4202: move reffiles specific tests to t0600
      t5312: move reffiles specific tests to t0601
      reftable: honor core.fsync
      index-pack: test and document --strict=<msg-id>=<severity>...
      index-pack: --fsck-objects to take an optional argument for fsck msgs

Josh Brobst (1):
      builtin/reflog.c: fix dry-run option short name

Josh Soref (13):
      doc: update links to current pages
      doc: switch links to https
      doc: update links for andre-simon.de
      doc: refer to internet archive
      CodingGuidelines: move period inside parentheses
      CodingGuidelines: write punctuation marks
      SubmittingPatches: drop ref to "What's in git.git"
      SubmittingPatches: discourage new trailers
      SubmittingPatches: update extra tags list
      SubmittingPatches: provide tag naming advice
      SubmittingPatches: clarify GitHub visual
      SubmittingPatches: clarify GitHub artifact format
      SubmittingPatches: hyphenate non-ASCII

Josh Steadmon (4):
      unit tests: add a project plan document
      ci: run unit tests in CI
      fuzz: fix fuzz test build rules
      ci: build and run minimal fuzzers in GitHub CI

Julian Prein (1):
      hooks--pre-commit: detect non-ASCII when renaming

Junio C Hamano (55):
      cache: add fake_lstat()
      diff-lib: fix check_removed() when fsmonitor is active
      checkout: refactor die_if_checked_out() caller
      orphan/unborn: add to the glossary and use them consistently
      orphan/unborn: fix use of 'orphan' in end-user facing messages
      revision: parse integer arguments to --max-count, --skip, etc., more carefully
      Start the 2.44 cycle
      checkout: forbid "-B <branch>" from touching a branch used elsewhere
      git.txt: HEAD is not that special
      git-bisect.txt: BISECT_HEAD is not that special
      refs.h: HEAD is not that special
      docs: AUTO_MERGE is not that special
      docs: MERGE_AUTOSTASH is not that special
      doc: format.notes specify a ref under refs/notes/ hierarchy
      The second batch
      remote.h: retire CAS_OPT_NAME
      The third batch
      archive: "--list" does not take further options
      sparse-checkout: use default patterns for 'set' only !stdin
      The fourth batch
      The fifth batch
      The sixth batch
      messages: mark some strings with "up-to-date" not to touch
      The seventh batch
      The eighth batch
      The ninth batch
      Docs: majordomo@vger.kernel.org has been decomissioned
      CoC: whitespace fix
      ls-files: avoid the verb "deprecate" for individual options
      The tenth batch
      builtin/worktree: comment style fixes
      merge-ort.c: comment style fix
      reftable/pq_test: comment style fix
      The eleventh batch
      t0091: allow test in a repository without tags
      The twelfth batch
      Makefile: reduce repetitive library paths
      Makefile: simplify output of the libpath_template
      The thirteenth batch
      GitHub Actions: update to checkout@v4
      GitHub Actions: update to github-script@v7
      t/Makefile: say the default target upfront
      The fourteenth batch
      tag: fix sign_buffer() call to create a signed tag
      bisect: document "terms" subcommand more fully
      bisect: document command line arguments for "bisect start"
      ssh signing: signal an error with a negative return value
      The fifteenth batch
      Git 2.43.1
      Git 2.44-rc0
      unit-tests: do show relative file paths on non-Windows, too
      A few more topics before -rc1
      write-or-die: fix the polarity of GIT_FLUSH environment variable
      A few more fixes before -rc1
      Git 2.43.2

Justin Tobler (2):
      t1401: remove lockfile creation
      t5541: remove lockfile creation

Kristoffer Haugsbakk (5):
      config: format newlines
      config: rename global config function
      config: factor out global config file retrieval
      maintenance: use XDG config if it exists
      config: add back code comment

Kyle Lippincott (1):
      setup: allow cwd=.git w/ bareRepository=explicit

Linus Arver (4):
      commit: ignore_non_trailer computes number of bytes to ignore
      trailer: find the end of the log message
      trailer: use offsets for trailer_start/trailer_end
      strvec: use correct member name in comments

M Hickford (1):
      credential/wincred: store oauth_refresh_token

Maarten van der Schrieck (1):
      Documentation: fix statement about rebase.instructionFormat

Marcel Krause (1):
      doc: make the gitfile syntax easier to discover

Marcelo Roberto Jimenez (1):
      gitweb: die when a configuration file cannot be read

Michael Lohmann (2):
      Documentation/git-merge.txt: fix reference to synopsis
      Documentation/git-merge.txt: use backticks for command wrapping

Nikolay Borisov (1):
      rebase: fix documentation about used shell in -x

Nikolay Edigaryev (1):
      rev-list-options: fix off-by-one in '--filter=blob:limit=<n>' explainer

Patrick Steinhardt (139):
      t: allow skipping expected object ID in `ref-store update-ref`
      t: convert tests to not write references via the filesystem
      t: convert tests to not access symrefs via the filesystem
      t: convert tests to not access reflog via the filesystem
      t1450: convert tests to remove worktrees via git-worktree(1)
      t4207: delete replace references via git-update-ref(1)
      t7300: assert exact states of repo
      t7900: assert the absence of refs via git-for-each-ref(1)
      t: mark several tests that assume the files backend with REFFILES
      ci: reorder definitions for grouping functions
      ci: make grouping setup more generic
      ci: group installation of Docker dependencies
      ci: split out logic to set up failed test artifacts
      ci: unify setup of some environment variables
      ci: squelch warnings when testing with unusable Git repo
      ci: install test dependencies for linux-musl
      ci: add support for GitLab CI
      t/lib-httpd: dynamically detect httpd and modules path
      t/lib-httpd: stop using legacy crypt(3) for authentication
      t9164: fix inability to find basename(1) in Subversion hooks
      global: convert trivial usages of `test <expr> -a/-o <expr>`
      contrib/subtree: stop using `-o` to test for number of args
      contrib/subtree: convert subtree type check to use case statement
      Makefile: stop using `test -o` when unlinking duplicate executables
      t5510: ensure that the packed-refs file needs locking
      refs/files: use transactions to delete references
      refs: deduplicate code to delete references
      refs: remove `delete_refs` callback from backends
      commit-graph: disable GIT_COMMIT_GRAPH_PARANOIA by default
      t0410: mark tests to require the reffiles backend
      t1400: split up generic reflog tests from the reffile-specific ones
      t1401: stop treating FETCH_HEAD as real reference
      t1410: use test-tool to create empty reflog
      t1417: make `reflog --updateref` tests backend agnostic
      t3310: stop checking for reference existence via `test -f`
      t4013: simplify magic parsing and drop "failure"
      t5401: speed up creation of many branches
      t5551: stop writing packed-refs directly
      t6301: write invalid object ID via `test-tool ref-store`
      reftable: wrap EXPECT macros in do/while
      reftable: handle interrupted reads
      reftable: handle interrupted writes
      reftable/stack: verify that `reftable_stack_add()` uses auto-compaction
      reftable/stack: perform auto-compaction with transactional interface
      reftable/stack: reuse buffers when reloading stack
      reftable/stack: fix stale lock when dying
      reftable/stack: fix use of unseeded randomness
      reftable/merged: reuse buffer to compute record keys
      reftable/block: introduce macro to initialize `struct block_iter`
      reftable/block: reuse buffer to compute record keys
      setup: extract function to create the refdb
      setup: allow skipping creation of the refdb
      remote-curl: rediscover repository when fetching refs
      builtin/clone: fix bundle URIs with mismatching object formats
      builtin/clone: set up sparse checkout later
      builtin/clone: skip reading HEAD when retrieving remote
      builtin/clone: create the refdb with the correct object format
      wt-status: read HEAD and ORIG_HEAD via the refdb
      refs: propagate errno when reading special refs fails
      refs: complete list of special refs
      bisect: consistently write BISECT_EXPECTED_REV via the refdb
      tests: adjust whitespace in chainlint expectations
      t: introduce DEFAULT_REPO_FORMAT prereq
      worktree: skip reading HEAD when repairing worktrees
      refs: refactor logic to look up storage backends
      setup: start tracking ref storage format
      setup: set repository's formats on init
      setup: introduce "extensions.refStorage" extension
      setup: introduce GIT_DEFAULT_REF_FORMAT envvar
      t: introduce GIT_TEST_DEFAULT_REF_FORMAT envvar
      builtin/rev-parse: introduce `--show-ref-format` flag
      builtin/init: introduce `--ref-format=` value flag
      builtin/clone: introduce `--ref-format=` value flag
      t9500: write "extensions.refstorage" into config
      reftable/stack: do not overwrite errors when compacting
      reftable/stack: do not auto-compact twice in `reftable_stack_add()`
      reftable/writer: fix index corruption when writing multiple indices
      reftable/record: constify some parts of the interface
      reftable/record: store "val1" hashes as static arrays
      reftable/record: store "val2" hashes as static arrays
      reftable/merged: really reuse buffers to compute record keys
      reftable/merged: transfer ownership of records when iterating
      git-prompt: stop manually parsing HEAD with unknown ref formats
      ci: add job performing static analysis on GitLab CI
      refs: prepare `refs_init_db()` for initializing worktree refs
      setup: move creation of "refs/" into the files backend
      refs/files: skip creation of "refs/{heads,tags}" for worktrees
      builtin/worktree: move setup of commondir file earlier
      worktree: expose interface to look up worktree by name
      builtin/worktree: create refdb via ref backend
      reftable/stack: refactor stack reloading to have common exit path
      reftable/stack: refactor reloading to use file descriptor
      reftable/stack: use stat info to avoid re-reading stack list
      reftable/blocksource: refactor code to match our coding style
      reftable/blocksource: use mmap to read tables
      git-p4: stop reaching into the refdb
      commit-graph: fix memory leak when not writing graph
      completion: discover repo path in `__git_pseudoref_exists ()`
      t9902: verify that completion does not print anything
      completion: improve existence check for pseudo-refs
      completion: silence pseudoref existence check
      completion: treat dangling symrefs as existing pseudorefs
      t7527: decrease likelihood of racing with fsmonitor daemon
      Makefile: detect new Homebrew location for ARM-based Macs
      ci: handle TEST_OUTPUT_DIRECTORY when printing test failures
      ci: make p4 setup on macOS more robust
      ci: add macOS jobs to GitLab CI
      reftable/stack: unconditionally reload stack after commit
      reftable/stack: fix race in up-to-date check
      sequencer: clean up pseudo refs with REF_NO_DEREF
      sequencer: delete REBASE_HEAD in correct repo when picking commits
      refs: convert AUTO_MERGE to become a normal pseudo-ref
      sequencer: introduce functions to handle autostashes via refs
      refs: convert MERGE_AUTOSTASH to become a normal pseudo-ref
      refs: redefine special refs
      Documentation: add "special refs" to the glossary
      reftable/stack: adjust permissions of compacted tables
      t1300: make tests more robust with non-default ref backends
      t1301: mark test for `core.sharedRepository` as reffiles specific
      t1302: make tests more robust with new extensions
      t1419: mark test suite as files-backend specific
      t5526: break test submodule differently
      t: mark tests regarding git-pack-refs(1) to be backend specific
      reftable/stack: fsync "tables.list" during compaction
      reftable/reader: be more careful about errors in indexed seeks
      reftable/writer: use correct type to iterate through index entries
      reftable/writer: simplify writing index records
      reftable/writer: fix writing multi-level indices
      reftable: document reading and writing indices
      builtin/stash: report failure to write to index
      reftable: introduce macros to grow arrays
      reftable: introduce macros to allocate arrays
      reftable/stack: fix parameter validation when compacting range
      reftable/stack: index segments with `size_t`
      reftable/stack: use `size_t` to track stack slices during compaction
      reftable/stack: use `size_t` to track stack length
      reftable/merged: refactor seeking of records
      reftable/merged: refactor initialization of iterators
      reftable/record: improve semantics when initializing records

Philippe Blain (7):
      completion: complete missing rev-list options
      completion: complete --patch-with-raw
      completion: complete --encoding
      completion: complete missing 'git log' options
      ci(github): also skip logs of broken test cases
      imap-send: add missing "strbuf.h" include under NO_CURL
      .github/PULL_REQUEST_TEMPLATE.md: add a note about single-commit PRs

Phillip Wood (3):
      unit tests: add TAP unit test framework
      show-ref --verify: accept pseudorefs
      t1400: use show-ref to check pseudorefs

René Scharfe (19):
      column: release strbuf and string_list after use
      i18n: factorize even more 'incompatible options' messages
      push: use die_for_incompatible_opt4() for - -delete/--tags/--all/--mirror
      repack: use die_for_incompatible_opt3() for -A/-k/--cruft
      revision: use die_for_incompatible_opt3() for - -graph/--reverse/--walk-reflogs
      revision, rev-parse: factorize incompatibility messages about - -exclude-hidden
      clean: factorize incompatibility message
      worktree: standardize incompatibility messages
      worktree: simplify incompatibility message for --orphan and commit-ish
      show-ref: use die_for_incompatible_opt3()
      t6300: avoid hard-coding object sizes
      git-compat-util: convert skip_{prefix,suffix}{,_mem} to bool
      rebase: use strvec_pushf() for format-patch revisions
      fast-import: use mem_pool_calloc()
      mem-pool: fix big allocations
      mem-pool: simplify alignment calculation
      t1006: prefer shell loop to awk for packed object sizes
      parse-options: fully disable option abbreviation with PARSE_OPT_KEEP_UNKNOWN
      parse-options: simplify positivation handling

Rubén Justo (10):
      status: fix branch shown when not only bisecting
      branch: clarify <oldbranch> term
      advice: sort the advice related lists
      advice: fix an unexpected leading space
      branch: make the advice to force-deleting a conditional one
      advice: allow disabling the automatic hint in advise_if_enabled()
      t5332: mark as leak-free
      t6113: mark as leak-free
      test-lib: check for TEST_PASSES_SANITIZE_LEAK
      t0080: mark as leak-free

Sam Delmerico (1):
      push: region_leave trace for negotiate_using_fetch

Shreyansh Paliwal (1):
      test-lib-functions.sh: fix test_grep fail message wording

Simon Ser (1):
      format-patch: fix ignored encode_email_headers for cover letter

Stan Hu (2):
      completion: refactor existence checks for pseudorefs
      completion: support pseudoref existence checks for reftables

Sören Krecker (1):
      mingw: give more details about unsafe directory's ownership

Tamino Bauknecht (1):
      fetch: add new config option fetch.all

Taylor Blau (29):
      pack-objects: free packing_data in more places
      pack-bitmap-write: deep-clear the `bb_commit` slab
      pack-bitmap: plug leak in find_objects()
      midx: factor out `fill_pack_info()`
      midx: implement `BTMP` chunk
      midx: implement `midx_locate_pack()`
      pack-bitmap: pass `bitmapped_pack` struct to pack-reuse functions
      ewah: implement `bitmap_is_empty()`
      pack-bitmap: simplify `reuse_partial_packfile_from_bitmap()` signature
      pack-bitmap: return multiple packs via `reuse_partial_packfile_from_bitmap()`
      pack-objects: parameterize pack-reuse routines over a single pack
      pack-objects: keep track of `pack_start` for each reuse pack
      pack-objects: pass `bitmapped_pack`'s to pack-reuse functions
      pack-objects: prepare `write_reused_pack()` for multi-pack reuse
      pack-objects: prepare `write_reused_pack_verbatim()` for multi-pack reuse
      pack-objects: include number of packs reused in output
      git-compat-util.h: implement checked size_t to uint32_t conversion
      midx: implement `midx_preferred_pack()`
      pack-revindex: factor out `midx_key_to_pack_pos()` helper
      pack-revindex: implement `midx_pair_to_pack_pos()`
      pack-bitmap: prepare to mark objects from multiple packs for reuse
      pack-objects: add tracing for various packfile metrics
      t/test-lib-functions.sh: implement `test_trace2_data` helper
      pack-objects: allow setting `pack.allowPackReuse` to "single"
      pack-bitmap: enable reuse from all bitmapped packs
      t/perf: add performance tests for multi-pack reuse
      pack-bitmap: drop unused `reuse_objects`
      t5332-multi-pack-reuse.sh: extract pack-objects helper functions
      pack-objects: enable multi-pack reuse via `feature.experimental`

Todd Zullinger (2):
      perl: bump the required Perl version to 5.8.1 from 5.8.0
      send-email: avoid duplicate specification warnings

Toon Claes (1):
      builtin/show-ref: treat directory as non-existing in --exists

Victoria Dye (15):
      ref-filter.c: really don't sort when using --no-sort
      ref-filter.h: add max_count and omit_empty to ref_format
      ref-filter.h: move contains caches into filter
      ref-filter.h: add functions for filter/format & format-only
      ref-filter.c: rename 'ref_filter_handler()' to 'filter_one()'
      ref-filter.c: refactor to create common helper functions
      ref-filter.c: filter & format refs in the same callback
      for-each-ref: clean up documentation of --format
      ref-filter.c: use peeled tag for '*' format fields
      t/perf: add perf tests for for-each-ref
      submodule-config.h: move check_submodule_url
      test-submodule: remove command line handling for check-name
      t7450: test submodule urls
      submodule-config.c: strengthen URL fsck check
      ref-filter.c: sort formatted dates by byte value

Zach FettersMoore (1):
      subtree: fix split processing with multiple subtrees present


^ permalink raw reply

* [ANNOUNCE] Git v2.43.2
From: Junio C Hamano @ 2024-02-14 17:14 UTC (permalink / raw)
  To: git; +Cc: Linux Kernel, git-packagers

The latest maintenance release Git v2.43.2 is now available at
the usual places.

The tarballs are found at:

    https://www.kernel.org/pub/software/scm/git/

The following public repositories all have a copy of the 'v2.43.2'
tag and the 'maint' branch that the tag points at:

  url = https://git.kernel.org/pub/scm/git/git
  url = https://kernel.googlesource.com/pub/scm/git/git
  url = git://repo.or.cz/alt-git.git
  url = https://github.com/gitster/git

----------------------------------------------------------------

Git 2.43.2 Release Notes
========================

Relative to Git 2.43.1, this release has two important fixes to allow
"git imap-send" to be built with NO_CURL defined, and to restore the
forced flushing behaviour when GIT_FLUSH=1 is set.  It also contains
other, unexciting, fixes that have already been merged to the 'master'
branch of the development towards the next major release.

Fixes since Git 2.43.1
----------------------

 * Update to a new feature recently added, "git show-ref --exists".

 * Rename detection logic ignored the final line of a file if it is an
   incomplete line.

 * "git diff --no-rename A B" did not disable rename detection but did
   not trigger an error from the command line parser.

 * "git diff --no-index file1 file2" segfaulted while invoking the
   external diff driver, which has been corrected.

 * Rewrite //-comments to /* comments */ in files whose comments
   prevalently use the latter.

 * A failed "git tag -s" did not necessarily result in an error
   depending on the crypto backend, which has been corrected.

 * "git stash" sometimes was silent even when it failed due to
   unwritable index file, which has been corrected.

 * Recent conversion to allow more than 0/1 in GIT_FLUSH broke the
   mechanism by flipping what yes/no means by mistake, which has been
   corrected.

Also contains documentation updates, code clean-ups and minor fixups.

----------------------------------------------------------------

Changes since v2.43.1 are as follows:

Elijah Newren (1):
      diffcore-delta: avoid ignoring final 'line' of file

James Touton (1):
      git-p4: use raw string literals for regular expressions

Jeff King (1):
      diff: handle NULL meta-info when spawning external diff

Johannes Schindelin (1):
      win32: special-case `ENOSPC` when writing to a pipe

Junio C Hamano (11):
      Docs: majordomo@vger.kernel.org has been decomissioned
      CoC: whitespace fix
      builtin/worktree: comment style fixes
      merge-ort.c: comment style fix
      reftable/pq_test: comment style fix
      tag: fix sign_buffer() call to create a signed tag
      bisect: document "terms" subcommand more fully
      bisect: document command line arguments for "bisect start"
      ssh signing: signal an error with a negative return value
      write-or-die: fix the polarity of GIT_FLUSH environment variable
      Git 2.43.2

Linus Arver (1):
      strvec: use correct member name in comments

Nikolay Borisov (1):
      rebase: fix documentation about used shell in -x

Nikolay Edigaryev (1):
      rev-list-options: fix off-by-one in '--filter=blob:limit=<n>' explainer

Patrick Steinhardt (1):
      builtin/stash: report failure to write to index

Philippe Blain (2):
      imap-send: add missing "strbuf.h" include under NO_CURL
      .github/PULL_REQUEST_TEMPLATE.md: add a note about single-commit PRs

René Scharfe (2):
      parse-options: fully disable option abbreviation with PARSE_OPT_KEEP_UNKNOWN
      parse-options: simplify positivation handling

Sam Delmerico (1):
      push: region_leave trace for negotiate_using_fetch

Taylor Blau (1):
      pack-bitmap: drop unused `reuse_objects`

Toon Claes (1):
      builtin/show-ref: treat directory as non-existing in --exists


^ permalink raw reply

* [ANNOUNCE] Git v2.43.2
From: Junio C Hamano @ 2024-02-14 17:24 UTC (permalink / raw)
  To: git; +Cc: Linux Kernel, git-packagers

The latest maintenance release Git v2.43.2 is now available at
the usual places.

The tarballs are found at:

    https://www.kernel.org/pub/software/scm/git/

The following public repositories all have a copy of the 'v2.43.2'
tag and the 'maint' branch that the tag points at:

  url = https://git.kernel.org/pub/scm/git/git
  url = https://kernel.googlesource.com/pub/scm/git/git
  url = git://repo.or.cz/alt-git.git
  url = https://github.com/gitster/git

----------------------------------------------------------------

Git 2.43.2 Release Notes
========================

Relative to Git 2.43.1, this release has two important fixes to allow
"git imap-send" to be built with NO_CURL defined, and to restore the
forced flushing behaviour when GIT_FLUSH=1 is set.  It also contains
other, unexciting, fixes that have already been merged to the 'master'
branch of the development towards the next major release.

Fixes since Git 2.43.1
----------------------

 * Update to a new feature recently added, "git show-ref --exists".

 * Rename detection logic ignored the final line of a file if it is an
   incomplete line.

 * "git diff --no-rename A B" did not disable rename detection but did
   not trigger an error from the command line parser.

 * "git diff --no-index file1 file2" segfaulted while invoking the
   external diff driver, which has been corrected.

 * Rewrite //-comments to /* comments */ in files whose comments
   prevalently use the latter.

 * A failed "git tag -s" did not necessarily result in an error
   depending on the crypto backend, which has been corrected.

 * "git stash" sometimes was silent even when it failed due to
   unwritable index file, which has been corrected.

 * Recent conversion to allow more than 0/1 in GIT_FLUSH broke the
   mechanism by flipping what yes/no means by mistake, which has been
   corrected.

Also contains documentation updates, code clean-ups and minor fixups.

----------------------------------------------------------------

Changes since v2.43.1 are as follows:

Elijah Newren (1):
      diffcore-delta: avoid ignoring final 'line' of file

James Touton (1):
      git-p4: use raw string literals for regular expressions

Jeff King (1):
      diff: handle NULL meta-info when spawning external diff

Johannes Schindelin (1):
      win32: special-case `ENOSPC` when writing to a pipe

Junio C Hamano (11):
      Docs: majordomo@vger.kernel.org has been decomissioned
      CoC: whitespace fix
      builtin/worktree: comment style fixes
      merge-ort.c: comment style fix
      reftable/pq_test: comment style fix
      tag: fix sign_buffer() call to create a signed tag
      bisect: document "terms" subcommand more fully
      bisect: document command line arguments for "bisect start"
      ssh signing: signal an error with a negative return value
      write-or-die: fix the polarity of GIT_FLUSH environment variable
      Git 2.43.2

Linus Arver (1):
      strvec: use correct member name in comments

Nikolay Borisov (1):
      rebase: fix documentation about used shell in -x

Nikolay Edigaryev (1):
      rev-list-options: fix off-by-one in '--filter=blob:limit=<n>' explainer

Patrick Steinhardt (1):
      builtin/stash: report failure to write to index

Philippe Blain (2):
      imap-send: add missing "strbuf.h" include under NO_CURL
      .github/PULL_REQUEST_TEMPLATE.md: add a note about single-commit PRs

René Scharfe (2):
      parse-options: fully disable option abbreviation with PARSE_OPT_KEEP_UNKNOWN
      parse-options: simplify positivation handling

Sam Delmerico (1):
      push: region_leave trace for negotiate_using_fetch

Taylor Blau (1):
      pack-bitmap: drop unused `reuse_objects`

Toon Claes (1):
      builtin/show-ref: treat directory as non-existing in --exists


^ permalink raw reply

* Re: [PATCH v2 1/1] diff: mark param1 and param2 as placeholders
From: Junio C Hamano @ 2024-02-14 17:33 UTC (permalink / raw)
  To: Jiang Xin; +Cc: Git List, Jean-Noël Avila
In-Reply-To: <3a82f72f33663f162aa41cb20c0fb3b6786971c9.1707900029.git.worldhello.net@gmail.com>

Jiang Xin <worldhello.net@gmail.com> writes:

> Some l10n translators translated the parameters "files", "param1" and
> "param2" in the following message:
>
>     "synonym for --dirstat=files,param1,param2..."
>
> Translating "param1" and "param2" is OK, but changing the parameter
> "files" is wrong. The parameters that are not meant to be used verbatim
> should be marked as placeholders, but the verbatim parameter not marked
> as a placeholder should be left as is.
>
> This change is a complement for commit 51e846e673 (doc: enforce
> placeholders in documentation, 2023-12-25).
>
> With the help of Jean-Noël,some parameter combinations in one
> placeholder (e.g. "<param1,param2>...") are splited into seperate
> placeholders.
>
> Helped-by: Jean-Noël Avila <jn.avila@free.fr>
> Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
> ---
>  diff.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Makes sense, thanks both.  This is from 2019 so it is not all that
urgent, but it still is a good change.

It is a bit unfortunate that we need to mark what *can* be
translated, not the other way around.  Because of that, something
like ...

>  			       N_("synonym for --dirstat=cumulative"),

... has no marking, but that does not mean that any part of
"--dirstat=cumulative" is up for translation, while "synonym for"
definitely is to be translated.

> +		OPT_CALLBACK_F(0, "dirstat-by-file", options, N_("<param1>,<param2>..."),
> +			       N_("synonym for --dirstat=files,<param1>,<param2>..."),

^ permalink raw reply

* [RESOLVED] 2.44.0-rc1 clears t0080 problem on NonStop
From: rsbecker @ 2024-02-14 17:46 UTC (permalink / raw)
  To: git

Thanks everyone for getting this fixed.
Regards,
Randall

--
Brief whoami: NonStop&UNIX developer since approximately
UNIX(421664400)
NonStop(211288444200000000)
-- In real life, I talk too much.




^ permalink raw reply

* [PATCH v3] t9146: replace test -d/-e/-f with appropriate test_path_is_* function
From: Chandra Pratap via GitGitGadget @ 2024-02-14 17:50 UTC (permalink / raw)
  To: git; +Cc: Chandra Pratap, Chandra Pratap
In-Reply-To: <pull.1661.v2.git.1707765433663.gitgitgadget@gmail.com>

From: Chandra Pratap <chandrapratap3519@gmail.com>

The helper functions test_path_is_* provide better debugging
information than test -d/-e/-f.

Replace "if ! test -d then <error message>" and "test -d" with
"test_path_is_dir" at places where we check for existent directories.

Replace "test -f" with "test_path_is_file" at places where we check
for existent files.

Replace "test ! -e" and "if test -d then <error message>" with
"test_path_is_missing" where we check for non-existent directories.

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Chandra Pratap <chandrapratap3519@gmail.com>
---
    t9146: replace test -d/-f with appropriate test_path_is_* function
    
    I chose to retain "test_path_is_misssing" as a replacement for "if test
    -d then " because we initialize the repository at the start of the test
    with:
    
    for i in a b c d d/e d/e/f "weird file name" do svn_cmd mkdir -m "mkdir
    $i" "$svnrepo"/"$i" || return 1 done
    
    and then check for the existence of these directories in the following
    tests. I think this reproduces the behavior of the original tests close
    enough.

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1661%2FChand-ra%2Ftestfix-v3
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1661/Chand-ra/testfix-v3
Pull-Request: https://github.com/gitgitgadget/git/pull/1661

Range-diff vs v2:

 1:  5734b9edd61 ! 1:  5024389e7a9 t9146: replace test -d/-e/-f with appropriate test_path_is_* function
     @@ Commit message
          The helper functions test_path_is_* provide better debugging
          information than test -d/-e/-f.
      
     -    Replace "if ! test -d then <error message>" with "test_path_exists"
     -    and "test -d" with "test_path_is_dir" at places where we check for
     -    existent directories.
     +    Replace "if ! test -d then <error message>" and "test -d" with
     +    "test_path_is_dir" at places where we check for existent directories.
      
          Replace "test -f" with "test_path_is_file" at places where we check
          for existent files.
      
     -    Replace "test ! -e" with "test_path_is_missing" where we check for
     -    non-existent directories.
     +    Replace "test ! -e" and "if test -d then <error message>" with
     +    "test_path_is_missing" where we check for non-existent directories.
      
          Helped-by: Eric Sunshine <sunshine@sunshineco.com>
          Signed-off-by: Chandra Pratap <chandrapratap3519@gmail.com>
     @@ t/t9146-git-svn-empty-dirs.sh: test_expect_success 'empty directories exist' '
      -				echo >&2 "$i does not exist" &&
      -				exit 1
      -			fi
     -+			test_path_exists "$i" || exit 1
     ++			test_path_is_dir "$i" || exit 1
       		done
       	)
       '
     @@ t/t9146-git-svn-empty-dirs.sh: test_expect_success 'git svn mkdirs recreates emp
      -				echo >&2 "$i does not exist" &&
      -				exit 1
      -			fi
     -+			test_path_exists "$i" || exit 1
     ++			test_path_is_dir "$i" || exit 1
       		done
       	)
       '
     @@ t/t9146-git-svn-empty-dirs.sh: test_expect_success 'git svn mkdirs -r works' '
      -				echo >&2 "$i does not exist" &&
      -				exit 1
      -			fi
     -+			test_path_exists "$i" || exit 1
     ++			test_path_is_dir "$i" || exit 1
       		done &&
       
      -		if test -d "! !"
     @@ t/t9146-git-svn-empty-dirs.sh: test_expect_success 'git svn mkdirs -r works' '
      -			echo >&2 "$i not exist" &&
      -			exit 1
      -		fi
     -+		test_path_exists "! !" || exit 1
     ++		test_path_is_dir "! !" || exit 1
       	)
       '
       
     @@ t/t9146-git-svn-empty-dirs.sh: test_expect_success 'empty directories in trunk e
      -				echo >&2 "$i does not exist" &&
      -				exit 1
      -			fi
     -+			test_path_exists "$i" || exit 1
     ++			test_path_is_dir "$i" || exit 1
       		done
       	)
       '
     @@ t/t9146-git-svn-empty-dirs.sh: test_expect_success 'git svn gc-ed files work' '
      -					echo >&2 "$i does not exist" &&
      -					exit 1
      -				fi
     -+				test_path_exists "$i" || exit 1
     ++				test_path_is_dir "$i" || exit 1
       			done
       		fi
       	)


 t/t9146-git-svn-empty-dirs.sh | 56 ++++++++---------------------------
 1 file changed, 12 insertions(+), 44 deletions(-)

diff --git a/t/t9146-git-svn-empty-dirs.sh b/t/t9146-git-svn-empty-dirs.sh
index 09606f1b3cf..926ac814394 100755
--- a/t/t9146-git-svn-empty-dirs.sh
+++ b/t/t9146-git-svn-empty-dirs.sh
@@ -20,11 +20,7 @@ test_expect_success 'empty directories exist' '
 		cd cloned &&
 		for i in a b c d d/e d/e/f "weird file name"
 		do
-			if ! test -d "$i"
-			then
-				echo >&2 "$i does not exist" &&
-				exit 1
-			fi
+			test_path_is_dir "$i" || exit 1
 		done
 	)
 '
@@ -37,11 +33,7 @@ test_expect_success 'option automkdirs set to false' '
 		git svn fetch &&
 		for i in a b c d d/e d/e/f "weird file name"
 		do
-			if test -d "$i"
-			then
-				echo >&2 "$i exists" &&
-				exit 1
-			fi
+			test_path_is_missing "$i" || exit 1
 		done
 	)
 '
@@ -52,7 +44,7 @@ test_expect_success 'more emptiness' '
 
 test_expect_success 'git svn rebase creates empty directory' '
 	( cd cloned && git svn rebase ) &&
-	test -d cloned/"! !"
+	test_path_is_dir cloned/"! !"
 '
 
 test_expect_success 'git svn mkdirs recreates empty directories' '
@@ -62,11 +54,7 @@ test_expect_success 'git svn mkdirs recreates empty directories' '
 		git svn mkdirs &&
 		for i in a b c d d/e d/e/f "weird file name" "! !"
 		do
-			if ! test -d "$i"
-			then
-				echo >&2 "$i does not exist" &&
-				exit 1
-			fi
+			test_path_is_dir "$i" || exit 1
 		done
 	)
 '
@@ -78,25 +66,13 @@ test_expect_success 'git svn mkdirs -r works' '
 		git svn mkdirs -r7 &&
 		for i in a b c d d/e d/e/f "weird file name"
 		do
-			if ! test -d "$i"
-			then
-				echo >&2 "$i does not exist" &&
-				exit 1
-			fi
+			test_path_is_dir "$i" || exit 1
 		done &&
 
-		if test -d "! !"
-		then
-			echo >&2 "$i should not exist" &&
-			exit 1
-		fi &&
+		test_path_is_missing "! !" || exit 1 &&
 
 		git svn mkdirs -r8 &&
-		if ! test -d "! !"
-		then
-			echo >&2 "$i not exist" &&
-			exit 1
-		fi
+		test_path_is_dir "! !" || exit 1
 	)
 '
 
@@ -114,11 +90,7 @@ test_expect_success 'empty directories in trunk exist' '
 		cd trunk &&
 		for i in a "weird file name"
 		do
-			if ! test -d "$i"
-			then
-				echo >&2 "$i does not exist" &&
-				exit 1
-			fi
+			test_path_is_dir "$i" || exit 1
 		done
 	)
 '
@@ -129,7 +101,7 @@ test_expect_success 'remove a top-level directory from svn' '
 
 test_expect_success 'removed top-level directory does not exist' '
 	git svn clone "$svnrepo" removed &&
-	test ! -e removed/d
+	test_path_is_missing removed/d
 
 '
 unhandled=.git/svn/refs/remotes/git-svn/unhandled.log
@@ -143,15 +115,11 @@ test_expect_success 'git svn gc-ed files work' '
 			svn_cmd mkdir -m gz "$svnrepo"/gz &&
 			git reset --hard $(git rev-list HEAD | tail -1) &&
 			git svn rebase &&
-			test -f "$unhandled".gz &&
-			test -f "$unhandled" &&
+			test_path_is_file "$unhandled".gz &&
+			test_path_is_file "$unhandled" &&
 			for i in a b c "weird file name" gz "! !"
 			do
-				if ! test -d "$i"
-				then
-					echo >&2 "$i does not exist" &&
-					exit 1
-				fi
+				test_path_is_dir "$i" || exit 1
 			done
 		fi
 	)

base-commit: 235986be822c9f8689be2e9a0b7804d0b1b6d821
-- 
gitgitgadget

^ permalink raw reply related

* Re: [PATCH v4 1/5] refs: introduce `is_pseudoref()` and `is_headref()`
From: Karthik Nayak @ 2024-02-14 18:15 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Patrick Steinhardt, git, phillip.wood123, Jeff King
In-Reply-To: <xmqqzfw3vv6o.fsf@gitster.g>

On Wed, Feb 14, 2024 at 5:59 PM Junio C Hamano <gitster@pobox.com> wrote:
>
> Karthik Nayak <karthik.188@gmail.com> writes:
>
> > Junio, let me know if you want me to reroll for the whitespace issues.
>
> I think I applied with "am --whitespace=fix", so we should be OK,
> but if you can double check the result that would be appreciated.

I did go through the patches and didn't find any other fixes needed. Thanks

^ permalink raw reply

* Re: [PATCH] credential/osxkeychain: store new attributes
From: Junio C Hamano @ 2024-02-14 18:25 UTC (permalink / raw)
  To: M Hickford via GitGitGadget; +Cc: git, M Hickford
In-Reply-To: <pull.1663.git.1707860618119.gitgitgadget@gmail.com>

"M Hickford via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: M Hickford <mirth.hickford@gmail.com>
>
> d208bfd (credential: new attribute password_expiry_utc, 2023-02-18)
> and a5c76569e7 (credential: new attribute oauth_refresh_token)
> introduced new credential attributes.
>
> Similar to 7144dee3 (credential/libsecret: erase matching creds only,
> 2023-07-26), we encode the new attributes in the secret, separated by
> newline:
>
>     hunter2
>     password_expiry_utc=1684189401
>     oauth_refresh_token=xyzzy
>
> This is extensible and backwards compatible. The credential protocol
> already assumes that attribute values do not contain newlines.
>
> Signed-off-by: M Hickford <mirth.hickford@gmail.com>
> ---

OK, this adds both oauth_refresh_token and password_expiry_utc,
unlike the recent one for wincred, which already stored the expiry
but the support for oauth_refresh_token was added with f061959e
(credential/wincred: store oauth_refresh_token, 2024-01-28).

>     [RFC] contrib/credential/osxkeychain: store new attributes
>     
>     Is any keen MacOS user interested in building and testing this RFC
>     patch? I personally don't have a MacOS machine, so haven't tried
>     building it. Fixes are surely necessary. Once it builds, you can test
>     the feature with:
>     
>     GIT_TEST_CREDENTIAL_HELPER=osxkeychain ./t0303-credential-external.sh
>     
>     
>     The feature would help git-credential-oauth users on MacOS
>     https://github.com/hickford/git-credential-oauth/issues/42

I do not use macOS to use this on, so let's see how others can help.

Thanks.  Will queue.


^ permalink raw reply

* Re: [L10N] ci: bump GitHub Actions versions in l10n.yml
From: Junio C Hamano @ 2024-02-14 18:27 UTC (permalink / raw)
  To: Jiang Xin; +Cc: Git List, Johannes Schindelin, dependabot [bot]
In-Reply-To: <20240214043846.4385-1-worldhello.net@gmail.com>

Jiang Xin <worldhello.net@gmail.com> writes:

> is only turned on in the git-l10n repository. I will merge this commit
> in my tree and send it to you this Sunday along with other l10n updates.

Sounds good.  Thanks.

^ permalink raw reply

* [PATCH] doc: add shortcut to "am --whitespace=<action>"
From: Junio C Hamano @ 2024-02-14 18:44 UTC (permalink / raw)
  To: git

We refer readers of "git am --help" to "git apply --help" for many
options that are passed through, and most of them are simple
booleans, but --whitespace takes from a set of actions whose names
may slip users' minds.  Give a list of them in "git am --help" to
reduce one level of redirection only to find out what they are.

In the helper function to parse the available options, there was a
helpful comment reminding the developer to update list of <action>s
in the completion script. Mention the two documentation pages there
as well.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 Documentation/git-am.txt | 3 +++
 apply.c                  | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt
index 82dadbecc8..67b12f315f 100644
--- a/Documentation/git-am.txt
+++ b/Documentation/git-am.txt
@@ -128,6 +128,9 @@ include::rerere-options.txt[]
 	These flags are passed to the 'git apply' (see linkgit:git-apply[1])
 	program that applies
 	the patch.
++
+Valid <action> for the `--whitespace` option are:
+`nowarn`, `warn`, `fix`, `error`, and `error-all`.
 
 --patch-format::
 	By default the command will try to detect the patch format
diff --git a/apply.c b/apply.c
index 3d69fec836..4e57831aeb 100644
--- a/apply.c
+++ b/apply.c
@@ -78,7 +78,8 @@ static int parse_whitespace_option(struct apply_state *state, const char *option
 		return 0;
 	}
 	/*
-	 * Please update $__git_whitespacelist in git-completion.bash
+	 * Please update $__git_whitespacelist in git-completion.bash,
+	 * Documentation/git-apply.txt, and Documentation/git-am.txt
 	 * when you add new options.
 	 */
 	return error(_("unrecognized whitespace option '%s'"), option);
-- 
2.44.0-rc1


^ permalink raw reply related

* Re: [PATCH] doc: add shortcut to "am --whitespace=<action>"
From: Dragan Simic @ 2024-02-14 19:01 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <xmqqplwyvqby.fsf@gitster.g>

On 2024-02-14 19:44, Junio C Hamano wrote:
> We refer readers of "git am --help" to "git apply --help" for many
> options that are passed through, and most of them are simple
> booleans, but --whitespace takes from a set of actions whose names
> may slip users' minds.  Give a list of them in "git am --help" to
> reduce one level of redirection only to find out what they are.
> 
> In the helper function to parse the available options, there was a
> helpful comment reminding the developer to update list of <action>s
> in the completion script. Mention the two documentation pages there
> as well.
> 
> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Looking to me, with one small nitpick below.

> ---
>  Documentation/git-am.txt | 3 +++
>  apply.c                  | 3 ++-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt
> index 82dadbecc8..67b12f315f 100644
> --- a/Documentation/git-am.txt
> +++ b/Documentation/git-am.txt
> @@ -128,6 +128,9 @@ include::rerere-options.txt[]
>  	These flags are passed to the 'git apply' (see linkgit:git-apply[1])
>  	program that applies
>  	the patch.

It would be nice to, while there, move "the patch." to the line above.

> ++
> +Valid <action> for the `--whitespace` option are:
> +`nowarn`, `warn`, `fix`, `error`, and `error-all`.
> 
>  --patch-format::
>  	By default the command will try to detect the patch format
> diff --git a/apply.c b/apply.c
> index 3d69fec836..4e57831aeb 100644
> --- a/apply.c
> +++ b/apply.c
> @@ -78,7 +78,8 @@ static int parse_whitespace_option(struct
> apply_state *state, const char *option
>  		return 0;
>  	}
>  	/*
> -	 * Please update $__git_whitespacelist in git-completion.bash
> +	 * Please update $__git_whitespacelist in git-completion.bash,
> +	 * Documentation/git-apply.txt, and Documentation/git-am.txt
>  	 * when you add new options.
>  	 */
>  	return error(_("unrecognized whitespace option '%s'"), option);

^ permalink raw reply

* Re: [PATCH] doc: add shortcut to "am --whitespace=<action>"
From: Dragan Simic @ 2024-02-14 19:03 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <c329d3ed43f852453ad78ba430363416@manjaro.org>

On 2024-02-14 20:01, Dragan Simic wrote:
> On 2024-02-14 19:44, Junio C Hamano wrote:
>> We refer readers of "git am --help" to "git apply --help" for many
>> options that are passed through, and most of them are simple
>> booleans, but --whitespace takes from a set of actions whose names
>> may slip users' minds.  Give a list of them in "git am --help" to
>> reduce one level of redirection only to find out what they are.
>> 
>> In the helper function to parse the available options, there was a
>> helpful comment reminding the developer to update list of <action>s
>> in the completion script. Mention the two documentation pages there
>> as well.
>> 
>> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> 
> Looking to me, with one small nitpick below.

Oops...  s/to me/good to me/
Sorry for the noise.

>> ---
>>  Documentation/git-am.txt | 3 +++
>>  apply.c                  | 3 ++-
>>  2 files changed, 5 insertions(+), 1 deletion(-)
>> 
>> diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt
>> index 82dadbecc8..67b12f315f 100644
>> --- a/Documentation/git-am.txt
>> +++ b/Documentation/git-am.txt
>> @@ -128,6 +128,9 @@ include::rerere-options.txt[]
>>  	These flags are passed to the 'git apply' (see linkgit:git-apply[1])
>>  	program that applies
>>  	the patch.
> 
> It would be nice to, while there, move "the patch." to the line above.
> 
>> ++
>> +Valid <action> for the `--whitespace` option are:
>> +`nowarn`, `warn`, `fix`, `error`, and `error-all`.
>> 
>>  --patch-format::
>>  	By default the command will try to detect the patch format
>> diff --git a/apply.c b/apply.c
>> index 3d69fec836..4e57831aeb 100644
>> --- a/apply.c
>> +++ b/apply.c
>> @@ -78,7 +78,8 @@ static int parse_whitespace_option(struct
>> apply_state *state, const char *option
>>  		return 0;
>>  	}
>>  	/*
>> -	 * Please update $__git_whitespacelist in git-completion.bash
>> +	 * Please update $__git_whitespacelist in git-completion.bash,
>> +	 * Documentation/git-apply.txt, and Documentation/git-am.txt
>>  	 * when you add new options.
>>  	 */
>>  	return error(_("unrecognized whitespace option '%s'"), option);

^ permalink raw reply

* Re: [PATCH] doc: add shortcut to "am --whitespace=<action>"
From: Junio C Hamano @ 2024-02-14 19:09 UTC (permalink / raw)
  To: Dragan Simic; +Cc: git
In-Reply-To: <c329d3ed43f852453ad78ba430363416@manjaro.org>

Dragan Simic <dsimic@manjaro.org> writes:

>> @@ -128,6 +128,9 @@ include::rerere-options.txt[]
>>  	These flags are passed to the 'git apply' (see linkgit:git-apply[1])
>>  	program that applies
>>  	the patch.
>
> It would be nice to, while there, move "the patch." to the line above.

It belongs to a separate topic.  These files are sources that will
be line filled by AsciiDoc, so there is no reason to make such a
change unless the topic of your change were to make the source
"prettier", which is not the focus of this patch.  Having such a
change in the same patch will be distracting.

^ permalink raw reply

* Re: [PATCH] doc: add shortcut to "am --whitespace=<action>"
From: Dragan Simic @ 2024-02-14 19:20 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <xmqqle7mvp4x.fsf@gitster.g>

On 2024-02-14 20:09, Junio C Hamano wrote:
> Dragan Simic <dsimic@manjaro.org> writes:
> 
>>> @@ -128,6 +128,9 @@ include::rerere-options.txt[]
>>>  	These flags are passed to the 'git apply' (see 
>>> linkgit:git-apply[1])
>>>  	program that applies
>>>  	the patch.
>> 
>> It would be nice to, while there, move "the patch." to the line above.
> 
> It belongs to a separate topic.  These files are sources that will
> be line filled by AsciiDoc, so there is no reason to make such a
> change unless the topic of your change were to make the source
> "prettier", which is not the focus of this patch.  Having such a
> change in the same patch will be distracting.

Makes sense, it can become distracting, especially in a short patch
like this one.  It's better to stick to the patch topic, and leave
small cleanups to a separate patch.

^ permalink raw reply

* Re: [PATCH v2 1/1] completion: don't complete revs when --no-format-patch
From: Britton Kerin @ 2024-02-14 20:49 UTC (permalink / raw)
  To: Patrick Steinhardt, git
In-Reply-To: <ZcSJaRczdHApmnVi@tanuki>

On Wed, Feb 7, 2024 at 10:57 PM Patrick Steinhardt <ps@pks.im> wrote:
>
> On Mon, Jan 08, 2024 at 04:08:30PM -0900, Britton Leo Kerin wrote:
> > In this case the user has specifically said they don't want send-email
> > to run format-patch so revs aren't valid argument completions (and it's
> > likely revs and dirs do have some same names or prefixes as in
> > Documentation/MyFirstContribution.txt 'psuh').
> >
> > Signed-off-by: Britton Leo Kerin <britton.kerin@gmail.com>
> > ---
> >  contrib/completion/git-completion.bash | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> > index 185b47d802..c983f3b2ab 100644
> > --- a/contrib/completion/git-completion.bash
> > +++ b/contrib/completion/git-completion.bash
> > @@ -1242,10 +1242,12 @@ __git_find_last_on_cmdline ()
> >       while test $# -gt 1; do
> >               case "$1" in
> >               --show-idx)     show_idx=y ;;
> > +             --)             shift && break ;;
> >               *)              return 1 ;;
> >               esac
> >               shift
> >       done
> > +     [ $# -eq 1 ] || return 1   # return 1 if we got wrong # of non-opts
> >       local wordlist="$1"
> >
> >       while [ $c -gt "$__git_cmd_idx" ]; do
> > @@ -2429,7 +2431,9 @@ _git_send_email ()
> >               return
> >               ;;
> >       esac
> > -     __git_complete_revlist
> > +     if [ "$(__git_find_last_on_cmdline -- "--format-patch --no-format-patch")" != "--no-format-patch" ]; then
> > +             __git_complete_revlist
> > +     fi
> >  }
>
> While this second hunk here makes perfect sense to me, there is no
> explanation why we need to change `__git_find_last_on_cmdline ()`. It's
> already used with "--guess --no-guess" in another place, so I would
> think that it ought to work alright for this usecase, too. Or is it that
> the existing callsite of this function is buggy, too? If so, we should
> likely fix that in a separate patch together with a test.
>
> Also, adding a test for git-send-email that exercises this new behaviour
> would be very much welcome, too.

I'll look this one over again and add some tests eventually.

Britton

^ permalink raw reply

* Re: [PATCH] credential/osxkeychain: store new attributes
From: M Hickford @ 2024-02-14 22:35 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: M Hickford via GitGitGadget, git, M Hickford
In-Reply-To: <xmqqzfw2vr7c.fsf@gitster.g>

On Wed, 14 Feb 2024 at 18:25, Junio C Hamano <gitster@pobox.com> wrote:
>
> "M Hickford via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
> > From: M Hickford <mirth.hickford@gmail.com>
> >
> > d208bfd (credential: new attribute password_expiry_utc, 2023-02-18)
> > and a5c76569e7 (credential: new attribute oauth_refresh_token)
> > introduced new credential attributes.
> >
> > Similar to 7144dee3 (credential/libsecret: erase matching creds only,
> > 2023-07-26), we encode the new attributes in the secret, separated by
> > newline:
> >
> >     hunter2
> >     password_expiry_utc=1684189401
> >     oauth_refresh_token=xyzzy
> >
> > This is extensible and backwards compatible. The credential protocol
> > already assumes that attribute values do not contain newlines.
> >
> > Signed-off-by: M Hickford <mirth.hickford@gmail.com>
> > ---
>
> OK, this adds both oauth_refresh_token and password_expiry_utc,
> unlike the recent one for wincred, which already stored the expiry
> but the support for oauth_refresh_token was added with f061959e
> (credential/wincred: store oauth_refresh_token, 2024-01-28).
>
> >     [RFC] contrib/credential/osxkeychain: store new attributes
> >
> >     Is any keen MacOS user interested in building and testing this RFC
> >     patch? I personally don't have a MacOS machine, so haven't tried
> >     building it. Fixes are surely necessary. Once it builds, you can test
> >     the feature with:
> >
> >     GIT_TEST_CREDENTIAL_HELPER=osxkeychain ./t0303-credential-external.sh
> >
> >
> >     The feature would help git-credential-oauth users on MacOS
> >     https://github.com/hickford/git-credential-oauth/issues/42
>
> I do not use macOS to use this on, so let's see how others can help.
>
> Thanks.  Will queue.

A first-time contributor contacted me to say they are working on a
more comprehensive patch to credential-osxkeychain, so let's wait for
that instead. https://github.com/gitgitgadget/git/pull/1663#issuecomment-1942763116

^ permalink raw reply

* [ANNOUNCE] Git for Windows 2.44.0-rc1
From: Johannes Schindelin @ 2024-02-14 22:37 UTC (permalink / raw)
  To: git-for-windows, git, git-packagers; +Cc: Johannes Schindelin

Dear Git users,

I hereby announce that Git for Windows 2.44.0-rc1 is available from:

    https://github.com/git-for-windows/git/releases/tag/v2.44.0-rc1.windows.1

Changes since Git for Windows v2.43.0 (November 20th 2023)

Git for Windows for Windows v2.44 is the last version to support for
Windows 7 and for Windows 8, see MSYS2's corresponding deprecation
announcement (Git for Windows relies on MSYS2 for components such as
Bash and Perl).

Please also note that the 32-bit variant of Git for Windows is
deprecated; Its last official release is planned for 2025.

New Features

  * Comes with Git v2.44.0-rc1.
  * Comes with libfido2 v1.14.0.
  * Comes with the MSYS2 runtime (Git for Windows flavor) based on
    Cygwin v3.4.10.
  * Comes with Perl v5.38.2.
  * Git for Windows learned to detect and use native Windows support
    for ANSI sequences, which allows using 24-bit colors in terminal
    windows.
  * Comes with Git LFS v3.4.1.
  * The repository viewer Tig that is included in Git for Windows can
    now be called also directly from PowerShell/CMD.
  * Comes with OpenSSH v9.6.P1.
  * Comes with Bash v5.2.26.
  * Comes with GNU TLS v3.8.3.
  * Comes with OpenSSL v3.2.1.
  * Comes with cURL v8.6.0.
  * Comes with GNU Privacy Guard v2.4.4.

Bug Fixes

  * The 32-bit variant of Git for Windows was missing some MSYS2
    runtime updates, which was addressed; Do note 32-bit support is
    phased out.
  * The Git for Windows installer showed cut-off text in some setups.
    This has been fixed.
  * The git credential-manager --help command previously would not find
    a page to display in the web browser, which has been fixed.
  * A couple of bugs that could cause Git Bash to hang in certain
    scenarios were fixed.

Git-2.44.0-rc1-64-bit.exe | d8157edf354afc66326db927de04e2dae054f55adbf3035bc9086478a5ecb423
Git-2.44.0-rc1-32-bit.exe | d53b5043216f5be5b154c5fe79e9cfd8c3d2ef2e6263cf3f3a9d358fc60843a4
PortableGit-2.44.0-rc1-64-bit.7z.exe | 1ee36ef5676e2536f869e6b89efcede826960b78f83cb1a685b9608f045a1582
PortableGit-2.44.0-rc1-32-bit.7z.exe | f96a638497b19d9d8c578fe1a6b54cb29c793c08ceaf204cbaa91ecd3583ee07
MinGit-2.44.0-rc1-64-bit.zip | bf13ebe8626699656e5adf659c905c6306b87917bb664fc52377011054771783
MinGit-2.44.0-rc1-32-bit.zip | 468b33306aca3f605e9fb64075a45a057ae2b72bb5aae42c2e37cf2a9846e37b
MinGit-2.44.0-rc1-busybox-64-bit.zip | aa667eb43187b7515d539d70ffdc3f12523a03f9bb546584f46342f6673170fc
MinGit-2.44.0-rc1-busybox-32-bit.zip | 5f902ec741b3e10dcce1e9cb06ed82f04668c9ea680030f52a194a7d869b2aa3
Git-2.44.0-rc1-64-bit.tar.bz2 | 7b6481465f1080c70e80df448b1fe7ece09407b3d580a8986f7934b6b3529e60
Git-2.44.0-rc1-32-bit.tar.bz2 | 8eded6886d07440084ce29dac6ce66dfa31795861d33c1a6aeb56bad0e0b31e6

Ciao,
Johannes

^ permalink raw reply

* Re: [PATCH 1/7] t: move tests exercising the "files" backend
From: Junio C Hamano @ 2024-02-14 22:45 UTC (permalink / raw)
  To: Patrick Steinhardt; +Cc: git
In-Reply-To: <2eca90234f60b5f48e444e8be212bd70b9ebf924.1707463221.git.ps@pks.im>

Patrick Steinhardt <ps@pks.im> writes:

> We still have a bunch of tests scattered across our test suites that
> exercise on-disk files of the "files" backend directly:
>
>   - t1301 exercises permissions of reflog files when the config
>     "core.sharedRepository" is set.
>
>   - t1400 exercises whether empty directories in the ref store are
>     handled correctly.
>
>   - t3200 exercises what happens when there are symlinks in the ref
>     store.
>
>   - t3400 also exercises what happens when ".git/logs" is a symlink.
>
> All of these are inherently low-level tests specific to the "files"
> backend. Move them into "t0600-reffiles-backend.sh" to reflect this.

Makes sense, and they look like straight code movements.

> diff --git a/t/t0600-reffiles-backend.sh b/t/t0600-reffiles-backend.sh
> index e6a5f1868f..485481d6b4 100755
> --- a/t/t0600-reffiles-backend.sh
> +++ b/t/t0600-reffiles-backend.sh
> @@ -381,4 +381,95 @@ test_expect_success 'log diagnoses bogus HEAD symref' '
>  	test_grep broken stderr
>  '

These two are from t1400.

> +test_expect_success 'empty directory removal' '
> +	git branch d1/d2/r1 HEAD &&
> +	git branch d1/r2 HEAD &&
> +	test_path_is_file .git/refs/heads/d1/d2/r1 &&
> +	test_path_is_file .git/logs/refs/heads/d1/d2/r1 &&
> +	git branch -d d1/d2/r1 &&
> +	test_must_fail git show-ref --verify -q refs/heads/d1/d2 &&
> +	test_must_fail git show-ref --verify -q logs/refs/heads/d1/d2 &&
> +	test_path_is_file .git/refs/heads/d1/r2 &&
> +	test_path_is_file .git/logs/refs/heads/d1/r2
> +'
> +
> +test_expect_success 'symref empty directory removal' '
> +	git branch e1/e2/r1 HEAD &&
> +	git branch e1/r2 HEAD &&
> +	git checkout e1/e2/r1 &&
> +	test_when_finished "git checkout main" &&
> +	test_path_is_file .git/refs/heads/e1/e2/r1 &&
> +	test_path_is_file .git/logs/refs/heads/e1/e2/r1 &&
> +	git update-ref -d HEAD &&
> +	test_must_fail git show-ref --verify -q refs/heads/e1/e2 &&
> +	test_must_fail git show-ref --verify -q logs/refs/heads/e1/e2 &&
> +	test_path_is_file .git/refs/heads/e1/r2 &&
> +	test_path_is_file .git/logs/refs/heads/e1/r2 &&
> +	test_path_is_file .git/logs/HEAD
> +'

Luckily there aren't refs that were created at this point by earlier
tests that would contradict/block the creation of the new refs this
moved tests would want to create.

> +test_expect_success 'directory not created deleting packed ref' '
> +	git branch d1/d2/r1 HEAD &&
> +	git pack-refs --all &&
> +	test_path_is_missing .git/refs/heads/d1/d2 &&
> +	git update-ref -d refs/heads/d1/d2/r1 &&
> +	test_path_is_missing .git/refs/heads/d1/d2 &&
> +	test_path_is_missing .git/refs/heads/d1
> +'

And this is from the same t1400 but appears much later in the file.
Curiously, this tries to create d1/d2/r1 that an earlier test
already created, and this one passes because the branch gets removed
in the other test that also created the branch.  Tricky but not a
fault of this patch.

> +test_expect_success SYMLINKS 'git branch -m u v should fail when the reflog for u is a symlink' '
> +	git branch --create-reflog u &&
> +	mv .git/logs/refs/heads/u real-u &&
> +	ln -s real-u .git/logs/refs/heads/u &&
> +	test_must_fail git branch -m u v
> +'

This was migrated from t3200 and has no interaction with the new
context of t0600 as branch 'u' has never been used.  I notice that
this test is buggy since its inception at 16c2bfbb (rename_ref: use
lstat(2) when testing for symlink, 2006-11-29) in that we move the
log for branch 'u' up and then make the log for branch 'u' into a
dangling symlink, so it probably failed for a wrong reason even
before 16c2bfbb updated stat() to lstat().  Anyway, the current code
will see that logs/refs/heads/u is a symbolic link and fails,
regardless of what the link points at, so we are OK.  In any case,
not a fault of this patch.

> +test_expect_success SYMLINKS 'git branch -m with symlinked .git/refs' '
> +	test_when_finished "rm -rf subdir" &&
> +	git init --bare subdir &&
> +
> +	rm -rfv subdir/refs subdir/objects subdir/packed-refs &&
> +	ln -s ../.git/refs subdir/refs &&
> +	ln -s ../.git/objects subdir/objects &&
> +	ln -s ../.git/packed-refs subdir/packed-refs &&
> +
> +	git -C subdir rev-parse --absolute-git-dir >subdir.dir &&
> +	git rev-parse --absolute-git-dir >our.dir &&
> +	! test_cmp subdir.dir our.dir &&
> +
> +	git -C subdir log &&
> +	git -C subdir branch rename-src &&
> +	git rev-parse rename-src >expect &&
> +	git -C subdir branch -m rename-src rename-dest &&
> +	git rev-parse rename-dest >actual &&
> +	test_cmp expect actual &&
> +	git branch -D rename-dest
> +'

OK.  As long as it cleans after itself, I won't read deeply into it
and stop at making sure this came verbatim from t3200.

> +test_expect_success MINGW,SYMLINKS_WINDOWS 'rebase when .git/logs is a symlink' '
> +	git checkout main &&
> +	mv .git/logs actual_logs &&
> +	cmd //c "mklink /D .git\logs ..\actual_logs" &&
> +	git rebase -f HEAD^ &&
> +	test -L .git/logs &&
> +	rm .git/logs &&
> +	mv actual_logs .git/logs
> +'

As t0600 forces the default branch to be 'main', having this one
migrated from t3400 should be safe.

> +test_expect_success POSIXPERM 'git reflog expire honors core.sharedRepository' '
> +	umask 077 &&
> +	git config core.sharedRepository group &&
> +	git reflog expire --all &&
> +	actual="$(ls -l .git/logs/refs/heads/main)" &&
> +	case "$actual" in
> +	-rw-rw-*)
> +		: happy
> +		;;
> +	*)
> +		echo Ooops, .git/logs/refs/heads/main is not 066x [$actual]
> +		false
> +		;;
> +	esac
> +'

And this is from t1301, another verbatim copy.


>  test_done
> diff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh
> index 8e2c01e760..b1eb5c01b8 100755
> --- a/t/t1301-shared-repo.sh
> +++ b/t/t1301-shared-repo.sh
> @@ -137,22 +137,6 @@ test_expect_success POSIXPERM 'info/refs respects umask in unshared repo' '
>  	test_cmp expect actual
>  '
>  
> -test_expect_success REFFILES,POSIXPERM 'git reflog expire honors core.sharedRepository' '
> -	umask 077 &&
> -	git config core.sharedRepository group &&
> -	git reflog expire --all &&
> -	actual="$(ls -l .git/logs/refs/heads/main)" &&
> -	case "$actual" in
> -	-rw-rw-*)
> -		: happy
> -		;;
> -	*)
> -		echo Ooops, .git/logs/refs/heads/main is not 066x [$actual]
> -		false
> -		;;
> -	esac
> -'
> -

The rest of t1301 does not appear to depend on the reflog being
expired, so this move should be safe.

>  test_expect_success POSIXPERM 'forced modes' '
>  	test_when_finished "rm -rf new" &&
>  	mkdir -p templates/hooks &&
> diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
> index f18843bf7a..3294b7ce08 100755
> --- a/t/t1400-update-ref.sh
> +++ b/t/t1400-update-ref.sh
> @@ -288,33 +288,6 @@ test_expect_success "set $m (logged by touch)" '
>  	test $A = $(git show-ref -s --verify $m)
>  '
>  
> -test_expect_success REFFILES 'empty directory removal' '
> -	git branch d1/d2/r1 HEAD &&
> -	git branch d1/r2 HEAD &&
> -	test_path_is_file .git/refs/heads/d1/d2/r1 &&
> -	test_path_is_file .git/logs/refs/heads/d1/d2/r1 &&
> -	git branch -d d1/d2/r1 &&
> -	test_must_fail git show-ref --verify -q refs/heads/d1/d2 &&
> -	test_must_fail git show-ref --verify -q logs/refs/heads/d1/d2 &&
> -	test_path_is_file .git/refs/heads/d1/r2 &&
> -	test_path_is_file .git/logs/refs/heads/d1/r2
> -'
> -
> -test_expect_success REFFILES 'symref empty directory removal' '
> -	git branch e1/e2/r1 HEAD &&
> -	git branch e1/r2 HEAD &&
> -	git checkout e1/e2/r1 &&
> -	test_when_finished "git checkout main" &&
> -	test_path_is_file .git/refs/heads/e1/e2/r1 &&
> -	test_path_is_file .git/logs/refs/heads/e1/e2/r1 &&
> -	git update-ref -d HEAD &&
> -	test_must_fail git show-ref --verify -q refs/heads/e1/e2 &&
> -	test_must_fail git show-ref --verify -q logs/refs/heads/e1/e2 &&
> -	test_path_is_file .git/refs/heads/e1/r2 &&
> -	test_path_is_file .git/logs/refs/heads/e1/r2 &&
> -	test_path_is_file .git/logs/HEAD
> -'
> -
>  cat >expect <<EOF
>  $Z $A $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000	Initial Creation
>  $A $B $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150260 +0000	Switch
> @@ -1668,13 +1641,4 @@ test_expect_success PIPE 'transaction flushes status updates' '
>  	test_cmp expected actual
>  '
>  
> -test_expect_success REFFILES 'directory not created deleting packed ref' '
> -	git branch d1/d2/r1 HEAD &&
> -	git pack-refs --all &&
> -	test_path_is_missing .git/refs/heads/d1/d2 &&
> -	git update-ref -d refs/heads/d1/d2/r1 &&
> -	test_path_is_missing .git/refs/heads/d1/d2 &&
> -	test_path_is_missing .git/refs/heads/d1
> -'

I've covered how these removals should be safe for the remaining
tests in this file already.  Good.

>  test_done
> diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
> index de7d3014e4..e36f4d15f2 100755
> --- a/t/t3200-branch.sh
> +++ b/t/t3200-branch.sh
> @@ -836,35 +836,6 @@ test_expect_success 'renaming a symref is not allowed' '
>  	test_ref_missing refs/heads/new-topic
>  '
>  
> -test_expect_success SYMLINKS,REFFILES 'git branch -m u v should fail when the reflog for u is a symlink' '
> -	git branch --create-reflog u &&
> -	mv .git/logs/refs/heads/u real-u &&
> -	ln -s real-u .git/logs/refs/heads/u &&
> -	test_must_fail git branch -m u v
> -'
> -
> -test_expect_success SYMLINKS,REFFILES 'git branch -m with symlinked .git/refs' '
> -	test_when_finished "rm -rf subdir" &&
> -	git init --bare subdir &&
> -
> -	rm -rfv subdir/refs subdir/objects subdir/packed-refs &&
> -	ln -s ../.git/refs subdir/refs &&
> -	ln -s ../.git/objects subdir/objects &&
> -	ln -s ../.git/packed-refs subdir/packed-refs &&
> -
> -	git -C subdir rev-parse --absolute-git-dir >subdir.dir &&
> -	git rev-parse --absolute-git-dir >our.dir &&
> -	! test_cmp subdir.dir our.dir &&
> -
> -	git -C subdir log &&
> -	git -C subdir branch rename-src &&
> -	git rev-parse rename-src >expect &&
> -	git -C subdir branch -m rename-src rename-dest &&
> -	git rev-parse rename-dest >actual &&
> -	test_cmp expect actual &&
> -	git branch -D rename-dest
> -'

Likewise.

> diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
> index 57f1392926..e1c8c5f701 100755
> --- a/t/t3400-rebase.sh
> +++ b/t/t3400-rebase.sh
> @@ -424,16 +424,6 @@ test_expect_success 'refuse to switch to branch checked out elsewhere' '
>  	test_grep "already used by worktree at" err
>  '
>  
> -test_expect_success REFFILES,MINGW,SYMLINKS_WINDOWS 'rebase when .git/logs is a symlink' '
> -	git checkout main &&
> -	mv .git/logs actual_logs &&
> -	cmd //c "mklink /D .git\logs ..\actual_logs" &&
> -	git rebase -f HEAD^ &&
> -	test -L .git/logs &&
> -	rm .git/logs &&
> -	mv actual_logs .git/logs
> -'
> -
>  test_expect_success 'rebase when inside worktree subdirectory' '
>  	git init main-wt &&
>  	(

Looking good.

Thanks.

^ permalink raw reply

* Re: [PATCH 2/7] t0410: enable tests with extensions with non-default repo format
From: Junio C Hamano @ 2024-02-14 22:57 UTC (permalink / raw)
  To: Patrick Steinhardt, Jonathan Nieder; +Cc: git
In-Reply-To: <feef6a3e6cd0d9096816d0a8a5789837fb784517.1707463221.git.ps@pks.im>

Patrick Steinhardt <ps@pks.im> writes:

> In t0410 we have two tests which exercise how partial clones behave in
> the context of a repository with extensions. These tests are marked to
> require a default repository using SHA1 and the "files" backend because
> we explicitly set the repository format version to 0.
>
> Changing the repository format version to 0 is not needed though. The
> "noop" extension is ignored as expected regardless of what the version
> is set to, same as the "nonsense" extension leads to failure regardless
> of the version.

Isn't the reason why 11664196 kept the forcing of the format version
because it wanted to see noop ignored and nonsense failed even if
the format version is 0 to ensure the regression it fixed will stay
fixed?  IOW, we force version 0 not because we do not want to test
with anything but SHA1 and REFFILES; we pretty much assume that with
the default version, noop and nonsense will be handled sensibly, and
we want to make sure they will be with version 0 as well.

And once we force to version 0, we have trouble running with
anything other than SHA1 and REFFILES, hence these prerequisites.

So, I dunno.

>
> Stop setting the version so that these tests can execute with SHA256 and
> "reftable" repositories.
>
> Signed-off-by: Patrick Steinhardt <ps@pks.im>
> ---
>  t/t0410-partial-clone.sh | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/t/t0410-partial-clone.sh b/t/t0410-partial-clone.sh
> index 6b6424b3df..d913f3c453 100755
> --- a/t/t0410-partial-clone.sh
> +++ b/t/t0410-partial-clone.sh
> @@ -49,24 +49,22 @@ test_expect_success 'convert shallow clone to partial clone' '
>  	test_cmp_config -C client 1 core.repositoryformatversion
>  '
>  
> -test_expect_success SHA1,REFFILES 'convert to partial clone with noop extension' '
> +test_expect_success 'convert to partial clone with noop extension' '
>  	rm -fr server client &&
>  	test_create_repo server &&
>  	test_commit -C server my_commit 1 &&
>  	test_commit -C server my_commit2 1 &&
>  	git clone --depth=1 "file://$(pwd)/server" client &&
> -	test_cmp_config -C client 0 core.repositoryformatversion &&
>  	git -C client config extensions.noop true &&
>  	git -C client fetch --unshallow --filter="blob:none"
>  '
>  
> -test_expect_success SHA1,REFFILES 'converting to partial clone fails with unrecognized extension' '
> +test_expect_success 'converting to partial clone fails with unrecognized extension' '
>  	rm -fr server client &&
>  	test_create_repo server &&
>  	test_commit -C server my_commit 1 &&
>  	test_commit -C server my_commit2 1 &&
>  	git clone --depth=1 "file://$(pwd)/server" client &&
> -	test_cmp_config -C client 0 core.repositoryformatversion &&
>  	git -C client config extensions.nonsense true &&
>  	test_must_fail git -C client fetch --unshallow --filter="blob:none"
>  '

^ permalink raw reply

* Re: [PATCH 3/7] t1400: exercise reflog with gaps with reftable backend
From: Junio C Hamano @ 2024-02-14 22:59 UTC (permalink / raw)
  To: Patrick Steinhardt; +Cc: git
In-Reply-To: <9d8eed354ee3f0c9f66c22d92afd4c4c80f102e4.1707463221.git.ps@pks.im>

Patrick Steinhardt <ps@pks.im> writes:

> In t1400, we have a test that exercises whether we print a warning
> message as expected when the reflog contains entries which have a gap
> between the old entry's new object ID and the new entry's old object ID.
> While the logic should apply to all ref backends, the test setup writes
> into `.git/logs` directly and is thus "files"-backend specific.
>
> Refactor the test to instead use `git reflog delete` to create the gap
> and drop the REFFILES prerequisite.

This rewrite looks good.

Instead of mucking with the implementation detail, we achieve the
same with proper use of the tools provided.  Very nice.

Thanks.


> Signed-off-by: Patrick Steinhardt <ps@pks.im>
> ---
>  t/t1400-update-ref.sh | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
> index 3294b7ce08..3aeb103d34 100755
> --- a/t/t1400-update-ref.sh
> +++ b/t/t1400-update-ref.sh
> @@ -426,15 +426,15 @@ test_expect_success 'Query "main@{2005-05-28}" (past end of history)' '
>  rm -f expect
>  git update-ref -d $m
>  
> -test_expect_success REFFILES 'query reflog with gap' '
> +test_expect_success 'query reflog with gap' '
>  	test_when_finished "git update-ref -d $m" &&
>  
> -	git update-ref $m $F &&
> -	cat >.git/logs/$m <<-EOF &&
> -	$Z $A $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150320 -0500
> -	$A $B $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150380 -0500
> -	$D $F $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150680 -0500
> -	EOF
> +	GIT_COMMITTER_DATE="1117150320 -0500" git update-ref $m $A &&
> +	GIT_COMMITTER_DATE="1117150380 -0500" git update-ref $m $B &&
> +	GIT_COMMITTER_DATE="1117150480 -0500" git update-ref $m $C &&
> +	GIT_COMMITTER_DATE="1117150580 -0500" git update-ref $m $D &&
> +	GIT_COMMITTER_DATE="1117150680 -0500" git update-ref $m $F &&
> +	git reflog delete $m@{2} &&
>  
>  	git rev-parse --verify "main@{2005-05-26 23:33:01}" >actual 2>stderr &&
>  	echo "$B" >expect &&

^ permalink raw reply

* Re: [PATCH 4/7] t1404: make D/F conflict tests compatible with reftable backend
From: Junio C Hamano @ 2024-02-14 23:11 UTC (permalink / raw)
  To: Patrick Steinhardt; +Cc: git
In-Reply-To: <70c6f980126aabb2ade336861e816cf1fe6e9110.1707463221.git.ps@pks.im>

Patrick Steinhardt <ps@pks.im> writes:

>  	test_must_fail git update-ref --stdin <commands 2>output.err &&
> -	test_cmp expected-err output.err &&
> +	grep "fatal:\( cannot lock ref $SQ$addname$SQ:\)\? $SQ$delref$SQ exists; cannot create $SQ$addref$SQ" output.err &&

OK, that's more thorough than I would have done (I am lazy and would
just check "cannot create"), but being more specific is better than
being lazy ;-)

> @@ -191,69 +188,69 @@ test_expect_success 'one new ref is a simple prefix of another' '
>  
>  '
>  
> -test_expect_success REFFILES 'D/F conflict prevents add long + delete short' '
> +test_expect_success 'D/F conflict prevents add long + delete short' '
>  	df_test refs/df-al-ds --add-del foo/bar foo
>  '

All the changes make sense here.  Thanks.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox