git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joey Hess <joey@kitenet.net>
To: Johan Herland <johan@herland.net>
Cc: Jonathan Nieder <jrnieder@gmail.com>, git@vger.kernel.org
Subject: Re: git-union-merge proposal
Date: Tue, 21 Jun 2011 12:10:44 -0400	[thread overview]
Message-ID: <20110621161044.GA8079@gnu.kitenet.net> (raw)
In-Reply-To: <201106210934.34025.johan@herland.net>

[-- Attachment #1: Type: text/plain, Size: 1688 bytes --]

Jonathan Nieder wrote:
> Does the GitRepo module that it uses come from git-annex?
> 
> If the prototype were self-contained, I would encourage you to submit
> it for inclusion under contrib/ so it can evolve and eventually
> graduate out of there.  Cc-ing Johan (who has no doubt thought through
> these things in the context of "git notes") in case he has thoughts on
> it.

Yes, this was written in the context of git-annex. I would probably not want
to submit the haskell implementation to contrib/, but a shell implementation
could be done that would be perhaps less robust, but also less unusual in
the context of git's code base.

Johan Herland wrote:
> I must confess that my Haskell skills are exactly nil, but AFAICS the script 
> depends on the filename as the only criteria to identify files that need a 
> line-level merge. How does the script deal with renamed and copied files?
> 
> If you depend on the filename only, this script simply will not work for 
> notes.

It simply depends on filenames. I saw there was additional complexity
in notes and I don't see how a general purpose merger can handle that.
(I wish I could just use notes for my application, but I have data that
is not tied to any one object in git.)

Although, this is an obvious extension that would add some flexability
to handle for files that cannot be merged with a naive union:

git union-merge foo origin/foo refs/heads/foo -c "sort * | uniq"

Where the files would be passed in as temp files.

Hmm, that makes it look not unlike git-filter-branch, except
it's generating a new commit at the tip. I *think* that filter-branch
can't do this.

-- 
see shy jo

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  reply	other threads:[~2011-06-21 16:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-21  2:20 git-union-merge proposal Joey Hess
2011-06-21  5:22 ` Jonathan Nieder
2011-06-21  7:34   ` Johan Herland
2011-06-21 16:10     ` Joey Hess [this message]
2011-06-21 17:44 ` Junio C Hamano
2011-06-21 18:12   ` Junio C Hamano
2011-06-21 18:41   ` Joey Hess
2011-06-21 20:19     ` 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=20110621161044.GA8079@gnu.kitenet.net \
    --to=joey@kitenet.net \
    --cc=git@vger.kernel.org \
    --cc=johan@herland.net \
    --cc=jrnieder@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).