git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: StGIT discards local commits on "stg pull"

From
Yann Dirson <ydirson@altern.org>
Date
Feb 19, 2007, 23:44 UTC
Message-ID
<20070219234425.GJ4248@nan92-1-81-57-214-146.fbx.proxad.net>
In-Reply-To
<b0943d9e0702191507m636348e7yab2a712925f9f55@mail.gmail.com>
On Mon, Feb 19, 2007 at 11:07:09PM +0000, Catalin Marinas wrote:
Show 8 quoted lines
> >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.

Right - a better solution is highlighted in today's proposal (which I have started to implement).

Show 6 quoted lines
> 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.

We could do this, but I only see this as a temporary measure to avoid unleashing the new behaviour onto unsuspicious users before we've ironed out the final behaviour. I still think that the current behaviour belongs to a very specific workflow which is not that expected by most users.

> Ideally, we'll have this configurable per-branch (and could
> leave the global one as well if the most specific is not available,
Right.
Show 5 quoted lines
> 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).

Since it is important that users don't unknowingly loose commits, yes it is preferable to release 0.12.1 with the old behaviour. Let's take the time to shake things more for 0.13, and we can reconsider this choice by then.

Best regards,
-- 
Yann.
Previous: Yann DirsonNext: Pavel Roskin
Message 9 of 12 in “StGIT discards local commits on "stg pull"”
  1. Pavel RoskinFeb 12, 2007
  2. Catalin MarinasFeb 12, 2007
  3. Yann DirsonFeb 12, 2007
  4. Yann DirsonFeb 12, 2007
  5. Catalin MarinasFeb 19, 2007
  6. Pavel RoskinFeb 19, 2007
  7. Yann DirsonFeb 20, 2007
  8. Yann DirsonFeb 20, 2007
  9. Yann DirsonFeb 19, 2007
  10. Pavel RoskinFeb 13, 2007
  11. Catalin MarinasFeb 13, 2007
  12. Yann DirsonFeb 19, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.