From: Andreas Ericsson <ae@op5.se>
To: Junio C Hamano <junkio@cox.net>
Cc: Paul Jakma <paul@clubi.ie>,
git@vger.kernel.org, Linus Torvalds <torvalds@osdl.org>
Subject: Re: seperate commits for objects already updated in index?
Date: Wed, 15 Mar 2006 20:43:12 +0100 [thread overview]
Message-ID: <44186E50.6090400@op5.se> (raw)
In-Reply-To: <7vlkvbik8f.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
> Andreas Ericsson <ae@op5.se> writes:
>
>
>>Can't this be done by updating .git/index first and then use the
>>temporary index to commit? Then .git/index would match the current
>>tree and everybody would be happy with very little tweaking. Doing the
>>temporary index commit first could cause data-loss as described above
>>if the updating of .git/index somehow fails and the user is unaware of
>>it (or what to do to fix it).
>
>
> You have to think about how to rewind it when the user decides
> later not to commit by for example giving an empty commit
> message or killing the editor. The order of things need to be
> to populate the index to be committed so that we can give
> preview in the commit log template upon 'commit -v', spawn the
> editor and get the final version of log, and then make a
> commit. So it may or may not be doable -- I haven't thought
> about it through, and currently have not much incentive nor
> inclination to think about it myself right now.
>
cp .git/index .git/pre-commit-index
and roll it back if the user aborts. Should work, but like you I don't
need that functionality, so...
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
prev parent reply other threads:[~2006-03-15 19:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-14 16:37 seperate commits for objects already updated in index? Paul Jakma
2006-03-14 17:00 ` Linus Torvalds
2006-03-14 17:04 ` Paul Jakma
2006-03-14 17:20 ` Linus Torvalds
2006-03-14 17:27 ` Paul Jakma
2006-03-14 23:51 ` Junio C Hamano
2006-03-15 3:24 ` Junio C Hamano
2006-03-15 13:28 ` Paul Jakma
2006-03-15 14:00 ` Andreas Ericsson
2006-03-15 19:25 ` Junio C Hamano
2006-03-15 19:43 ` Andreas Ericsson [this message]
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=44186E50.6090400@op5.se \
--to=ae@op5.se \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=paul@clubi.ie \
--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.