Re: Keeping reflogs on branch deletion

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jeff King <peff@...>
Cc: Brian Downing <bdowning@...>, Junio C Hamano <gitster@...>, David Symonds <dsymonds@...>, Bill Lear <rael@...>, Jay Soffian <jaysoffian@...>, Git Mailing List <git@...>
Date: Thursday, February 14, 2008 - 1:32 pm

On Thu, 14 Feb 2008, Jeff King wrote:


I typically have lots of branches.  Many of those are fairly dynamic -- 
they come and go.  Keeping reflogs for them would only clutter the 
reflog space, especially when the same names are reused.  I prefer to 
have a clean reflog for the currently alive branch of a given name 
rather than having a log of anything that occurred under that name.  And 
if I really want to find out about that old branch then there is always 
the HEAD reflog.


Sure, and that limitation is IMHO quite sane.  I don't think it is worth 
stretching it just for the convenience of having refs for deleted 
branches elsewhere than from the HEAD reflog.


And if you delete it then you can retrieve it again from its origin.  
If, on the other hand, you _checkout_ that branch (it now entered the 
HEAD reflog), and _commit_ to it (which commit would be unreachable 
from other sources) then _that_ is a ref worth keeping a log of.


Sure.  And what information would become unreachable if you delete 'foo' 
at that point?  The 'bar' commit is not lost, and likely to still exist 
in some other reflog.


This is trivial.

$ git log -g HEAD | grep -C2 "^Reflog.*moving from branch to"

If the first hit is HEAD@{x} then your branch@{0} is just HEAD@{x+1}.


The naming of deleted reflogs when new branches with same name are 
created, or the concatenation of entries for unrelated branches that 
might happen to have existed under the same name.

And because the relevant entries are already in the HEAD reflog anyway, 
and trivially retrieved as demonstrated above, I don't think it is worth 
adding any additional complexity for what is only a convenience feature 
that is not supposed to be used many times a day after all.


Nicolas
-
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:
A couple branch questions, Jay Soffian, (Wed Feb 13, 9:39 pm)
Re: A couple branch questions, David Symonds, (Wed Feb 13, 9:45 pm)
Re: A couple branch questions, Bill Lear, (Wed Feb 13, 10:24 pm)
Re: A couple branch questions, David Symonds, (Wed Feb 13, 11:03 pm)
Re: A couple branch questions, Junio C Hamano, (Wed Feb 13, 11:43 pm)
Keeping reflogs on branch deletion, Brian Downing, (Thu Feb 14, 10:01 am)
Re: Keeping reflogs on branch deletion, Jakub Narebski, (Thu Feb 14, 12:35 pm)
Re: Keeping reflogs on branch deletion, Nicolas Pitre, (Thu Feb 14, 11:00 am)
Re: Keeping reflogs on branch deletion, Jeff King, (Thu Feb 14, 11:17 am)
Re: Keeping reflogs on branch deletion, Nicolas Pitre, (Thu Feb 14, 12:16 pm)
Re: Keeping reflogs on branch deletion, Jeff King, (Thu Feb 14, 12:31 pm)
Re: Keeping reflogs on branch deletion, Nicolas Pitre, (Thu Feb 14, 1:32 pm)
Re: Keeping reflogs on branch deletion, Jeff King, (Thu Feb 14, 1:57 pm)
Re: Keeping reflogs on branch deletion, Wincent Colaiuta, (Thu Feb 14, 4:17 pm)
Re: Keeping reflogs on branch deletion, Johannes Schindelin, (Thu Feb 14, 11:08 am)