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

Re: What's cooking in git.git (Feb 2011, #06; Sun, 27)

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 2, 2011, 02:07 UTC
Message-ID
<7vlj0yff6m.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20110301205424.GA18793@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 14 quoted lines
> On Mon, Feb 28, 2011 at 08:52:08AM -0800, Junio C Hamano wrote:
>
>> I am not convinced that this patch nailed that balance at exactly the
>> right place, even though I think we are getting closer than before.  In
>> this sequence:
>> 
>>     $ git checkout somewhere^0
>>     $ git commit
>>     $ git reset --hard somewhere_else
>>     $ git commit
>>     $ git checkout master
>> ...
> I really wouldn't expect it to help here. The problem isn't that you're
> on a detached HEAD. It's that you're using "git reset" at all.

As you would realize later in your message, the "reset --hard" can instead be "checkout v1.7.3". And the bothersome thing is that there is no safety against that. We don't bother users while they are jumping around on detached HEAD, and it is not new; we don't say where the previous detached HEAD was.

Perhaps that needs to be changed to have the same safety? IOW, regardless of your "checkout" destination, whenever you leave a detached commit that would become unreachable, we should warn the same way?

I suspect I would loath it as being too loud; I dunno...
Previous: Jeff KingNext: Jeff King
Message 5 of 12 in “What's cooking in git.git (Feb 2011, #06; Sun, 27)”
  1. Junio C HamanoFeb 28, 2011
  2. Sverre RabbelierFeb 28, 2011
  3. Junio C HamanoFeb 28, 2011
  4. Jeff KingMar 1, 2011
  5. Junio C HamanoMar 2, 2011
  6. Jeff KingMar 2, 2011
  7. Junio C HamanoMar 2, 2011
  8. Piotr KrukowieckiMar 2, 2011
  9. Jakub NarebskiMar 2, 2011
  10. Ævar Arnfjörð BjarmasonMar 10, 2011
  11. Jakub NarebskiMar 10, 2011
  12. Jeff KingMar 2, 2011

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.