Re: [StGit PATCH 03/14] Write to a stack log when stack is modified

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Catalin Marinas
Date: Thursday, June 19, 2008 - 2:24 am

2008/6/18 Karl Hasselström <kha@treskal.com>:

It would make collaboration using stgit stacks easier. I can start
looking at this once we agree on the log structure.


In the past, I ran some tests because people complained that stgit was
slow compared to quilt:

http://article.gmane.org/gmane.comp.version-control.git/9670

After profiling (the stg-prof file), as expected, most of the time was
spent in external Git calls which I tried to keep to a minimum. With
your approach, you probably add at least 4-5 calls to Git (just a
guess, I haven't counted) and, with a big repository, it will be
visible (I have about 15 branches on my Linux kernel clone going back
to the 2.6.12 kernel and the .git size is over 1/2GB after git-gc).


Ah, OK. So, at least initially, we should only support the full log pruning.


For the first log only, we could chain the unapplied patches using
commits with 2 parents. We just need to warn people not to stare at
the <branch>.stgit directly :-)


Yes, but just chain unapplied commits rather than using octopus (you
could try to the -mm series with 500+ patches and see what happens).


Yes, but you still have to refer the tree objects corresponding to a
patch and extra work to generate the simplified log.


Yes.


We don't even need to differentiate between applied and unapplied in
the commit message as long as they are listed in order since one of
the parents would represent the boundary between them. Since lib.stack
is pretty well structured, we could later modify PatchOrder to use the
log.


As you pointed below, "branch head" should probably be the "stack
top". We don't need to track the "branch head" if different, just need
to fix up the error and add the patches to the stack. And, anyway, if
one modifies the HEAD using git directly, the log will still point to
the top of the stack.

The third head would only be needed for the first log entry or when we
use pick --unapplied (in the latter, it only points to the unapplied
commit). The third head shouldn't be used at all in the log, just
created when needed.


See above, branch head would actually be the stack top.


OK with the version number but the branch head (or stack top) is one
of the parents already.


I agree it will look ugly but the simplified log adds an extra
overhead on any stgit action. If we don't use stg log -g, a text only
log command could show the diff. We can add it afterwards though if it
is fast enough.

-- 
Catalin
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[StGit PATCH 00/14] Undo series, Karl , (Wed Jun 11, 10:34 pm)
[StGit PATCH 01/14] Fix typo, Karl , (Wed Jun 11, 10:34 pm)
[StGit PATCH 05/14] New command: stg reset, Karl , (Wed Jun 11, 10:34 pm)
[StGit PATCH 06/14] Log conflicts separately, Karl , (Wed Jun 11, 10:34 pm)
[StGit PATCH 11/14] New command: stg undo, Karl , (Wed Jun 11, 10:35 pm)
[StGit PATCH 12/14] New command: stg redo, Karl , (Wed Jun 11, 10:35 pm)
Re: [StGit PATCH 03/14] Write to a stack log when stack is ..., Catalin Marinas, (Thu Jun 19, 2:24 am)