From: Yaroslav Halchenko <yoh@onerussian.com>
To: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: BUG: merge -s theirs is not in effect (does the same as -s ours)
Date: Sun, 24 Sep 2017 20:02:13 -0400 [thread overview]
Message-ID: <20170925000213.rilmsczdbi3jqkta@hopa.kiewit.dartmouth.edu> (raw)
My interest was to get remote branch "merge" the changes in the branch taking
the branch's version (primarily alternative symlinks for git-annex'ed content)
over the version in master (previous merge of a similar branch). Unfortunately
-s theirs seems to do actually -s ours -- symlinks and content is taken from
the 'ours' branch instead of theirs. workaround -- perform -s ours of
master within the branch, and then ff of master to that state:
$> git --version
git version 2.14.1.729.g59c0ea183a
$> rm -rf /tmp/repo1; mkdir /tmp/repo1; cd /tmp/repo1; git init .; ln -s sym1 link; echo 1 > file; git add file link; git commit -m 'common'; git co -b b1 ; ln -sf b1link link; echo "b1 file" >| file; git commit -m 'b2 changes' -a; git co master; ln -sf masterlink link; echo "master file" >| file; git commit -m 'also modified in master' -a; git merge -s theirs --no-edit b1; ls -l link; cat file
E: could not determine git repository root
warning: templates not found /home/yoh/share/git-core/templates
Initialized empty Git repository in /tmp/repo1/.git/
[master (root-commit) b6a69d0] common
2 files changed, 2 insertions(+)
create mode 100644 file
create mode 120000 link
Switched to a new branch 'b1'
[b1 739eb85] b2 changes
2 files changed, 2 insertions(+), 2 deletions(-)
Switched to branch 'master'
[master 18a2da4] also modified in master
2 files changed, 2 insertions(+), 2 deletions(-)
args: b6a69d0c0c2500530cba8bc2987a1f79998b5e74 -- HEAD 739eb853c480b729ec07da533610243e3a6d69ee
Merge made by the 'theirs' strategy.
lrwxrwxrwx 1 yoh yoh 10 Sep 24 19:58 link -> masterlink
master file
--
Yaroslav O. Halchenko
Center for Open Neuroscience http://centerforopenneuroscience.org
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834 Fax: +1 (603) 646-1419
WWW: http://www.linkedin.com/in/yarik
next reply other threads:[~2017-09-25 0:28 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-25 0:02 Yaroslav Halchenko [this message]
2017-09-25 1:08 ` BUG: merge -s theirs is not in effect (does the same as -s ours) Junio C Hamano
2017-09-25 3:17 ` Yaroslav Halchenko
2017-09-25 5:33 ` Re* " Junio C Hamano
2017-09-25 14:30 ` -X theirs does not resolve symlink conflict Was: BUG: merge -s theirs is not in effect Yaroslav Halchenko
2017-09-26 1:56 ` Junio C Hamano
2017-09-26 2:16 ` Junio C Hamano
2017-09-26 2:39 ` Junio C Hamano
2017-09-26 13:37 ` Yaroslav Halchenko
2017-10-16 5:38 ` [PATCH] merge: teach -Xours/-Xtheirs to symbolic link merge Junio C Hamano
2017-12-29 2:49 ` Elijah Newren
2017-12-29 4:41 ` Yaroslav Halchenko
2018-01-25 4:35 ` external diff driver is not used for diff --stat? Yaroslav Halchenko
2017-09-25 14:40 ` -s theirs use-case(s) Was: BUG: merge -s theirs is not in effect Yaroslav Halchenko
2017-09-26 3:45 ` Junio C Hamano
2017-09-26 13:32 ` Yaroslav Halchenko
2017-09-27 0:09 ` Junio C Hamano
2017-09-27 5:19 ` Yaroslav Halchenko
2017-09-27 20:21 ` Yaroslav Halchenko
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=20170925000213.rilmsczdbi3jqkta@hopa.kiewit.dartmouth.edu \
--to=yoh@onerussian.com \
--cc=git@vger.kernel.org \
/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).