<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/commit-tree.c, branch gitk-resize-error</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=gitk-resize-error</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=gitk-resize-error'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2021-08-25T21:39:08Z</updated>
<entry>
<title>use xopen() to handle fatal open(2) failures</title>
<updated>2021-08-25T21:39:08Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2021-08-25T20:16:46Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=66e905b7dd0f4e9dd576be681f30fbaeeb19ec4a'/>
<id>urn:sha1:66e905b7dd0f4e9dd576be681f30fbaeeb19ec4a</id>
<content type='text'>
Add and apply a semantic patch for using xopen() instead of calling
open(2) and die() or die_errno() explicitly.  This makes the error
messages more consistent and shortens the code.

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>Use OPT_CALLBACK and OPT_CALLBACK_F</title>
<updated>2020-04-28T17:47:10Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2020-04-28T08:36:28Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=203c85339fb51bb8b83aae8f0adde44d6e55e018'/>
<id>urn:sha1:203c85339fb51bb8b83aae8f0adde44d6e55e018</id>
<content type='text'>
In the codebase, there are many options which use OPTION_CALLBACK in a
plain ol' struct definition. However, we have the OPT_CALLBACK and
OPT_CALLBACK_F macros which are meant to abstract these plain struct
definitions away. These macros are useful as they semantically signal to
developers that these are just normal callback option with nothing fancy
happening.

Replace plain struct definitions of OPTION_CALLBACK with OPT_CALLBACK or
OPT_CALLBACK_F where applicable. The heavy lifting was done using the
following (disgusting) shell script:

	#!/bin/sh

	do_replacement () {
		tr '\n' '\r' |
			sed -e 's/{\s*OPTION_CALLBACK,\s*\([^,]*\),\([^,]*\),\([^,]*\),\([^,]*\),\([^,]*\),\s*0,\(\s*[^[:space:]}]*\)\s*}/OPT_CALLBACK(\1,\2,\3,\4,\5,\6)/g' |
			sed -e 's/{\s*OPTION_CALLBACK,\s*\([^,]*\),\([^,]*\),\([^,]*\),\([^,]*\),\([^,]*\),\([^,]*\),\(\s*[^[:space:]}]*\)\s*}/OPT_CALLBACK_F(\1,\2,\3,\4,\5,\6,\7)/g' |
			tr '\r' '\n'
	}

	for f in $(git ls-files \*.c)
	do
		do_replacement &lt;"$f" &gt;"$f.tmp"
		mv "$f.tmp" "$f"
	done

The result was manually inspected and then reformatted to match the
style of the surrounding code. Finally, using
`git grep OPTION_CALLBACK \*.c`, leftover results which were not handled
by the script were manually transformed.

Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit-tree: utilize parse-options api</title>
<updated>2019-03-08T01:31:24Z</updated>
<author>
<name>Brandon Richardson</name>
<email>brandon1024.br@gmail.com</email>
</author>
<published>2019-03-07T15:44:09Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=cbdeab98e871bfbb45cf5095cc804ebb07054eba'/>
<id>urn:sha1:cbdeab98e871bfbb45cf5095cc804ebb07054eba</id>
<content type='text'>
Rather than parse options manually, which is both difficult to
read and error prone, parse options supplied to commit-tree
using the parse-options api.

It was discovered that the --no-gpg-sign option was documented
but not implemented in commit 70ddbd7767 (commit-tree: add missing
--gpg-sign flag, 2019-01-19), and the existing implementation
would attempt to translate the option as a tree oid. It was also
suggested earlier in commit 55ca3f99ae (commit-tree: add and document
--no-gpg-sign, 2013-12-13) that commit-tree should be migrated to
utilize the parse-options api, which could help prevent mistakes
like this in the future. Hence this change.

Also update the documentation to better describe that mixing
`-m` and `-F` options will correctly compose commit log messages in the
order in which the options are given.

In the process, mark various strings for translation.

