From: Junio Hamano <junio@twinsun.com>
To: "Richard Hartmann" <richih.mailinglist@gmail.com>
Cc: "Shawn O. Pearce" <spearce@spearce.org>,
"Miklos Vajna" <vmiklos@frugalware.org>,
git@vger.kernel.org
Subject: Re: commiting while the current version is in conflict
Date: Thu, 16 Oct 2008 16:39:53 -0700 [thread overview]
Message-ID: <7vy70of6t2.fsf@arte.twinsun.com> (raw)
> Judging from the code in the pre-commit script, git does not
> keep conflict information in its metadata cache, but tries to guess
> conflicts from the file's contents/ This seems to be a strange
> thing to do, imo. What's the reason for this?
Because
(0) You are wrong to assume that git does not keep conflict
information; we can tell if the index is "unmerged" to see
if you still have unresolved conflicts;
(1) When the index is unmerged, git-commit will stop even
before getting to pre-commit hook, so there is no point
for pre-commit hook to check if the index is unmerged;
(2) pre-commit hook is a last ditch effort to help ignorant
users who have already done "git add" without thinking and
lost the "unmerged" state. It has to look at and guess at
the contents for that.
next reply other threads:[~2008-10-17 0:11 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-16 23:39 Junio Hamano [this message]
2008-10-17 7:21 ` commiting while the current version is in conflict Richard Hartmann
2008-10-17 8:37 ` Junio C Hamano
2008-10-17 9:32 ` Richard Hartmann
2008-10-17 9:16 ` Jakub Narebski
2008-10-17 9:35 ` Richard Hartmann
2008-10-17 9:36 ` Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2008-10-16 22:10 Richard Hartmann
2008-10-16 22:48 ` Miklos Vajna
2008-10-16 23:00 ` Shawn O. Pearce
2008-10-16 23:26 ` Richard Hartmann
2008-10-17 1:16 ` Avery Pennarun
2008-10-16 23:07 ` Richard Hartmann
2008-10-16 23:23 ` Shawn O. Pearce
2008-10-16 23:31 ` Richard Hartmann
2008-10-16 23:42 ` Jakub Narebski
2008-10-17 7:25 ` Richard Hartmann
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=7vy70of6t2.fsf@arte.twinsun.com \
--to=junio@twinsun.com \
--cc=git@vger.kernel.org \
--cc=richih.mailinglist@gmail.com \
--cc=spearce@spearce.org \
--cc=vmiklos@frugalware.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.