git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: git@vger.kernel.org
Subject: Re: [ANNOUNCE] pg - A patch porcelain for GIT
Date: Mon, 13 Feb 2006 14:40:27 +0000	[thread overview]
Message-ID: <tnxy80fe2zo.fsf@arm.com> (raw)
In-Reply-To: <20060210195914.GA1350@spearce.org> (Shawn Pearce's message of "Fri, 10 Feb 2006 14:59:14 -0500")

Shawn Pearce <spearce@spearce.org> wrote:
> I just posted the first public version of pg, a GIT porcelain for
> managing patches.  Think StGIT, but better in some ways:

Couldn't help replying to such a topic :-) (only that the ":" ending
of the above phrase might make people think that some features you
listed are not available in StGIT).

Without much testing, I think pg is a good tool but it is different
from StGIT in many ways. It mainly resembles the topic branches way of
working with the advantage of having them stacked on each-other. Each
patch seems to be equivalent to a topic branch where you can commit
changes. Rebasing a patch is equivalent to a merge in a branch with
the merge commit having a general description like "Refreshed patch
..." and two parents - the new base and the old top.

While I don't say the above is a bad thing, it is pretty different
from StGIT. With StGIT, the history of the tree only shows one commit
per patch with the patch description chosen by the user. If you edit
the description or modify the patch, the old patch or description is
dropped from the main branch (visible via HEAD) and you only get the
latest one. This clean history has many advantages when sending
patches upstream either via e-mail or by asking for a pull.

> - Simplified command line user interface.
>
>     pg tries to simplify GIT by 'hiding' the index and behaving like
>     more traditional SCMs which only look at `HEAD` (last commit)
>     and the working directory (files).

This is the case with StGIT as well. It doesn't usually require the
use of GIT commands directly.

> - Preserves change history of patches.
>
>     The complete change history associated with each patch is
>     maintained directly within GIT.  By storing the evolution of a
>     patch as a sequence of GIT commits standard GIT history tools
>     such as gitk can be used.

There have been discussions to adding this to StGIT as well (and there
is a patch already from Chuck). It is a good thing to have but I'm
opposed to the idea of having the history accessible from the top of
the patch. Since the patch can be refreshed indefinitely, it would
make the main history (visible from HEAD) really ugly and also cause
problems with people pulling from a tree. I prefer to have a separate
command (like 'stg id patch/log') that gives access to the history.

> - Its prune proof.
>
>     The metadata structure is stored entirely within the refs
>     directory and the object database, which means you can safely use
>     git-prune without damaging your work, even for unapplied
>     patches.

That's missing indeed in StGIT but it will be available in the next
release. I didn't push this yet because I wasn't sure what to do with
the refresh history of a patch.

> - Automatic detection (and cancellation) of returning patches.
>
>     pg automatically detects when a patch is received from
>     the upstream GIT repository during a pg-rebase and deletes
>     (cancels) the local version of the patch from the patch series.
>     The automatic cancelling makes it easy to use pg to track and
>     develop changes on top of a GIT project.

StGIT has been doing this from the beginning. You would need to run a
'stg clean' after a rebase (or push). I prefer to run this command
manually so that 'stg series -e' would show the empty patches and let
me decided what to do with them.

> - Fast
>
>     pg operations generally perform faster than StGIT operations,
>     at least on my large (~7000 file) repositories.

Might be possible but I haven't done any tests. There are some
optimisations in StGIT that make it pretty fast: (1) if the base of
the patch has not changed, it can fast-forward the pushed patches
which is O(1) and (2) StGIT first tries to use git-apply when pushing
a patch and use a three-way merge only if this fails (the operation
usually succeeds for most of the patches). There are some speed
problems with three-way merging if there are many file
removals/additions because the external merge tool is called for each
of them but the same problem exists for any other tool.

-- 
Catalin

  parent reply	other threads:[~2006-02-13 14:40 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-10 19:59 [ANNOUNCE] pg - A patch porcelain for GIT Shawn Pearce
2006-02-10 20:41 ` Greg KH
2006-02-10 21:04   ` Shawn Pearce
2006-02-10 23:20     ` Greg KH
2006-02-10 21:17 ` Petr Baudis
2006-02-10 21:38   ` Shawn Pearce
2006-02-10 21:47     ` Petr Baudis
2006-02-10 22:07       ` Junio C Hamano
2006-02-13 21:00   ` Petr Baudis
2006-02-14  9:26     ` Catalin Marinas
2006-02-14 10:08       ` Karl Hasselström
2006-02-14 15:22         ` Chuck Lever
2006-02-14 16:07           ` Karl Hasselström
2006-02-14 20:58             ` Chuck Lever
2006-02-14 22:29               ` Petr Baudis
2006-02-15  0:22                 ` Sam Vilain
2006-02-15  0:35                   ` Shawn Pearce
2006-02-15  1:14                     ` Petr Baudis
2006-02-15  4:11                     ` J. Bruce Fields
2006-02-15  6:54                       ` Shawn Pearce
2006-02-15 19:45                         ` J. Bruce Fields
2006-02-16 10:24                         ` Junio C Hamano
2006-02-16 10:33                           ` Catalin Marinas
2006-02-16 10:42                             ` Fernando J. Pereda
2006-02-16 10:52                               ` Junio C Hamano
2006-02-16 11:10                                 ` Catalin Marinas
2006-02-15 17:25                 ` Catalin Marinas
2006-02-16  7:54                   ` Karl Hasselström
2006-02-17  4:27                   ` [PATCH 0/2] stg uncommit Karl  Hasselström
2006-02-17  4:31                     ` [PATCH 1/2] Update .git/refs/heads/base after patch deletion Karl  Hasselström
2006-02-17  4:31                     ` [PATCH 2/2] Add 'stg uncommit' command Karl  Hasselström
2006-02-19 10:51                       ` Catalin Marinas
2006-02-19 13:45                         ` Karl Hasselström
2006-02-19 14:47                           ` Karl Hasselström
2006-02-19 21:15                             ` Sam Vilain
2006-02-20 17:20                             ` Catalin Marinas
2006-02-20 17:30                               ` Karl Hasselström
2006-02-20 22:49                                 ` Catalin Marinas
2006-02-21  7:55                                   ` Karl Hasselström
2006-02-15 10:11               ` [ANNOUNCE] pg - A patch porcelain for GIT Karl Hasselström
2006-02-15 10:42                 ` Andreas Ericsson
2006-02-15 11:25                   ` Karl Hasselström
2006-02-15 11:27                     ` Karl Hasselström
2006-02-17 21:57     ` Catalin Marinas
2006-02-13  2:49 ` Sam Vilain
2006-02-13  3:29   ` Shawn Pearce
2006-02-13  4:40     ` Sam Vilain
2006-02-13  6:03       ` Shawn Pearce
2006-02-13 14:40 ` Catalin Marinas [this message]
2006-02-14  4:56   ` Shawn Pearce
2006-02-14  6:14     ` Shawn Pearce
2006-02-15 17:20       ` Catalin Marinas
2006-02-15 17:12     ` Catalin Marinas
2006-02-15 17:55       ` Shawn Pearce

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tnxy80fe2zo.fsf@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=catalin.marinas@gmail.com \
    --cc=git@vger.kernel.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).