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

Re: ephemeral-branches instead of detached-head?

From
Duy Nguyen <pclouds@gmail.com>
Date
Aug 13, 2013, 15:13 UTC
Message-ID
<CACsJy8B7PrOr8YX0d05dw75tfCVNWEJ-YPDe414yTzgQe2Ea=w@mail.gmail.com>
In-Reply-To
<CA+CP9O5Ak3YD60--Mj+eLv3qzbZuuwTN-AxY3xb=SciKD=uZoQ@mail.gmail.com>
On Tue, Aug 13, 2013 at 9:44 PM, David Jeske <davidj@gmail.com> wrote:
Show 12 quoted lines
> On Aug 12, 2013 11:06 PM, "Duy Nguyen" <pclouds@gmail.com> wrote:
>>
>> On Mon, Aug 12, 2013 at 3:37 PM, David Jeske <davidj@gmail.com> wrote:
>> > Is there currently any way to say "hey, git, show me what commits are
>> > dangling that might be lost in the reflog?"
>>
>> How do you define dangling commits?
>
> Any commit which I did not explicitly do something with. (Merge, rebase,
> amend, branch name, discard)
>
> Today every one of those actions is explicit except discard.

So basically everything that is (1) produced by "git commit", (2) not connected to any ref and (3) not an amend. I think (1) and (3) can be achieved with "git log -g --grep-reflog commit: HEAD". We only need to filter out ones that are connected to some ref. Not sure if that can be done with script though. Maybe add "--dangling" to "git log -g" to do such filtering?

-- 
Duy
Previous: Andres PereraNext: David Jeske
Message 21 of 24 in “ephemeral-branches instead of detached-head?”
  1. David JeskeAug 12, 2013
  2. Jonathan NiederAug 12, 2013
  3. Junio C HamanoAug 12, 2013
  4. David JeskeAug 12, 2013
  5. David JeskeAug 12, 2013
  6. Duy NguyenAug 12, 2013
  7. Andreas SchwabAug 12, 2013
  8. Junio C HamanoAug 12, 2013
  9. David JeskeAug 12, 2013
  10. David JeskeAug 12, 2013
  11. Junio C HamanoAug 12, 2013
  12. Duy NguyenAug 13, 2013
  13. Junio C HamanoAug 13, 2013
  14. Sitaram ChamartyAug 14, 2013
  15. Junio C HamanoAug 14, 2013
  16. Sitaram ChamartyAug 14, 2013
  17. Jeff KingAug 14, 2013
  18. Andres PereraAug 14, 2013
  19. Sitaram ChamartyAug 14, 2013
  20. Andres PereraAug 14, 2013
  21. Duy NguyenAug 13, 2013
  22. Fwd: ephemeral-branches instead of detached-head?David Jeske, Aug 13, 2013
  23. Junio C HamanoAug 13, 2013
  24. Junio C HamanoAug 13, 2013

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.