Re: fast-forward only policy



On Wed, May 6, 2009 at 1:34 AM, Shaun McCance <shaunm gnome org> wrote:
> On Wed, 2009-05-06 at 01:28 +0300, Felipe Contreras wrote:
>> On Wed, May 6, 2009 at 1:04 AM, Vincent Untz <vuntz gnome org> wrote:
>> > Le mercredi 06 mai 2009, à 01:01 +0300, Felipe Contreras a écrit :
>> >> You don't need a branch to make commits, tag them and push them.
>> >>
>> >> $ git checkout PANGO_1_2_4
>> >> # make changes
>> >> $ git commit -a
>> >> $ git tag PANGO_1_2_5
>> >> $ git push origin PANGO_1_2_5
>> >>
>> >> But if you feel icky about not working on a branch you can create a
>> >> local branch:
>> >>
>> >> $ git checkout -b work-for-1.2.5 PANGO_1_2_4
>> >> # make changes
>> >> $ git commit -a
>> >> $ git tag PANGO_1_2_5
>> >> $ git push origin PANGO_1_2_5
>> >> $ git branch -D work-for-1.2.5
>> >>
>> >> Both cases are exactly the same. You push a tag (reference) and all
>> >> the objects in the hierarchy of the head of that reference that is
>> >> still not on the remote repo.
>> >
>> > I might misunderstand things but... with those commands, aren't you
>> > releasing pango 1.2.5 after just one commit? This is not what we do. We
>> > might have a few commits, not on the same day. In this case I think
>> > we'll need a branch anyway, won't we?
>>
>> You can create as many commits as you want in any fashion you want.
>> What I tried to explain is that you can push a tag without pushing a
>> branch.
>
> It's not about pushing a tag without pushing a branch.
> It's about pushing a commit without pushing a branch.
> Which yes, is possible.  But absolutely useless.  When
> I make a release, the last thing I want to do is sift
> through all the commits looking for those I might want
> to merge into this release.

You cannot push commits, you can only push refs.

Anyhow, you need to push the tag any way, right? When you push the
tag, all the commits will be pushed. If you also push the branch then
you would simply create a reference in the remote repo pointing to a
commit that it's already there. If nobody is going to use that branch,
why push it? (note that this particular example is about an extremely
old release)

-- 
Felipe Contreras


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