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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]