git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Gondek, Andreas" <Andreas.Gondek@dwpbank.de>
To: Junio C Hamano <gitster@pobox.com>,
	Michael J Gruber <git@drmicha.warpmail.net>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: AW: Git merge driver / attributes bug in 2.3.1?
Date: Mon, 9 Mar 2015 09:02:31 +0000	[thread overview]
Message-ID: <D8780C527EB1E642B3150E6D705B46D448E8063B@DWPWHMS531.dwpbank.local> (raw)
In-Reply-To: <xmqqlhj9yftb.fsf@gitster.dls.corp.google.com>

We used a merge driver to create a conflict semaphore file whenever a merge conflict occurs in Atlassian Stash. This worked for several month until we got to update our Git version because of another problem.

If I understand it correctly, a merge driver is executed before the normal internal merge happens? So I would need to call a git merge-file in my merge driver, test the result and return the exit code of the git merge-file?

Greetings

Andreas Gondek
Applications
________________________________

Deutsche WertpapierService Bank AG
ITTAS
Derendorfer Allee 2
40476 Düsseldorf
Tel.: +49 69 5099 9503
Fax: +49 69 5099 85 9503
E-Mail: Andreas.Gondek@dwpbank.de
http://www.dwpbank.de

Deutsche WertpapierService Bank AG | Wildunger Straße 14 | 60487 Frankfurt am Main 
Sitz der AG: Frankfurt am Main, HRB 56913 | USt.-ID: DE 813759005 
Vorstand: Thomas Klanten, Dr. Christian Tonnesen
Aufsichtsrat: Wilfried Groos (Vors.)

-----Ursprüngliche Nachricht-----
Von: Junio C Hamano [mailto:gitster@pobox.com] 
Gesendet: Freitag, 6. März 2015 22:30
An: Michael J Gruber
Cc: Gondek, Andreas; git@vger.kernel.org
Betreff: Re: Git merge driver / attributes bug in 2.3.1?

Michael J Gruber <git@drmicha.warpmail.net> writes:

> Gondek, Andreas venit, vidit, dixit 06.03.2015 14:31:
>> The archive contains my test repository, the merge driver and the
> .gitconfig of the user. We don't have a global .gitconfig.
>
> Thanks for the test repo!
>
> Alas, the merge driver gets executed with v1.9.0-rc3, v1.8.5 and 
> v1.7.0, at least over here - as it should be because of the conflict: 
> two patches changing the same file. That conflict can be resolved 
> automatically by the internal driver, of course.

That matches my expectation.  The whole point to have the merge driver plug-in mechanism is to allow overriding the internal textual 3-way file-level merge, so we would have always called out to the custom driver when the tree-level merge machinery says that the content needs a file-level merge [*1*].


[Footnote]

*1* This is a tangent, but I've been wondering if we want some cases where the tree-level merge machinery currently says that there is no need for file-level merge to be fed to the merge driver.

Specifically, the tree-level merge machinery considers a case where you and the other party changed the files identically to be cleanly merged, but for contents of certain nature, that may not be always desirable.

Imagine that I and my wife are sharing a note to record what is in our refrigerator.  After I buy a carton of milk, I'd do

    $ echo "1 carton of milk" >>fridge.txt
    $ git commit && git push

and my wife would do the same.

    $ echo "1 carton of milk" >>fridge.txt
    $ git commit && git push

which would not fast-forward, and then she would

    $ git pull

which would result in only one carton of milk in our fridge, even though when both of us got home, we will realize that we now have two of them.

  reply	other threads:[~2015-03-09  9:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-05 13:30 Git merge driver / attributes bug in 2.3.1? Gondek, Andreas
2015-03-05 18:55 ` Junio C Hamano
2015-03-06 11:25 ` Michael J Gruber
2015-03-06 13:31   ` AW: " Gondek, Andreas
2015-03-06 14:12     ` Michael J Gruber
2015-03-06 21:30       ` Junio C Hamano
2015-03-09  9:02         ` Gondek, Andreas [this message]
2015-03-09  9:35           ` Michael J Gruber
  -- strict thread matches above, loose matches on Subject: below --
2015-03-06 13:40 AW: " Andreas

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=D8780C527EB1E642B3150E6D705B46D448E8063B@DWPWHMS531.dwpbank.local \
    --to=andreas.gondek@dwpbank.de \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
Code repositories for project(s) associated with this public inbox

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

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 read-only IMAP folder(s) and NNTP newsgroup(s).