Re: [Qgit RFC] commit --amend
- From
- Marco Costalba <mcostalba@gmail.com>
- Date
- Jul 6, 2007, 08:12 UTC
- Message-ID
- <e5bfff550707060112p29b9565bw9ccba6601745b850@mail.gmail.com>
- In-Reply-To
- <20070705185426.GB3991@efreet.light.src>
On 7/5/07, Jan Hudec <bulb@ucw.cz> wrote:
Show 5 quoted lines
>
> Therefore I'll either have to always ask git via run("git-rev-parse HEAD",
> head), add HEAD into the map, or store HEAD somewhere in the Git object.
> Which do you think makes most sense?
>Asking git when you need it and keep HEAD value only for the minimum time required to execute the commit command.
- HEAD is very 'volatile'
- commit is _not_ performance critical.
- commit, being a write operation, is instead bugs/misbehaviour critical (a big point to use an high level "git-commit" BTW)
- asking git with getRefSha("HEAD", ANY_REF, true) is very quick and
in any case much quicker then the whole commit dance.- someone can always change the repo behind you, qgit is not the only interface to git ;-) does exist also the command line.
Marco