<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/t1517-outside-repo.sh, branch main</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=main</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2026-04-08T00:32:36Z</updated>
<entry>
<title>object-file: avoid ODB transaction when not writing objects</title>
<updated>2026-04-08T00:32:36Z</updated>
<author>
<name>Justin Tobler</name>
<email>jltobler@gmail.com</email>
</author>
<published>2026-04-07T20:17:30Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=7d8727ff0b621a9729c2de6a3698063b7b3ba2d6'/>
<id>urn:sha1:7d8727ff0b621a9729c2de6a3698063b7b3ba2d6</id>
<content type='text'>
In ce1661f9da (odb: add transaction interface, 2025-09-16), existing
ODB transaction logic is adapted to create a transaction interface
at the ODB layer. The intent here is for the ODB transaction
interface to eventually provide an object source agnostic means to
manage transactions.

An unintended consequence of this change though is that
`object-file.c:index_fd()` may enter the ODB transaction path even
when no object write is requested. In non-repository contexts, this
can result in a NULL dereference and segfault. One such case occurs
when running git-diff(1) outside of a repository with
"core.bigFileThreshold" forcing the streaming path in `index_fd()`:

        $ echo foo &gt;foo
        $ echo bar &gt;bar
        $ git -c core.bigFileThreshold=1 diff -- foo bar

In this scenario, the caller only needs to compute the object ID. Object
hashing does not require an ODB, so starting a transaction is both
unnecessary and invalid.

Fix the bug by avoiding the use of ODB transactions in `index_fd()` when
callers are only interested in computing the object hash.

Reported-by: Luca Stefani &lt;luca.stefani.ge1@gmail.com&gt;
Signed-off-by: Justin Tobler &lt;jltobler@gmail.com&gt;
[jc: adjusted to fd13909e (Merge branch 'jt/odb-transaction', 2025-10-02)]
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ad/t1517-short-help-tests-fix'</title>
<updated>2025-08-29T16:44:35Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-08-29T16:44:35Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=96a04c45c1ac696ed5236b507da644c3c9e9ffd5'/>
<id>urn:sha1:96a04c45c1ac696ed5236b507da644c3c9e9ffd5</id>
<content type='text'>
Test fix.

* ad/t1517-short-help-tests-fix:
  t/t1517: mark tests that fail with GIT_TEST_INSTALLED
</content>
</entry>
<entry>
<title>Merge branch 'dk/help-all'</title>
<updated>2025-08-25T21:22:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-08-25T21:22:00Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=a3c6459ab6610d93da8c95000d0ffc803ce39892'/>
<id>urn:sha1:a3c6459ab6610d93da8c95000d0ffc803ce39892</id>
<content type='text'>
"git cmd --help-all" now works outside repositories.

* dk/help-all:
  builtin: also setup gently for --help-all
  parse-options: refactor flags for usage_with_options_internal
</content>
</entry>
<entry>
<title>Merge branch 'ac/deglobal-fmt-merge-log-config'</title>
<updated>2025-08-22T20:13:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-08-22T20:13:21Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=9d6e319ec5190a0f5e19d8c7b7a73a4439042df6'/>
<id>urn:sha1:9d6e319ec5190a0f5e19d8c7b7a73a4439042df6</id>
<content type='text'>
Code clean-up.

* ac/deglobal-fmt-merge-log-config:
  builtin/fmt-merge-msg: stop depending on 'the_repository'
  environment: remove the global variable 'merge_log_config'
</content>
</entry>
<entry>
<title>t/t1517: mark tests that fail with GIT_TEST_INSTALLED</title>
<updated>2025-08-19T15:37:46Z</updated>
<author>
<name>Adam Dinwoodie</name>
<email>adam@dinwoodie.org</email>
</author>
<published>2025-08-19T07:43:29Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=c4cf8caadd407d8b1eafec38b3dfc1f77f61cc19'/>
<id>urn:sha1:c4cf8caadd407d8b1eafec38b3dfc1f77f61cc19</id>
<content type='text'>
The changes added by 39fc408562 (t/t1517: automate `git subcmd -h` tests
outside a repository, 2025-08-08) to automatically loop over all "main"
Git commands will, when run against an installed build using
GIT_TEST_INSTALLED rather than the build in the build directory, include
some extra git-gui commands that are installed by `make install`, or
credential helpers that might be installed manually from the contrib
directories.  These fail the test, so record them as such.

