Re: seperate commits for objects already updated in index?

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

 



Junio C Hamano wrote:
Andreas Ericsson <ae@xxxxxx> 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@xxxxxx
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
-
: 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]