From: Marco Costalba Date: Fri, 06 Jul 2007 08:12:50 GMT Subject: Re: [Qgit RFC] commit --amend Message-ID: In-Reply-To: <20070705185426.GB3991@efreet.light.src> On 7/5/07, Jan Hudec wrote: > > 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