<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git.c, branch v2.51.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.51.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.51.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2025-09-17T20:47:23Z</updated>
<entry>
<title>git: allow alias-shadowing deprecated builtins</title>
<updated>2025-09-17T20:47:23Z</updated>
<author>
<name>Kristoffer Haugsbakk</name>
<email>code@khaugsbakk.name</email>
</author>
<published>2025-09-17T20:24:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bf68b116997a0471dfccf7dcced00eb7d8b66982'/>
<id>urn:sha1:bf68b116997a0471dfccf7dcced00eb7d8b66982</id>
<content type='text'>
git-whatchanged(1) is deprecated and you need to pass
`--i-still-use-this` in order to force it to work as before.
There are two affected users, or usages:

1. people who use the command in scripts; and
2. people who are used to using it interactively.

For (1) the replacement is straightforward.[1]  But people in (2) might
like the name or be really used to typing it.[3]

An obvious first thought is to suggest aliasing `whatchanged` to the
git-log(1) equivalent.[1]  But this doesn’t work and is awkward since you
cannot shadow builtins via aliases.

Now you are left in an uncomfortable limbo; your alias won’t work until
the command is removed for good.

Let’s lift this limitation by allowing *deprecated* builtins to be
shadowed by aliases.

The only observed demand for aliasing has been for git-whatchanged(1),
not for git-pack-redundant(1).  But let’s be consistent and treat all
deprecated commands the same.

[1]:

        git log --raw --no-merges

     With a minor caveat: you get different outputs if you happen to
     have empty commits (no changes)[2]
[2]: https://lore.kernel.org/git/20250825085428.GA367101@coredump.intra.peff.net/
[3]: https://lore.kernel.org/git/BL3P221MB0449288C8B0FA448A227FD48833AA@BL3P221MB0449.NAMP221.PROD.OUTLOOK.COM/

Based-on-patch-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Kristoffer Haugsbakk &lt;code@khaugsbakk.name&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git: move seen-alias bookkeeping into handle_alias(...)</title>
<updated>2025-09-17T20:47:23Z</updated>
<author>
<name>Kristoffer Haugsbakk</name>
<email>code@khaugsbakk.name</email>
</author>
<published>2025-09-17T20:24:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b4f9282d8db88619b2becac7f4ee2cad75a72ff9'/>
<id>urn:sha1:b4f9282d8db88619b2becac7f4ee2cad75a72ff9</id>
<content type='text'>
We are about to complicate the command handling by allowing *deprecated*
builtins to be shadowed by aliases.  We need to organize the code in
order to facilitate that.[1]

The code in the `while(1)` speculatively adds commands to the list
before finding out if it’s an alias.  Let’s instead move it inside
`handle_alias(...)`—where it conceptually belongs anyway—and in turn
only run this logic when we have found an alias.[2]

[1]: We will do that with an additional call to `handle_alias(1)` inside
    the loop.  *Not* moving this code leaves a blind spot; we will miss
    alias looping crafted via deprecated builtin names
[2]: Also rename the list to a more descriptive name

Based-on-patch-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Kristoffer Haugsbakk &lt;code@khaugsbakk.name&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git: add `deprecated` category to --list-cmds</title>
<updated>2025-09-17T20:47:22Z</updated>
<author>
<name>Kristoffer Haugsbakk</name>
<email>code@khaugsbakk.name</email>
</author>
<published>2025-09-17T20:24:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5f31632ed7d8c2928b5cdd7a1358367415d24535'/>
<id>urn:sha1:5f31632ed7d8c2928b5cdd7a1358367415d24535</id>
<content type='text'>
With 145 builtin commands (according to `git --list-cmds=builtins`),
users are probably not keeping on top of which ones (if any) are
deprecated.

Let’s expand the experimental `--list-cmds`[1] to allow users and
programs to query for this information.  We will also use this in an
upcoming commit to implement `is_deprecated_command`.

[1]: Using something which is experimental to query for deprecations is
    perhaps not the most ideal approach, but it is simple to implement
    and better than having to scan the documentation

Acked-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Helped-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Kristoffer Haugsbakk &lt;code@khaugsbakk.name&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git: show alias info only with lone -h</title>
<updated>2025-07-25T23:34:13Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2025-07-25T18:41:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=161e895e42f4fad83828c1c954adb9375f4b0092'/>
<id>urn:sha1:161e895e42f4fad83828c1c954adb9375f4b0092</id>
<content type='text'>
Builtin commands show usage information on stdout if called with -h as
their only option, usage.c::show_usage_if_asked() makes sure of that.

Aliases show alias information on stderr if called with -h as the first
option since a9a60b94cc (git.c: handle_alias: prepend alias info when
first argument is -h, 2018-10-09).  This is surprising when using
aliases for commands that take -h as a normal argument among others,
like git grep.

Tighten the condition and show the alias information only if -h is the
only option given, to be consistent with builtins.

It's probably still is a good idea to write to stderr, as an alias
command doesn't have to be a builtin and could instead produce output
with just -h that might be spoiled by an extra alias info line.

