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

Re: What's cooking in git.git (Jul 2017, #03; Mon, 10)

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 13, 2017, 19:39 UTC
Message-ID
<xmqq1spkw2ha.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<xmqqvamww3tc.fsf@gitster.mtv.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 16 quoted lines
> Jeff King <peff@peff.net> writes:
>
>> [1] Another sticking point is that this really does need to be in the
>>     reflog of the ref we are pushing (and not, e.g., HEAD). But one does
>>     not always push from a ref. I suspect that's OK in practice, though.
>>     If you are doing "git push --force-with-lease HEAD~2:master", it is
>>     probably OK for us to error out with "uh, lease from what?".
>
> I actually expect this to bite me personally, as I often do not
> rewind the actual "topic" ref that is my target of rewriting,
> because I am a chicken---I detach the HEAD and build a history there
> to see if I can come up with a better history, compare the result
> with what is on the "topic" (which is not touched at all during the
> rewriting), and after all is done, do a "checkout -B topic".  The
> "remote tip must appear in the local reflog" rule will never be
> satisfied.

Well "bite" is not quite accurate, as I do not push to a repository racing with others, and there is no reason for me to use --force with lease. I always push '+pu', and push '+next" once after each release, and there is no need for any lease when I push things out.

But if I were collaborating with others in another project that uses a shared central repository workflow, and if I were in the mood to see how well/better this "improved safer DWIM" mode behaves, then it would bite me.

Previous: Junio C HamanoNext: Jeff King
Message 15 of 17 in “What's cooking in git.git (Jul 2017, #03; Mon, 10)”
  1. Junio C HamanoJul 10, 2017
  2. Lars SchneiderJul 11, 2017
  3. Jeff KingJul 11, 2017
  4. Lars SchneiderJul 11, 2017
  5. Jeff KingJul 11, 2017
  6. Junio C HamanoJul 11, 2017
  7. Junio C HamanoJul 11, 2017
  8. Johannes SchindelinJul 13, 2017
  9. Junio C HamanoJul 13, 2017
  10. Jeff KingJul 13, 2017
  11. Junio C HamanoJul 13, 2017
  12. Junio C HamanoJul 13, 2017
  13. Jeff KingJul 13, 2017
  14. Junio C HamanoJul 13, 2017
  15. Junio C HamanoJul 13, 2017
  16. Jeff KingJul 13, 2017
  17. Junio C HamanoJul 13, 2017

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.