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

Re: git bug/feature request

From
Peter Karlsson <peter@softwolves.pp.se>
Date
Nov 27, 2007, 14:35 UTC
Message-ID
<Pine.LNX.4.64.0711271531110.1011@ds9.cixit.se>
In-Reply-To
<200711271127.41161.gapon007@gmail.com>
gapon:
> i have discovered "weird" behaviour of git in this scenario*:

Yeah, I have run into it several times myself, and that is being both user A and B at the same time. The problem seems to be that git allows you to push into a repository which has a check-out, causing it to change states in a subtle way. That's just plain broken.

Git should either handle it somehow (perhaps by forcing the push into a new branch, which the pushee needs name), or just plainly refuse to push into a repository with a check-out.

I have learned to work around this problem by always pulling between my repositories, not pulling. I could probably have worked around it by having a master repository that is bare, but I have found that difficult because I am tracking an upstream non-Git repository, so to push and pull changes from that, I need a repository where I can have a check-out.

> * yes, i know that this scenario is "incorrect" but... it's possible
> and therefore i think it should be somehow handled - i tried a
> similar one with hg and bzr and i like their behaviour more

Yeah. It's even more irritating that recovering from the error state is difficult as well.

-- 
\\// Peter - http://www.softwolves.pp.se/
Previous: Jan HudecNext: David Kastrup
Message 16 of 22 in “git bug/feature request”
  1. gaponNov 27, 2007
  2. Benoit SigoureNov 27, 2007
  3. gaponNov 27, 2007
  4. Jakub NarebskiNov 27, 2007
  5. gaponNov 27, 2007
  6. Jakub NarebskiNov 27, 2007
  7. Jakub NarebskiNov 27, 2007
  8. gaponNov 27, 2007
  9. Alex RiesenNov 27, 2007
  10. gaponNov 27, 2007
  11. Alex RiesenNov 27, 2007
  12. gaponNov 27, 2007
  13. Alex RiesenNov 27, 2007
  14. Jakub NarebskiNov 27, 2007
  15. Jan HudecNov 30, 2007
  16. Peter KarlssonNov 27, 2007
  17. David KastrupNov 27, 2007
  18. Peter KarlssonNov 28, 2007
  19. Jakub NarebskiNov 27, 2007
  20. Steven GrimmNov 27, 2007
  21. Daniel BarkalowNov 27, 2007
  22. Daniel BarkalowNov 27, 2007

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.