All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Greaves <david@dgreaves.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Rhys Hardwick <rhys@rhyshardwick.co.uk>, git@vger.kernel.org
Subject: Re: Git hangs while executing commit-tree
Date: Wed, 20 Apr 2005 23:08:16 +0100	[thread overview]
Message-ID: <4266D2D0.5000503@dgreaves.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0504201446510.6467@ppc970.osdl.org>

Linus Torvalds wrote:
> 
> On Wed, 20 Apr 2005, Rhys Hardwick wrote:
> 
>>rhys@metatron:~/repo/tmp.repo$ commit-tree  c80156fafbac377ab35beb076090c8320f874f91
>>Committing initial tree c80156fafbac377ab35beb076090c8320f874f91
>> 
>>At this point, the command seems to be just waiting.
> 
> 
> That's _exactly_ what it's doing. It's waiting for you to write a commit 
> message.
> 
> Something like
> 
> 	This is my initial commit of Hello World!
> 	^D
> 
> will make it happy.
> 
> Alternatively, you can certainly just write your message beforehand with 
> an editor and just pipe it into commit-tree.
> 
> 			Linus

When someone commits the docs I'll submit the next patch for the README:

commit-tree
	commit-tree <sha1> [-p <parent sha1>...] < changelog

Creates a new commit object based on the provided tree object and
emits the new commit object id on stdout. If no parent is given then
it is considered to be an initial tree.

A commit comment is read from stdin (max 999 chars)

A commit object usually has 1 parent (a commit after a change) or 2
parents (a merge) although there is no reason it cannot have more than
2 parents.

While a tree represents a particular directory state of a working
directory, a commit represents that state in "time", and explains how
to get there.

Normally a commit would identify a new "HEAD" state, and while git
doesn't care where you save the note about that state, in practice we
tend to just write the result to the file ".git/HEAD", so that we can
always see what the last committed state was.

Options

<sha1>
	An existing tree object

-p <parent sha1>
	Each -p indicates a the id of a parent commit object.
	

Commit Information

A commit encapsulates:
	all parent object ids
	author name, email and date
	committer name and email and the commit time.

If not provided, commit-tree uses your name, hostname and domain to
provide author and committer info. This can be overridden using the
following environment variables.
	AUTHOR_NAME
	AUTHOR_EMAIL
	AUTHOR_DATE
	COMMIT_AUTHOR_NAME
	COMMIT_AUTHOR_EMAIL
(nb <,> and CRs are stripped)

see also: write-tree

David
-- 

  reply	other threads:[~2005-04-20 22:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-20 21:28 Git hangs while executing commit-tree Rhys Hardwick
2005-04-20 21:35 ` Petr Baudis
2005-04-20 21:48 ` Linus Torvalds
2005-04-20 22:08   ` David Greaves [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-04-20 21:38 Rhys Hardwick

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4266D2D0.5000503@dgreaves.com \
    --to=david@dgreaves.com \
    --cc=git@vger.kernel.org \
    --cc=rhys@rhyshardwick.co.uk \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.