Re: [PATCH] Add option to git-commit to allow empty log messages
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Apr 5, 2010, 18:11 UTC
- Message-ID
- <20100405181152.GA32188@progeny.tock>
- In-Reply-To
- <20100405175822.GA32083@progeny.tock>
Jonathan Nieder wrote:
Show 5 quoted lines
> 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