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

Re: [StGIT PATCH] Don't use patches/<branch>/current

From
Karl Hasselström <kha@treskal.com>
Date
May 18, 2007, 06:30 UTC
Message-ID
<20070518063015.GA13516@diana.vm.bytemark.co.uk>
In-Reply-To
<b0943d9e0705171351j1a86a4f4ge0283c522a351645@mail.gmail.com>
On 2007-05-17 21:51:19 +0100, Catalin Marinas wrote:
Show 11 quoted lines
> On 17/05/07, Karl Hasselström <kha@treskal.com> wrote:
>
> > The only possibility I can think of that might explain this is
> > that some of your unapplied patches are attached to a place in the
> > commit DAG that's far away from the branch head (e.g. you have
> > rebased to some entirely different place since you last had them
> > applied), so that "git-rev-list patch ^branch" outputs a large
> > part of the commit DAG.
>
> That's probably the case. I have patches that I haven't rebased for
> months but I keep them in case they might be needed in the future.

That's probably it, then. I'll need to come up with a clever scheme to make that case cheap again.

> That's the reason for the hide/unhide commands.
Ah.
> Anyway, I'm not yet prepared to give up my current workflow.

I didn't intend to make that workflow painful, so don't despair yet -- there might be a way to make it work.

> I haven't tried to understand your patch yet but the unapplied
> patches will never be in a linear DAG similar to the applied
> patches.
I know.
> Because of this, we need to keep their order in a file anyway and we
> might not need to run git-rev-list (BTW, how do you preserve the
> unapplied patches order with the DAG implementation?).

The order of _all_ patches is kept in the "patchorder" file. This file is consulted only when the relative order of two unapplied patches need to be established. (Applied patches are sorted by the DAG, and applied patches always precede unapplied patches.)

I would like to avoid keeping a record of known-to-be-unapplied patches; while this is nowhere near as important as not keeping a record of applied patches, it would still provide an opening for the user to confuse StGIT.

But I believe I have a cunning plan ...
Show 8 quoted lines
> > Could you put counters in unapplied_patches() and
> > sort_applied_patches() to see how many lines each of them reads
> > from git-rev-list? The expected number (if it had taken just a
> > little time, like it did for me) is a small constant times the
> > number of patches in both cases.
>
> I'll do this tomorrow to confirm but that's probably the cause of
> the slow-down.
Thanks for hanging in there.
-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Previous: Catalin MarinasNext: Karl Hasselström
Message 15 of 36 in “Don't use patches/<branch>/current”
  1. Don't use patches/<branch>/currentKarl Hasselström, May 6, 2007
  2. Catalin MarinasMay 15, 2007
  3. Peter OberndorferMay 15, 2007
  4. Catalin MarinasMay 15, 2007
  5. Karl HasselströmMay 15, 2007
  6. Remove obsolete files when deleting a branchKarl Hasselström, May 15, 2007
  7. Catalin MarinasMay 15, 2007
  8. Karl HasselströmMay 16, 2007
  9. Catalin MarinasMay 16, 2007
  10. Karl HasselströmMay 16, 2007
  11. Karl HasselströmMay 16, 2007
  12. Catalin MarinasMay 17, 2007
  13. Karl HasselströmMay 17, 2007
  14. Catalin MarinasMay 17, 2007
  15. Karl HasselströmMay 18, 2007
  16. 0/6 New and improved DAG appliedness seriesKarl Hasselström, Jun 10, 2007
  17. 1/6 Verify patch status during the testKarl Hasselström, Jun 10, 2007
  18. 2/6 Make use of the get_patch() utility functionKarl Hasselström, Jun 10, 2007
  19. 3/6 Compute patch appliedness from commit DAGKarl Hasselström, Jun 10, 2007
  20. 4/6 Test the new DAG appliedness machineryKarl Hasselström, Jun 10, 2007
  21. 5/6 Fix bash completion after the DAG appliedness patchKarl Hasselström, Jun 10, 2007
  22. 6/6 Speed up the appliedness testKarl Hasselström, Jun 10, 2007
  23. Yann DirsonJun 30, 2007
  24. Karl HasselströmJul 1, 2007
  25. Yann DirsonMay 15, 2007
  26. Catalin MarinasMay 15, 2007
  27. Yann DirsonMay 15, 2007
  28. Karl HasselströmMay 16, 2007
  29. 0/5 Metadata format versioningKarl Hasselström, May 19, 2007
  30. 1/5 Fix config caching so that get, set, get worksKarl Hasselström, May 19, 2007
  31. 2/5 Have only a single command in each test_expect_failureKarl Hasselström, May 19, 2007
  32. 3/5 Upgrade old StGIT branches to new-format metadataKarl Hasselström, May 19, 2007
  33. 4/5 Test the format version upgrade codeKarl Hasselström, May 19, 2007
  34. 5/5 Add --binary flag to commands that generate diffsKarl Hasselström, May 19, 2007
  35. Catalin MarinasMay 22, 2007
  36. Karl HasselströmMay 22, 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.