Signed-off-by: Brandon Richardson &lt;brandon1024.br@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit-tree: add missing --gpg-sign flag</title>
<updated>2019-01-22T19:08:35Z</updated>
<author>
<name>Brandon Richardson</name>
<email>brandon1024.br@gmail.com</email>
</author>
<published>2019-01-19T23:23:34Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=70ddbd7767c24076975a176e734767facd3b5380'/>
<id>urn:sha1:70ddbd7767c24076975a176e734767facd3b5380</id>
<content type='text'>
Add --gpg-sign option in commit-tree, which was documented, but not
implemented, in 55ca3f99ae. Add tests for the --gpg-sign option.

Signed-off-by: Brandon Richardson &lt;brandon1024.br@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit: add repository argument to lookup_commit</title>
<updated>2018-06-29T17:43:39Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2018-06-29T01:21:59Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=c1f5eb49620d4f287af28509621a364e3888cfe7'/>
<id>urn:sha1:c1f5eb49620d4f287af28509621a364e3888cfe7</id>
<content type='text'>
Add a repository argument to allow callers of lookup_commit 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>
<entry>
<title>object-store: move object access functions to object-store.h</title>
<updated>2018-05-16T02:42:03Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2018-05-15T23:42:15Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=cbd53a2193d11e83b5bad2c3514bd1603074bc36'/>
<id>urn:sha1:cbd53a2193d11e83b5bad2c3514bd1603074bc36</id>
<content type='text'>
This should make these functions easier to find and cache.h less
overwhelming to read.

In particular, this moves:
- read_object_file
- oid_object_info
- write_object_file

As a result, most of the codebase needs to #include object-store.h.
In this patch the #include is only added to files that would fail to
compile otherwise.  It would be better to #include wherever
identifiers from the header are used.  That can happen later
when we have better tooling for it.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>sha1_file: convert assert_sha1_type to object_id</title>
<updated>2018-03-14T16:23:49Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2018-03-12T02:27:42Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=e816caa07b8acb5c8ed2d467666ca819fb80bc58'/>
<id>urn:sha1:e816caa07b8acb5c8ed2d467666ca819fb80bc58</id>
<content type='text'>
Convert this function to take a pointer to struct object_id and rename
it to assert_oid_type.

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>commit: convert commit_tree* to object_id</title>
<updated>2018-01-30T18:42:36Z</updated>
<author>
<name>Patryk Obara</name>
<email>patryk.obara@gmail.com</email>
</author>
<published>2018-01-28T00:13:16Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=5078f344591ee3c454e64ff73e6563f0a3f14950'/>
<id>urn:sha1:5078f344591ee3c454e64ff73e6563f0a3f14950</id>
<content type='text'>
Convert the definitions and declarations of commit_tree and
commit_tree_extended to use struct object_id and adjust all usages of
these functions.

Signed-off-by: Patryk Obara &lt;patryk.obara@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'rk/commit-tree-make-F-verbatim'</title>
<updated>2017-09-19T01:47:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-09-19T01:47:57Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=4d46bce6b07b8047aad2726e5dc42edcc6787d6b'/>
<id>urn:sha1:4d46bce6b07b8047aad2726e5dc42edcc6787d6b</id>
<content type='text'>
Unlike "git commit-tree &lt; file", "git commit-tree -F file" did not
pass the contents of the file verbatim and instead completed an
incomplete line at the end, if exists.  The latter has been updated
to match the behaviour of the former.

* rk/commit-tree-make-F-verbatim:
  commit-tree: do not complete line in -F input
</content>
</entry>
<entry>
<title>commit-tree: do not complete line in -F input</title>
<updated>2017-09-10T07:29:53Z</updated>
<author>
<name>Ross Kabus</name>
<email>rkabus@aerotech.com</email>
</author>
<published>2017-09-07T14:41:11Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=c818e743325e5710dbf2071b769fbcbc3b50a9e0'/>
<id>urn:sha1:c818e743325e5710dbf2071b769fbcbc3b50a9e0</id>
<content type='text'>
"git commit-tree -F &lt;file&gt;", unlike "cat &lt;file&gt; | git
commit-tree" (i.e. feeding the same contents from the standard
input), added a missing final newline when the input ended in an
incomplete line.

Correct this inconsistency by leaving the incomplete line as-is,
as erring on the side of not touching the input is preferrable
and expected for a plumbing command like "commit-tree".

Signed-off-by: Ross Kabus &lt;rkabus@aerotech.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
