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

Re: [PATCH 2/2] git reflog expire

From
Junio C Hamano <junkio@cox.net>
Date
Dec 19, 2006, 11:08 UTC
Message-ID
<7vmz5kqh2h.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20061219104032.GB21324@spearce.org>
Shawn Pearce <spearce@spearce.org> writes:
Show 8 quoted lines
>> The best I came up with is still my "show-branch --reflog" so
>> far.  You really need to show not just the commit title but how
>> they topologically relate to the commits on the surviving
>> branch, and I think having something graphical or semi-graphical
>> is a must.
>
> Probably right.  But I can't make heads or tails out of that
> output for just one topic branch...
Here is what my private 'pu' look like:
! [pu@{0}] Merge branch 'jc/fsck-reflog' into pu
 ! [pu@{1}] Merge branch 'jc/pickaxe' into pu
  ! [pu@{2}] Merge branches 'jn/web', 'jc/explain', 'jc/web' and
   ! [pu@{3}] Merge branch 'jc/leftright' into next
    ! [pu@{4}] Merge branch 'jc/fsck-reflog' into pu
     ! [pu@{5}] Merge branch 'jc/pickaxe' into pu
      ! [pu@{6}] Merge branches 'jc/fsck-reflog', 'jc/clone', 'j
       ! [pu@{7}] Merge branch 'jc/blame' into next
--------
-        [pu@{0}] Merge branch 'jc/fsck-reflog' into pu
+        [pu@{0}^2] git reflog expire
+        [pu@{0}^2^] Move in_merge_bases() to commit.c
+        [pu@{0}^2~2] reflog: fix warning message.
--       [pu@{1}] Merge branch 'jc/pickaxe' into pu
---      [pu@{2}] Merge branches 'jn/web', 'jc/explain', 'jc/web
----     [pu@{3}] Merge branch 'jc/leftright' into next
++++     [pu@{3}^2] Revert "Make left-right automatic."
      ...
++++     [pu@{3}~2^2~3^2^] Revert "fix testsuite: make sure they
    -    [pu@{4}] Merge branch 'jc/fsck-reflog' into pu
+   +    [pu@{0}^2~3] Teach git-repack to preserve objects refer
    --   [pu@{5}] Merge branch 'jc/pickaxe' into pu
    ---  [pu@{6}] Merge branches 'jc/fsck-reflog', 'jc/clone', '
+++ +++  [pu@{2}^5] para-walk: walk n trees, index and working t
      ...
+   +++  [pu@{0}^2~5] add for_each_reflog_ent() iterator
-------- [pu@{7}] Merge branch 'jc/blame' into next

What matters most is the leftmost column. Most of the time when you are looking at reflog, you are looking for what's rewound and lost. Stretches of lines with symbols (e.g. pu@{3}^2 to pu@{3}~2^2~3^2^, and pu@{0}^2 to pu@{0}^2~2) are not so interesting [*1*].

The entry whose column have whitespace there are the lost ones (rewound or amended). pu@{4} used to be the tip of 'pu', but after I whipped 'next' into a reasonable shape, I did "git branch -f pu next" to bundle the tips of topics that are not ready for 'next' into it (and all the rest pu@{3}, pu@{2}, pu@{1} and pu@{0} are sequence of merges into 'pu').

[Footnote]

*1* We might want to add an output filter that lets the command omit such lines with the same set of reachable tips when showing the reflog entries.

Previous: Shawn Pearce
Message 28 of 28 in “What's cooking in git.git (topics)”
  1. Junio C HamanoDec 16, 2006
  2. Jakub NarebskiDec 16, 2006
  3. Junio C HamanoDec 17, 2006
  4. Yann DirsonDec 17, 2006
  5. Josef WeidendorferDec 17, 2006
  6. Brian GernhardtDec 17, 2006
  7. Shawn PearceDec 17, 2006
  8. revision: introduce ref@{N..M} syntax.Junio C Hamano, Dec 17, 2006
  9. Linus TorvaldsDec 17, 2006
  10. Junio C HamanoDec 17, 2006
  11. Andy ParkinsDec 17, 2006
  12. Junio C HamanoDec 18, 2006
  13. Andy ParkinsDec 18, 2006
  14. Shawn PearceDec 18, 2006
  15. 1/2 add for_each_reflog_ent() iteratorJunio C Hamano, Dec 18, 2006
  16. 2/2 Protect commits recorded in reflog from pruning.Junio C Hamano, Dec 18, 2006
  17. Shawn PearceDec 18, 2006
  18. Junio C HamanoDec 19, 2006
  19. 1/2 Move in_merge_bases() to commit.cJunio C Hamano, Dec 19, 2006
  20. 2/2 git reflog expireJunio C Hamano, Dec 19, 2006
  21. Shawn PearceDec 19, 2006
  22. Junio C HamanoDec 19, 2006
  23. Shawn PearceDec 19, 2006
  24. Linus TorvaldsDec 19, 2006
  25. Junio C HamanoDec 20, 2006
  26. Linus TorvaldsDec 20, 2006
  27. Shawn PearceDec 19, 2006
  28. Junio C HamanoDec 19, 2006

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.