[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#662632: RFS: libaio-ocaml/1.0~rc1



* Goswin von Brederlow <goswin-v-b@web.de> [120311 08:10]:
> I tried creating the upstream branch from the master branch and then
> removing the debian dir. But then on the next merge git complains about a
> merge conflict (modify/delete) when any file in debian/ was changed.

git is directed in that regard, if a child node has something different
from the parent node this is supposed to be a willful change that is
supposed to be preserved.

> I googled a bit but couldn't find any hint on how to tell git to always
> (and only) ignore changes to the debian dir on merge. Any ideas?

There is no explicit option, but that is doable by using some git
primitives. (The core of git-dpm is basically some special merge that
takes debian/ .git-* and file deletions from the debian branch and
everything else from the patched branch (based on the upstream branch))

> So I switched to the fallback option of using git-import-orig. But as
> you say then the upstream and master branch aren't based on each other.
> Since in my case all the history is in the master branch I then merged
> the master branch into the upstream branch using:
>
>     % git checkout upstream
>     % git merge -s ours master
>
> All the upstream changes are already there from git-import-orig so the
> "-s ours" only ignores the debian dir. I think that should give the
> right history for the upstream branch. At least it looks nearly right in
> qgit.

That would still make git think that your upstream branch is based on
your master branch and thus has the modification "remove debian/" in it
which git will want to merge with any debian changes in the upstream
branch once you merge the two.

If you want to have the debian branch containing the upstream branch
(and do not insist on the upstream branch having much history) it might
make more sense to merge the upstream branch in the debian branch.

(Even if you want the upstream branch to have the whole history and
create the upstream branch on top of the old debian branch, it would
make sense to merge that upstream branch into the debian branch again
once manually without deleting the debian/ dir so that future merges
no longer think debian/ should be removed).

	Bernhard R. Link


Reply to: