git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Thomas Rast <trast@inf.ethz.ch>
To: Michael Haggerty <mhagger@alum.mit.edu>
Cc: git discussion list <git@vger.kernel.org>
Subject: Re: [PATCH 0/3] merge -Xindex-only
Date: Mon, 8 Jul 2013 17:44:26 +0200	[thread overview]
Message-ID: <87k3l1gip1.fsf@linux-k42r.v.cablecom.net> (raw)
In-Reply-To: <51DAD8F2.5070008@alum.mit.edu> (Michael Haggerty's message of "Mon, 08 Jul 2013 17:21:22 +0200")

Michael Haggerty <mhagger@alum.mit.edu> writes:

> [Resend because of address confusion in replied-to email.]
>
> On 07/07/2013 08:00 PM, Thomas Rast wrote:
>> I recently looked into making merge-recursive more useful as a modular
>> piece in various tasks, e.g. Michael's git-imerge and the experiments
>> I made in showing evil merges.
>> 
>> This miniseries is the extremely low-hanging fruit.  If it makes a
>> good first step for git-imerge, perhaps it can go in like this.  It's
>> not a big speedup (about 2.2s vs 2.4s in a sample conflicting merge in
>> git.git), but it does feel much cleaner to avoid touching the worktree
>> unless actually necessary.
>> 
>> Otherwise it's probably not worth it just yet; for what I want to do
>> with it, we need some more reshuffling of things.
>
> Interesting.
>
> For git-imerge, it would be nice to speed up merges by skipping the
> working tree updates.  10% might not be so noticeable, but every little
> bit helps :-)
>
> But the killer benefit would be if git-imerge could do some of its
> automatic merge-testing and autofilling in the background while the user
> is resolving conflicts in the main index and working tree.
>
> Is it possible to use this option with an alternate index file (e.g.,
> via the GIT_INDEX_FILE environment variable)?  Can it be made to leave
> other shared state (e.g., MERGE_HEAD) alone?  If so, maybe it's already
> there.

GIT_INDEX_FILE yes, that one works out of the box.

I think for the shared state, the following is a (probably) ridiculously
unsupported yet magic way of achieving this:

  mkdir -p unshared/.git
  cd unshared/.git
  for f in ../../.git/*; do
    case "$f" in
      *HEAD | index)
        cp "$f" .
        ;;
      *)
        ln -s "$f" .
        ;;
    esac
  done

That gives you a repository that propagates ref changes and object
writing, but does not propagate changes to index, HEAD, FETCH_HEAD or
MERGE_HEAD.  Which might just be what you need?

Note that as far as I'm concerned, this is a live handgrenade.  It could
blow up in your face at any time, but it probably has its applications...

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

  reply	other threads:[~2013-07-08 15:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-07 18:02 Thomas Rast
2013-07-07 18:02 ` [PATCH 1/3] merge-recursive: remove dead conditional in update_stages() Thomas Rast
2013-07-07 18:02 ` [PATCH 2/3] merge-recursive: untangle double meaning of o->call_depth Thomas Rast
2013-07-07 18:37   ` Junio C Hamano
2013-07-07 18:02 ` [PATCH 3/3] merge-recursive: -Xindex-only to leave worktree unchanged Thomas Rast
2013-07-08 15:21 ` [PATCH 0/3] merge -Xindex-only Michael Haggerty
2013-07-08 15:44   ` Thomas Rast [this message]
2013-07-09  9:44     ` Michael Haggerty
2013-07-09 12:08       ` Thomas Rast
2013-07-09 19:38         ` Michael Haggerty
2013-07-09 20:01           ` Thomas Rast
2013-10-26 14:40             ` Thomas Rast
2013-10-26 14:43               ` [PATCH 1/3] merge-recursive: remove dead conditional in update_stages() Thomas Rast
2013-10-26 14:43                 ` [PATCH 2/3] merge-recursive: internal flag to avoid touching the worktree Thomas Rast
2013-10-26 14:43                 ` [PATCH 3/3] merge-recursive: -Xindex-only to leave worktree unchanged Thomas Rast

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k3l1gip1.fsf@linux-k42r.v.cablecom.net \
    --to=trast@inf.ethz.ch \
    --cc=git@vger.kernel.org \
    --cc=mhagger@alum.mit.edu \
    --subject='Re: [PATCH 0/3] merge -Xindex-only' \
    /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

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.version-control.git
	nntp://ie5yzdi7fg72h7s4sdcztq5evakq23rdt33mfyfcddc5u3ndnw24ogqd.onion/inbox.comp.version-control.git
	nntp://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git