From: "nathan bullock" <nathanbullock@gmail.com>
To: git@vger.kernel.org
Subject: Splitting code between files and then merging
Date: Mon, 14 Apr 2008 19:22:34 -0600 [thread overview]
Message-ID: <916b88c10804141822m45588ae9x7492867b749cc53c@mail.gmail.com> (raw)
I have been playing around with various merge situations and things
don't seem to be working quite as I expected.
If I have a repository with a file such as:
### file abc ###
void
foo(){
int x;
func(x);
}
void
moo(){
int y;
func(y);
}
And then clone that repo and in my clone I edit things so that I have two files:
### file abc ###
void
foo(){
int x;
func(x);
}
### file bcd ###
void
moo(){
int y;
func(y);
}
I commit this.
Then I do a git blame -C -C6 bcd
(If I make these functions larger I can get away with just a single -C)
It seems to be able to determine that all of the lines in both files
originated from the file abc.
Now the problem is that if I make a change to the function moo in the
file abc in the original repo and the try to pull it into the second
repo I always get merge conflicts. Is this expected? Do any of the
various merge algorithms in git handle these situations?
Nathan Bullock
reply other threads:[~2008-04-15 1:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=916b88c10804141822m45588ae9x7492867b749cc53c@mail.gmail.com \
--to=nathanbullock@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).