Reported-by: Kevin Brodsky &lt;kevin.brodsky@arm.com&gt;
Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/you-still-use-whatchanged'</title>
<updated>2025-06-25T21:07:35Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-06-25T21:07:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a5cc6a2bc526f5ffb427f8d8bb987af6e591c4e4'/>
<id>urn:sha1:a5cc6a2bc526f5ffb427f8d8bb987af6e591c4e4</id>
<content type='text'>
"git whatchanged" that is longer to type than "git log --raw"
which is its modern rough equivalent has outlived its usefulness
more than 10 years ago.  Plan to deprecate and remove it.

* jc/you-still-use-whatchanged:
  whatschanged: list it in BreakingChanges document
  whatchanged: remove when built with WITH_BREAKING_CHANGES
  whatchanged: require --i-still-use-this
  tests: prepare for a world without whatchanged
  doc: prepare for a world without whatchanged
  you-still-use-that??: help deprecating commands for removal
</content>
</entry>
<entry>
<title>git.c: remove the_repository dependence in run_builtin()</title>
<updated>2025-06-16T15:17:12Z</updated>
<author>
<name>Lidong Yan</name>
<email>yldhome2d2@gmail.com</email>
</author>
<published>2025-06-16T06:22:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2939494284909cdc1410944c9c1e00a4a6eff2e9'/>
<id>urn:sha1:2939494284909cdc1410944c9c1e00a4a6eff2e9</id>
<content type='text'>
run_builtin() takes a repo parameter, so the use of the_repository
is no longer necessary. Removed the usage of the_repository.

Signed-off-by: Lidong Yan &lt;502024330056@smail.nju.edu.cn&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>whatchanged: remove when built with WITH_BREAKING_CHANGES</title>
<updated>2025-05-12T22:30:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-05-12T19:03:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=07572f220a83770f5b0b9717b29027e016fc99e4'/>
<id>urn:sha1:07572f220a83770f5b0b9717b29027e016fc99e4</id>
<content type='text'>
As we made "git whatchanged" require "--i-still-use-this" and asked
the users to report if they still want to use it, the logical next
step is to allow us build Git without "whatchanged" to prepare for
its eventual removal.

If we were to follow the pattern established in 8ccc75c2 (remote:
announce removal of "branches/" and "remotes/", 2025-01-22), we can
do this together with the documentation update to officially list
that the command will be removed in the BreakingChanges document,
but let's just keep the changes separate just in case we want to
proceed a bit slower.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>builtin: introduce diff-pairs command</title>
<updated>2025-03-03T16:17:47Z</updated>
<author>
<name>Justin Tobler</name>
<email>jltobler@gmail.com</email>
</author>
<published>2025-02-28T21:33:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5bd10b2adcf3a080169574dd08c5529de81eecb1'/>
<id>urn:sha1:5bd10b2adcf3a080169574dd08c5529de81eecb1</id>
<content type='text'>
Through git-diff(1), a single diff can be generated from a pair of blob
revisions directly. Unfortunately, there is not a mechanism to compute
batches of specific file pair diffs in a single process. Such a feature
is particularly useful on the server-side where diffing between a large
set of changes is not feasible all at once due to timeout concerns.

To facilitate this, introduce git-diff-pairs(1) which acts as a backend
passing its NUL-terminated raw diff format input from stdin through diff
machinery to produce various forms of output such as patch or raw.

The raw format was originally designed as an interchange format and
represents the contents of the diff_queued_diff list making it possible
to break the diff pipeline into separate stages. For example,
git-diff-tree(1) can be used as a frontend to compute file pairs to
queue and feed its raw output to git-diff-pairs(1) to compute patches.
With this, batches of diffs can be progressively generated without
having to recompute renames or retrieve object context. Something like
the following:

	git diff-tree -r -z -M $old $new |
	git diff-pairs -p -z

should generate the same output as `git diff-tree -p -M`. Furthermore,
each line of raw diff formatted input can also be individually fed to a
separate git-diff-pairs(1) process and still produce the same output.

Based-on-patch-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Justin Tobler &lt;jltobler@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>backfill: add builtin boilerplate</title>
<updated>2025-02-04T00:12:41Z</updated>
<author>
<name>Derrick Stolee</name>
<email>derrickstolee@github.com</email>
</author>
<published>2025-02-03T17:11:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a3f79e9abdbdb27308ac7e3d9e362bcc361cecdc'/>
<id>urn:sha1:a3f79e9abdbdb27308ac7e3d9e362bcc361cecdc</id>
<content type='text'>
In anticipation of implementing 'git backfill', populate the necessary files
with the boilerplate of a new builtin. Mark the builtin as experimental at
this time, allowing breaking changes in the near future, if necessary.

Signed-off-by: Derrick Stolee &lt;stolee@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ps/3.0-remote-deprecation'</title>
<updated>2025-02-03T18:23:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-02-03T18:23:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=803b5acaa7cb979b5d623270af18d6d8354fce9b'/>
<id>urn:sha1:803b5acaa7cb979b5d623270af18d6d8354fce9b</id>
<content type='text'>
Following the procedure we established to introduce breaking
changes for Git 3.0, allow an early opt-in for removing support of
$GIT_DIR/branches/ and $GIT_DIR/remotes/ directories to configure
remotes.

* ps/3.0-remote-deprecation:
  remote: announce removal of "branches/" and "remotes/"
  builtin/pack-redundant: remove subcommand with breaking changes
  ci: repurpose "linux-gcc" job for deprecations
  ci: merge linux-gcc-default into linux-gcc
  Makefile: wire up build option for deprecated features
</content>
</entry>
</feed>
