Thread (17 messages) flat view 17 messages, 7 authors, 2016-06-15

Re: [PATCH] Add option to git-commit to allow empty log messages

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:48:33

Possibly related (same subject, not in this thread)

Jonathan Nieder wrote:
	parent=HEAD && : or whatever &&
	tree=$(git write-tree) &&
	printf "%s\n" message |
	commit=$(git commit-tree "$tree" -p "$parent") &&
	git update-ref refs/heads/somebranch "$commit"
I rearranged this example the last minute and broke it.  You might
say this proves the opposite of my point, though I don’t think that
would be warranted.  Anyway, to feed the message into ‘git
commit-tree’ standard input, the relevant part of the example should
have read as follows:

commit=$(
	printf "%s\n" message |
	git commit-tree "$tree" -p "$parent"
)

Incidentally, outside of the user manual and contrib/examples/ in the
sources, the git documentation does not have many examples like this
to point to, which is too bad.

Sorry for the confusion,
Jonathan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help