git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Catalin Marinas" <catalin.marinas@gmail.com>
To: "Karl Hasselström" <kha@treskal.com>
Cc: git@vger.kernel.org
Subject: Re: [StGit PATCH 03/14] Write to a stack log when stack is modified
Date: Sat, 12 Jul 2008 11:09:18 +0100	[thread overview]
Message-ID: <b0943d9e0807120309jb01aa09se5749a19bc526240@mail.gmail.com> (raw)
In-Reply-To: <20080623123631.GA18347@diana.vm.bytemark.co.uk>

2008/6/23 Karl Hasselström <kha@treskal.com>:
> On 2008-06-20 10:14:29 +0100, Catalin Marinas wrote:
>
>> 2008/6/19 Karl Hasselström <kha@treskal.com>:
>> > I'd actually say the opposite: until we have a good visualizer
>> > that doesn't need the simplified log, we need to have the
>> > simplified log. If I actually have to look at the diffs in the
>> > log, I find gitk indispensible.
>>
>> And what would the simplified log contain if we decide to go with a
>> new scheme? In your proposal, it points to the tree of main log and
>> you get the diff of diffs (which also means that the diffs must be
>> generated for every modification of a patch). Would this be the
>> same? Again, I worry a bit about the overhead to generate the patch
>> diff for every push (with refresh I'm OK). It can be optimised as in
>> the stable branch where we try git-apply followed by a three-way
>> merge (which, BTW, I'd like added before 0.15). If git-apply
>> succeeds, there is no need to re-generate the diff.
>
> Yes, I was imagining a simplified log precisely like the one I've
> currently implemented (a tree with one blob per patch, which contains
> the message, the diff, and some other odds and ends such as the
> author).

At a first look, I'm OK with a simplified log.

> Two optimizations would hopefully make it fast:
>
>  1. If the patch's sha1 hasn't changed, we don't have to regenerate
>     the diff.
>
>  2. If the patch's sha1 has changed, but git apply was sufficient
>     during the merge stage, we can just reuse that patch. We do have
>     to write it to a blob, but we have already generated the diff and
>     don't need to do so again. (I've shamelessly stolen your idea
>     here.)

It can be optimised a bit more to actually apply the diff in the blob
directly rather than the current way of generating the diff (since we
don't store the diff).

> In most cases, (1) would make sure that only a small handful of
> patches would need to be considered. In the cases where a lot of
> patches are touched, such as rebase, (2) would provide a good speedup
> (except for the cases where we had to call merge-recursive, and those
> are slow anyway).

I think it should work. Rebase is indeed my worry but it might be even
faster for most of the patches to apply the blob than computing the
diff. In my experience with the Linux kernel, full merge is rarely
needed.

-- 
Catalin

  reply	other threads:[~2008-07-12 10:10 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-12  5:34 [StGit PATCH 00/14] Undo series Karl Hasselström
2008-06-12  5:34 ` [StGit PATCH 01/14] Fix typo Karl Hasselström
2008-06-12  5:34 ` [StGit PATCH 02/14] Library functions for tree and blob manipulation Karl Hasselström
2008-06-12  5:34 ` [StGit PATCH 03/14] Write to a stack log when stack is modified Karl Hasselström
2008-06-17 10:24   ` Catalin Marinas
2008-06-17 12:31     ` Karl Hasselström
2008-06-17 12:55       ` Karl Hasselström
2008-06-17 14:11       ` Catalin Marinas
2008-06-17 15:32         ` Karl Hasselström
2008-06-18 13:03           ` Catalin Marinas
2008-06-18 14:36             ` Karl Hasselström
2008-06-18 16:16               ` Catalin Marinas
2008-06-18 17:32                 ` Karl Hasselström
2008-06-19  9:24                   ` Catalin Marinas
2008-06-19 10:07                     ` Karl Hasselström
2008-06-20  9:14                       ` Catalin Marinas
2008-06-23 12:36                         ` Karl Hasselström
2008-07-12 10:09                           ` Catalin Marinas [this message]
2008-07-14  6:32                             ` Karl Hasselström
2008-07-01 20:13           ` Karl Hasselström
2008-07-03 22:05             ` Catalin Marinas
2008-06-12  5:34 ` [StGit PATCH 04/14] Add utility function for reordering patches Karl Hasselström
2008-06-12  5:34 ` [StGit PATCH 05/14] New command: stg reset Karl Hasselström
2008-06-12  5:34 ` [StGit PATCH 06/14] Log conflicts separately Karl Hasselström
2008-06-12  5:34 ` [StGit PATCH 07/14] Log conflicts separately for all commands Karl Hasselström
2008-06-12  5:34 ` [StGit PATCH 08/14] Add a --hard flag to stg reset Karl Hasselström
2008-06-12  5:35 ` [StGit PATCH 09/14] Don't write a log entry if there were no changes Karl Hasselström
2008-06-12  5:35 ` [StGit PATCH 10/14] Move stack reset function to a shared location Karl Hasselström
2008-06-12  5:35 ` [StGit PATCH 11/14] New command: stg undo Karl Hasselström
2008-06-12  5:35 ` [StGit PATCH 12/14] New command: stg redo Karl Hasselström
2008-06-12  5:35 ` [StGit PATCH 13/14] Log and undo external modifications Karl Hasselström
2008-06-12  5:35 ` [StGit PATCH 14/14] Make "stg log" show stack log instead of patch log Karl Hasselström

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=b0943d9e0807120309jb01aa09se5749a19bc526240@mail.gmail.com \
    --to=catalin.marinas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=kha@treskal.com \
    /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).