Re: Why does git merge have so much trouble with Fedora package branches?

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

 



On Wed, 2011-11-09 at 17:46 -0800, Adam Williamson wrote:
> I'm currently going through and bumping several packages whose Rawhide
> builds have got behind their F16 builds.
> 
> I've come across several packages where git merge hit 'conflicts' for no
> readily apparently reason in this case.

I haven't looked deeply enough to tell, but in general merges are a very
bad tool and should be avoid IMHO.

It would be much more sane to git cherry-pick the changes you need and
keep the branches separate and have their own history.
Merges makes it really painful to follow history later.

My 2c.


> Take the current state of gnome-power-manager. Master is at:
> 
> commit dfd0f074a7d41d355da28180eae1bda5dc2bba66
> Author: Richard Hughes <richard@xxxxxxxxxxx>
> Date:   Mon Sep 26 16:58:28 2011 +0100
> 
>     New upstream version.
> 
> f16 is at:
> 
> commit b0b31219d2cfdffa815659a8aad78509b65c412a
> Author: Richard Hughes <richard@xxxxxxxxxxx>
> Date:   Mon Oct 17 11:34:50 2011 +0100
> 
>     New upstream version.
> 
> which is just a single commit ahead of the master branch. The git diff
> is incredibly trivial:
> 
> [adamw@adam gnome-power-manager (f16)]$ git diff dfd0f074a7d41d355da28180eae1bda5dc2bba66
> diff --git a/.gitignore b/.gitignore
> index 7cf4a61..b9cba18 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -15,3 +15,4 @@ gnome-power-manager-2.31.4.tar.bz2
>  /gnome-power-manager-3.1.90.tar.xz
>  /gnome-power-manager-3.1.92.tar.xz
>  /gnome-power-manager-3.2.0.tar.xz
> +/gnome-power-manager-3.2.1.tar.xz
> diff --git a/gnome-power-manager.spec b/gnome-power-manager.spec
> index cba83e2..e5a512f 100644
> --- a/gnome-power-manager.spec
> +++ b/gnome-power-manager.spec
> @@ -1,6 +1,6 @@
>  Summary: GNOME power management service
>  Name: gnome-power-manager
> -Version: 3.2.0
> +Version: 3.2.1
>  Release: 1%{?dist}
>  License: GPLv2+ and GFDL
>  Group: Applications/System
> @@ -75,6 +75,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null
>  %{_mandir}/man1/*.1.gz
>  
>  %changelog
> +* Mon Oct 17 2011 Richard Hughes <rhughes@xxxxxxxxxx> - 3.2.1-1
> +- New upstream version.
> +
>  * Mon Sep 26 2011 Richard Hughes <rhughes@xxxxxxxxxx> - 3.2.0-1
>  - New upstream version.
>  
> diff --git a/sources b/sources
> index 81e4f0f..2d18e7f 100644
> --- a/sources
> +++ b/sources
> @@ -1 +1 @@
> -4dafea2ae923599685f91de033f23888  gnome-power-manager-3.2.0.tar.xz
> +8e8a3759e0805041342c1f49471ee4ed  gnome-power-manager-3.2.1.tar.xz
> 
> 
> But if you try and do a merge:
> 
> [adamw@adam gnome-power-manager (master)]$ git merge --no-ff b0b31219d2cfdffa815659a8aad78509b65c412a
> Auto-merging sources
> CONFLICT (content): Merge conflict in sources
> Auto-merging gnome-power-manager.spec
> CONFLICT (content): Merge conflict in gnome-power-manager.spec
> Auto-merging .gitignore
> CONFLICT (content): Merge conflict in .gitignore
> Automatic merge failed; fix conflicts and then commit the result.
> 
> why the conflict? Why can it not merge this incredibly simple version
> bump? I guess I'm just missing something about how git works, but I
> can't really see why this causes a problem.
> 
> It's rather infuriating to have to go in and 'fix' a bunch of
> 'conflicts' which are not conflicts at all, but just the changes you
> wanted to merge with a bunch of silly >>>> and <<<< around them.
> -- 
> Adam Williamson
> Fedora QA Community Monkey
> IRC: adamw | Twitter: AdamW_Fedora | identi.ca: adamwfedora
> http://www.happyassassin.net
> 
> -- 
> devel mailing list
> devel@xxxxxxxxxxxxxxxxxxxxxxx
> https://admin.fedoraproject.org/mailman/listinfo/devel

-- 
Simo Sorce * Red Hat, Inc * New York

-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux