All of lore.kernel.org
 help / color / mirror / Atom feed
* Merge driver not called for locally modified files?
@ 2016-04-02 14:14 Gioele Barabucci
  2016-04-02 16:21 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Gioele Barabucci @ 2016-04-02 14:14 UTC (permalink / raw)
  To: git

Hello,

it seems to me that merge drivers are not called while merging commits
that touch locally modified (but uncommited) files. Is this correct?

I made a (simple) merge driver for files in the `pw` format. [1] This
driver works correctly when a file is modified by multiple commits.
However, if a file has only been modified locally (and not committed),
then merging a commit that modifies the same file raises the following
error:

    $ git merge --ff-only 78d4f09
    Updating 5180202..78d4f09
    error: Your local changes to the following files would
    be overwritten by merge:
	.local/share/pw/passwords
    Please, commit your changes or stash them before you can merge.
    Aborting

>From my experiments, it looks like the merge driver is not called at all.

Is it possible to configure git so that the merge driver is called also
while merging locally modified files?

Regards,

[1] https://github.com/gioele/pw/blob/master/bin/git-pw-merge

-- 
Gioele Barabucci <gioele@svario.it>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-02 16:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-02 14:14 Merge driver not called for locally modified files? Gioele Barabucci
2016-04-02 16:21 ` Junio C Hamano

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.