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

Re: Git 2 force commits but Git 1 doesn't

From
MWMichael Ward <mward@smartsoftwareinc.com>
Date
Jun 22, 2020, 20:52 UTC
Message-ID
<8ad16219-2426-6127-b41d-bb3007a9b993@smartsoftwareinc.com>
In-Reply-To
<20200622204346.GP6531@camp.crustytoothpaste.net>

Using the steps from my original email for how I had the repository set up (any user authentication scheme works), clone 2 copies from that repository (call them A and B). Make, commit, and push a change in A. Then make, commit, and push a change in B (without first pulling). With the 1.8 client, B will prompt that you're out of date and need to update. With the 2.26 client, B's commit will be pushed and be forced.

Thanks for your help.
Michael
On 6/22/20 3:43 PM, brian m. carlson wrote:
Show 16 quoted lines
> On 2020-06-22 at 20:30:06, Michael Ward wrote:
>> Versions in use are 2.27.2 and 1.8.3.1. This behavior is seen with regular
>> pushes.
>>
>> I'll look into the http-backend functionality. If that will help control
>> that, we'll definitely want to use that instead. What surprises me, though,
>> is that even with DAV a 1.8 client appears to work correctly in that it will
>> warn the user that their push is about to clobber the head, but 2.27
>> doesn't.
> If you can provide a set of reproduction steps for this, I'd be happy to
> write a patch to fix it.  We should do the right thing for non-force
> pushes in both cases.
>
> I will say that overall, few people use the DAV-based protocol, since
> it's significantly less efficient than the smart protocol, so it doesn't
> surprise me that there may be bugs there.
Previous: brian m. carlsonNext: brian m. carlson
Message 6 of 19 in “Git 2 force commits but Git 1 doesn't”
  1. Michael WardJun 22, 2020
  2. brian m. carlsonJun 22, 2020
  3. Michael WardJun 22, 2020
  4. Michael WardJun 22, 2020
  5. brian m. carlsonJun 22, 2020
  6. Michael WardJun 22, 2020
  7. brian m. carlsonJun 22, 2020
  8. Michael WardJun 22, 2020
  9. brian m. carlsonJun 23, 2020
  10. René ScharfeJun 23, 2020
  11. brian m. carlsonJun 23, 2020
  12. René ScharfeJun 23, 2020
  13. brian m. carlsonJun 23, 2020
  14. René ScharfeJun 24, 2020
  15. http-push: ensure unforced pushes fail when data would be lostbrian m. carlson, Jun 23, 2020
  16. Eric SunshineJun 23, 2020
  17. brian m. carlsonJun 23, 2020
  18. http-push: ensure unforced pushes fail when data would be lostbrian m. carlson, Jun 23, 2020
  19. Junio C HamanoJun 23, 2020

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.