From: "Catalin Marinas" <catalin.marinas@gmail.com>
To: "Yann Dirson" <ydirson@altern.org>
Cc: "Pavel Roskin" <proski@gnu.org>, git@vger.kernel.org
Subject: Re: StGIT discards local commits on "stg pull"
Date: Mon, 19 Feb 2007 23:07:09 +0000 [thread overview]
Message-ID: <b0943d9e0702191507m636348e7yab2a712925f9f55@mail.gmail.com> (raw)
In-Reply-To: <20070212214704.GS5362@nan92-1-81-57-214-146.fbx.proxad.net>
On 12/02/07, Yann Dirson <ydirson@altern.org> wrote:
> On Mon, Feb 12, 2007 at 09:26:34PM +0100, Yann Dirson wrote:
> > No, I agree it's a bug. Rebasing after a fetch should allow this
> > workflow to work as well. If the parent branch is not a rewinding
> > one, we should ensure there is nothing lost. And even for rewinding
> > branches, we should probably keep track of the existence of commits,
> > so we can warn and nothing gets lost without knowing.
>
> Thinking about it, detecting whether we're going to lose a commit is
> just checking *before pulling* whether the current base is reachable
> from the parent's current head.
There is a potential problem with this approach - pulling/fetching
from a tree which is always rebased (either managed with StGIT or
simply running git-rebase before publishing it) would report an error
since the old base is no longer reachable from the current head. In
this case, the current fetch+rebase behaviour would be desirable.
I think the fail-safe solution would be to leave the old behaviour
(i.e. git-pull and pull-does-rebase=no) and people that need to pull
from branches like that described above would use the fetch+rebase
approach. Ideally, we'll have this configurable per-branch (and could
leave the global one as well if the most specific is not available,
but should default to git-pull).
Let me know what you think so that I'll try to release a 0.12.1 update
(I already have the simple patch for using git-pull by default if you
are OK with this scenario).
Thanks.
--
Catalin
next prev parent reply other threads:[~2007-02-19 23:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-12 7:26 StGIT discards local commits on "stg pull" Pavel Roskin
2007-02-12 9:31 ` Catalin Marinas
2007-02-12 20:26 ` Yann Dirson
2007-02-12 21:47 ` Yann Dirson
2007-02-19 23:07 ` Catalin Marinas [this message]
2007-02-19 23:28 ` Pavel Roskin
2007-02-20 0:00 ` Yann Dirson
2007-02-20 18:55 ` Yann Dirson
2007-02-19 23:44 ` Yann Dirson
2007-02-13 0:20 ` Pavel Roskin
2007-02-13 22:48 ` Catalin Marinas
2007-02-19 20:47 ` Yann Dirson
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=b0943d9e0702191507m636348e7yab2a712925f9f55@mail.gmail.com \
--to=catalin.marinas@gmail.com \
--cc=git@vger.kernel.org \
--cc=proski@gnu.org \
--cc=ydirson@altern.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).