From: Jan Hudec <bulb@ucw.cz>
To: Marco Costalba <mcostalba@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [Qgit RFC] commit --amend
Date: Sun, 8 Jul 2007 15:38:26 +0200 [thread overview]
Message-ID: <20070708133825.GE3991@efreet.light.src> (raw)
In-Reply-To: <e5bfff550707060112p29b9565bw9ccba6601745b850@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1514 bytes --]
On Fri, Jul 06, 2007 at 10:12:50 +0200, Marco Costalba wrote:
> On 7/5/07, Jan Hudec <bulb@ucw.cz> 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.
Yes. It is also much faster to write in code, but...
> - someone can always change the repo behind you, qgit is not the only
> interface to git ;-) does exist also the command line.
And the commit in qgit should better fail loudly if that happens, because the
list of files or something else might no longer make sense.
There is actually just one thing I need the head for -- passing it as 3rd
argument to git-update-ref. That should be done purely as safety measure --
if the value does not match, the command will fail. And for that safety
measure to be useful, I need value of the head at the time user openend the
commit dialog, NOT the time user clicked on commit button.
--
Jan 'Bulb' Hudec <bulb@ucw.cz>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-07-08 13:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-10 15:08 [Qgit RFC] commit --amend Jan Hudec
2007-06-10 22:10 ` Marco Costalba
2007-06-11 4:42 ` Jan Hudec
2007-06-11 5:24 ` Marco Costalba
2007-06-11 5:45 ` Marco Costalba
2007-07-01 12:26 ` Jan Hudec
2007-07-01 16:09 ` Marco Costalba
2007-07-02 18:03 ` Jan Hudec
2007-07-04 5:10 ` Junio C Hamano
2007-07-04 12:44 ` Marco Costalba
2007-07-04 18:28 ` Jan Hudec
2007-07-04 19:51 ` Junio C Hamano
2007-07-06 7:54 ` Marco Costalba
2007-07-05 18:54 ` Jan Hudec
2007-07-06 8:12 ` Marco Costalba
2007-07-08 13:38 ` Jan Hudec [this message]
2007-07-08 13:49 ` Marco Costalba
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=20070708133825.GE3991@efreet.light.src \
--to=bulb@ucw.cz \
--cc=git@vger.kernel.org \
--cc=mcostalba@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).