<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/rev-parse.c, branch v2.26.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.26.1</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.26.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-11-20T01:19:58Z</updated>
<entry>
<title>rev-parse: make --show-toplevel without a worktree an error</title>
<updated>2019-11-20T01:19:58Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2019-11-19T08:05:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2d92ab32fd624349d308334befbf07adf9f179b9'/>
<id>urn:sha1:2d92ab32fd624349d308334befbf07adf9f179b9</id>
<content type='text'>
Ever since it was introduced in 7cceca5ccc (Add 'git rev-parse
--show-toplevel' option., 2010-01-12), the --show-toplevel option has
treated a missing working tree as a quiet success: it neither prints a
toplevel path, but nor does it report any kind of error.

While a caller could distinguish this case by looking for an empty
response, the behavior is rather confusing. We're better off complaining
that there is no working tree, as other internal commands would do in
similar cases (e.g., "git status" or any builtin with NEED_WORK_TREE set
would just die()). So let's do the same here.

While we're at it, let's clarify the documentation and add some tests,
both for the new behavior and for the more mundane case (which was not
covered).

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'bc/hash-independent-tests-part-6'</title>
<updated>2019-11-10T09:02:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-11-10T09:02:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=28014c1084c0180c71af9ffaaca82a57e48b76b5'/>
<id>urn:sha1:28014c1084c0180c71af9ffaaca82a57e48b76b5</id>
<content type='text'>
Test updates to prepare for SHA-2 transition continues.

* bc/hash-independent-tests-part-6:
  t4048: abstract away SHA-1-specific constants
  t4045: make hash-size independent
  t4044: update test to work with SHA-256
  t4039: abstract away SHA-1-specific constants
  t4038: abstract away SHA-1 specific constants
  t4034: abstract away SHA-1-specific constants
  t4027: make hash-size independent
  t4015: abstract away SHA-1-specific constants
  t4011: abstract away SHA-1-specific constants
  t4010: abstract away SHA-1-specific constants
  t3429: remove SHA1 annotation
  t1305: avoid comparing extensions
  rev-parse: add a --show-object-format option
  t/oid-info: add empty tree and empty blob values
  t/oid-info: allow looking up hash algorithm name
</content>
</entry>
<entry>
<title>rev-parse: add a --show-object-format option</title>
<updated>2019-10-28T02:34:57Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2019-10-28T00:58:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2eabd383134b7dedbda0e8367ef3df63c67a0445'/>
<id>urn:sha1:2eabd383134b7dedbda0e8367ef3df63c67a0445</id>
<content type='text'>
Add an option to print the object format used for input, output, or
storage. This allows shell scripts to discover the hash algorithm in
use.

Since the transition plan allows for multiple input algorithms, document
that we may provide multiple results for input, and the format that the
results may take. While we don't support this now, documenting it early
means that script authors can future-proof their scripts for when we do.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>builtin/rev-parse: switch to use the_hash_algo</title>
<updated>2019-08-19T22:04:57Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2019-08-18T20:04:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7e0d029f187dfe3fee9de9ccce43200202fc14f6'/>
<id>urn:sha1:7e0d029f187dfe3fee9de9ccce43200202fc14f6</id>
<content type='text'>
Switch several hard-coded uses of the constant 40 to references to
the_hash_algo.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switch</title>
<updated>2019-01-24T19:55:06Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2019-01-24T08:29:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f8adbec9feaa7a1ab9814db1115826e87033712e'/>
<id>urn:sha1:f8adbec9feaa7a1ab9814db1115826e87033712e</id>
<content type='text'>
By default, index compat macros are off from now on, because they
could hide the_index dependency.

Only those in builtin can use it.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>sha1-name.c: remove implicit dependency on the_index</title>
<updated>2019-01-14T20:13:04Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2019-01-12T02:13:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3a7a698e93e1031c322ab20c0e336e205514c058'/>
<id>urn:sha1:3a7a698e93e1031c322ab20c0e336e205514c058</id>
<content type='text'>
This kills the_index dependency in get_oid_with_context() but for
get_oid() and friends, they still assume the_repository (which also
means the_index).

Unfortunately the widespread use of get_oid() will make it hard to
make the conversion now. We probably will add repo_get_oid() at some
point and limit the use of get_oid() in builtin/ instead of forcing
all get_oid() call sites to carry struct repository.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ag/rev-parse-all-exclude-fix'</title>
<updated>2018-11-13T13:37:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-11-13T13:37:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=20d04b4419559825160c267fb05cc5c683fbece8'/>
<id>urn:sha1:20d04b4419559825160c267fb05cc5c683fbece8</id>
<content type='text'>
"git rev-parse --exclude=* --branches --branches"  (i.e. first
saying "add only things that do not match '*' out of all branches"
and then adding all branches, without any exclusion this time")
worked as expected, but "--exclude=* --all --all" did not work the
same way, which has been fixed.

* ag/rev-parse-all-exclude-fix:
  rev-parse: clear --exclude list after 'git rev-parse --all'
</content>
</entry>
<entry>
<title>rev-parse: clear --exclude list after 'git rev-parse --all'</title>
<updated>2018-11-01T05:36:36Z</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruenba@redhat.com</email>
</author>
<published>2018-10-23T19:17:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5221048092b7a2359579b56bde4134c420e5555d'/>
<id>urn:sha1:5221048092b7a2359579b56bde4134c420e5555d</id>
<content type='text'>
Commit [1] added the --exclude option to revision.c.  The --all,
--branches, --tags, --remotes, and --glob options clear the exclude
list.  Shortly therafter, commit [2] added the same to 'git rev-parse',
but without clearing the exclude list for the --all option.

[1] e7b432c52 ("revision: introduce --exclude=&lt;glob&gt; to tame wildcards", 2013-08-30)
[2] 9dc01bf06 ("rev-parse: introduce --exclude=&lt;glob&gt; to tame wildcards", 2013-11-01)

Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit.h: remove method declarations</title>
<updated>2018-07-20T22:38:54Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2018-07-20T16:33:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6404355657fb3ec27668fb88c5175bb22aff3acc'/>
<id>urn:sha1:6404355657fb3ec27668fb88c5175bb22aff3acc</id>
<content type='text'>
These methods are now declared in commit-reach.h. Remove them from
commit.h and add new include statements in all files that require these
declarations.

Signed-off-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit: add repository argument to lookup_commit_reference</title>
<updated>2018-06-29T17:43:39Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2018-06-29T01:21:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2122f6754c93be8f02bfb5704ed96c88fc9837a8'/>
<id>urn:sha1:2122f6754c93be8f02bfb5704ed96c88fc9837a8</id>
<content type='text'>
Add a repository argument to allow callers of lookup_commit_reference
to be more specific about which repository to handle. This is a small
mechanical change; it doesn't change the implementation to handle
repositories other than the_repository yet.

As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
