From: Junio C Hamano <gitster@pobox.com>
To: "Scott R. Godin" <scottg.wp-hackers@mhg2.com>
Cc: git@vger.kernel.org
Subject: Re: [BUG] [RESOLVED] merge-recursive call in git-am -3 chokes, autocrlf issue?
Date: Thu, 01 Apr 2010 10:27:50 -0700 [thread overview]
Message-ID: <7vbpe3qe09.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <hp2jkj$mu0$1@dough.gmane.org> (Scott R. Godin's message of "Thu\, 01 Apr 2010 13\:03\:15 -0400")
"Scott R. Godin" <scottg.wp-hackers@mhg2.com> writes:
> So my recommendation at this point is to patch the instructions within
> setgitperms.perl to add 'git update-index --refresh' to the end of the
> post-checkout hook.
>
> I've since reset git-am to use recursive again (instead of resolve)
> and done several rebases (both with and without -i) and all seems well
> and normal, and this has made my day.
Ahh. If you muck with work tree files and the index in pre-commit,
post-merge, or post-checkout hook (especially if you make an up-to-date
work tree file stat-dirty), I can imagine that you would need to "refresh"
so that unchanged paths would appear unchanged in the index not to confuse
your caller.
I however think the patch probably "fixes" the issue at the worst point.
Wouldn't either of these alternatives be better?
(1) Perhaps the caller of "pre-commit/post-merge/post-checkout" hook
should instead refresh the index when the hook returns, _iff_ we
expect that majority of these hooks are used to munge the work tree
or the index; or
(2) Because you already established that setgitperms script is the
culprit that leaves the index unrefreshed, instead of forcing all the
callers of the script, it should do the refresh for its callers
before it exits.
next prev parent reply other threads:[~2010-04-01 17:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-19 0:49 [BUG] merge-recursive call in git-am -3 chokes, autocrlf issue? Thomas Rast
2010-04-01 17:03 ` [BUG] [RESOLVED] " Scott R. Godin
2010-04-01 17:27 ` Junio C Hamano [this message]
2010-05-04 21:47 ` Scott R. Godin
2010-05-24 17:09 ` [PATCH] setgitperms.perl dirty index problem (was Re: [BUG] [RESOLVED] merge-recursive call in git-am -3 chokes, autocrlf issue?) Scott R. Godin
2010-05-25 5:37 ` [PATCH] setgitperms.perl dirty index problem Junio C Hamano
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=7vbpe3qe09.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=scottg.wp-hackers@mhg2.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 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.