From: suvayu ali <fatkasuvayu+linux@gmail.com>
To: git@vger.kernel.org
Subject: Trouble with file specific merge strategies
Date: Sun, 11 Mar 2012 00:47:41 +0100 [thread overview]
Message-ID: <CAMXnza3SLHWLsFkYLhkJLAwtP2n=QVTXZ__GSL-CvajxC6i0Dw@mail.gmail.com> (raw)
Hi git devs,
I have a repo with two branches where some files are absent in one of
the branches. Say the two branches are <allfiles> and <somefiles>. Until now
I was using
$ git merge -s ours <allfiles> # with <somefiles> checked out
to merge commits which touches the absent files. But this clutters up
history and is very inconvenient to do sometimes. So when I came across
the possibility of using .gitattributes for file specific merge
strategies, I tried the following:
pattern merge=ours
However I get the following conflict message:
CONFLICT (rename/delete): org-mode-config.el deleted in HEAD and
renamed in 74288bb. Version 74288bb of org-mode-config.el left in
tree.
This file was deleted from <somefiles> in the past[1] and was renamed in
<allfiles> since the last merge. I was expecting this file to be ignored
(or in other words, merged with ours) since the .gitattributes file has
entries like these:
org-mode-config.el merge=ours # new name in allfiles branch
lisp/org-mode-settings.el merge=ours # old name deleted in somefiles
I also see other new files in <allfiles> which are mentioned in
.gitattributes being merged in <somefiles>.
$ git status -sb
## somefiles
M abbrev_defs
A cpp-config.el
A email-config.el # <-- this should be ignored
A gui-config.el # <-- this should be ignored
UU init.el
A keybindings.el
M lisp/skeletons.el
D lisp/text-mode-like-settings.el
UA org-mode-config.el # <-- this should be ignored
A text-mode-config.el
What am I doing wrong here? My git version is 1.7.7.6.
Thanks in advance,
Footnotes:
[1] There has been several successful merges since then.
--
Suvayu
Open source is the future. It sets us free.
next reply other threads:[~2012-03-10 23:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-10 23:47 suvayu ali [this message]
2012-03-11 8:57 ` Trouble with file specific merge strategies Junio C Hamano
2012-03-11 10:10 ` suvayu ali
2012-03-11 11:18 ` Junio C Hamano
2012-03-11 11:27 ` suvayu ali
2012-03-11 15:17 ` Thomas Hochstein
2012-03-11 18:01 ` suvayu ali
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='CAMXnza3SLHWLsFkYLhkJLAwtP2n=QVTXZ__GSL-CvajxC6i0Dw@mail.gmail.com' \
--to=fatkasuvayu+linux@gmail.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).