Signed-off-by: Adam Dinwoodie &lt;adam@dinwoodie.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>builtin/fmt-merge-msg: stop depending on 'the_repository'</title>
<updated>2025-08-11T16:19:40Z</updated>
<author>
<name>Ayush Chandekar</name>
<email>ayu.chandekar@gmail.com</email>
</author>
<published>2025-08-10T23:45:46Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=22d421fed9cd5757a9da5a97e5b53ded54e93fe9'/>
<id>urn:sha1:22d421fed9cd5757a9da5a97e5b53ded54e93fe9</id>
<content type='text'>
Refactor builtin/fmt-merge-msg.c to remove the dependancy on the global
'the_repository'. Remove the 'UNUSED' macro from the 'struct repository'
parameter and replace 'git_config()' with 'repo_config()' so that
configuration is read from the passed repository. Also, add a test to
make sure that "git fmt-merge-msg -h" can be called outside a
repository.

Mentored-by: Christian Couder &lt;christian.couder@gmail.com&gt;
Mentored-by: Ghanshyam Thakkar &lt;shyamthakkar001@gmail.com&gt;
Signed-off-by: Ayush Chandekar &lt;ayu.chandekar@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>builtin: also setup gently for --help-all</title>
<updated>2025-08-08T18:13:12Z</updated>
<author>
<name>D. Ben Knoble</name>
<email>ben.knoble+github@gmail.com</email>
</author>
<published>2025-08-03T16:10:27Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=129b3632f35a1c46fb30d9e6f275a95119a9d521'/>
<id>urn:sha1:129b3632f35a1c46fb30d9e6f275a95119a9d521</id>
<content type='text'>
Git experts often check the help summary of a command to make sure they
spell options right when suggesting advice to colleagues. Further, they
might check hidden options when responding to queries about deprecated
options like git-rebase(1)'s "preserve merges" option. But some commands
don't support "--help-all" outside of a git directory. Running (for
example)

    git rebase --help-all

outside a directory fails in "setup_git_directory", erroring with the
localized form of

    fatal: not a git repository (or any of the parent directories): .git

Like 99caeed05d (Let 'git &lt;command&gt; -h' show usage without a git dir,
2009-11-09), we want to show the "--help-all" output even without a git
dir. Make "--help-all" where we expect "-h" to mean
"setup_git_directory_gently", and interpose early in the natural place
("show_usage_with_options_if_asked").

Do the same for usage callers with show_usage_if_asked.

The exception is merge-recursive, whose help block doesn't use newer
APIs.

Best-viewed-with: --ignore-space-change
Signed-off-by: D. Ben Knoble &lt;ben.knoble+github@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t5304: move `prune -h` test from t1517</title>
<updated>2025-08-08T14:48:27Z</updated>
<author>
<name>Usman Akinyemi</name>
<email>usmanakinyemi202@gmail.com</email>
</author>
<published>2025-08-08T01:06:51Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=529a60a885c1f65ff0870f6d69915dd9d02d7ee9'/>
<id>urn:sha1:529a60a885c1f65ff0870f6d69915dd9d02d7ee9</id>
<content type='text'>
t1517 is now focused on testing subcommands outside a repository.
Move the in-repo `-h` test for `prune` to t5304, which covers
this command.

Suggested-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Usman Akinyemi &lt;usmanakinyemi202@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t5200: move `update-server-info -h` test from t1517</title>
<updated>2025-08-08T14:48:27Z</updated>
<author>
<name>Usman Akinyemi</name>
<email>usmanakinyemi202@gmail.com</email>
</author>
<published>2025-08-08T01:06:50Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=18aae638cbb7e6fe148b879c5b4e5ad4e5cc006d'/>
<id>urn:sha1:18aae638cbb7e6fe148b879c5b4e5ad4e5cc006d</id>
<content type='text'>
t1517 is now focused on testing subcommands outside a repository.
Move the in-repo `-h` test for `update-server-info` to t5200,
which covers this command.

Suggested-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Usman Akinyemi &lt;usmanakinyemi202@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t/t1517: automate `git subcmd -h` tests outside a repository</title>
<updated>2025-08-08T14:48:27Z</updated>
<author>
<name>Usman Akinyemi</name>
<email>usmanakinyemi202@gmail.com</email>
</author>
<published>2025-08-08T01:06:49Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=39fc4085620b60f8a06239a249f6877111e5ac11'/>
<id>urn:sha1:39fc4085620b60f8a06239a249f6877111e5ac11</id>
<content type='text'>
Replace manual `-h` tests with a loop over all subcommands using
`git --list-cmds=main`. This ensures consistent coverage of `-h`
behavior outside a repo and future-proofs the test by covering
new commands automatically.

Known exceptions are skipped or marked as expected failures.

Suggested-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Helped-by: D. Ben Knoble &lt;ben.knoble+github@gmail.com&gt;
Signed-off-by: Usman Akinyemi &lt;usmanakinyemi202@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
