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

Re: bad git pull

From
Junio C Hamano <junkio@cox.net>
Date
Dec 16, 2005, 17:40 UTC
Message-ID
<7v3bktj5ya.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<68948ca0512160739g12a3e25en256bae8c354c3a45@mail.gmail.com>
Don Zickus <dzickus@gmail.com> writes:
Show 9 quoted lines
>> While I am sympathetic, this "Oops, I said pull when I meant
>> fetch" sounds remotely similar to "oops, I said 'rm -r' when I
>> meant to say 'ls -r'".  Is it that the tool is too fragile?
>
> Sorry, wrong choice of words.  Didn't mean to imply anything negative.
> Though, I am still learning the tool and its features, I do appreciate
> your feedback and your last email was correct in understanding the
> mess I created.  I'll go read up on the differences between 'fetch'
> and 'pull'.

I too was a bit too defensive, and I agree the tool is prone to easy errors; the worst part is that there is no "rm -i" equivalent to be extra careful [*1*]. On the other hand, we have "git reset" to recover from, so it is not as bad as a mistake with "rm" ;-).

If for example there were a way to say "this `origin' shortcut is to be pulled into `master' branch and nothing else", we could have caught the "git pull" you had trouble with. There was a discussion on the list in the past to extend remotes/ files to allow such restriction of the patchflow to be expressed, but back then I felt the kind of restriction the proposal could express was too limiting, and the discussion was a bit premature because we did not have recommended patterns yet.

We might want to revive the discussion post 1.0. Taking the example of the topic-branch workflow by Tony, the "patch flow" language needs to be able to express something at least this:

 - topic branches -- branched from 'origin' somewhere in the
   past; commits accumulated but usually nothing is merged
   into them.
 - 'test' -- branched from 'origin' somewhere in the past; used
   solely to merge topic branches into it and no commits are
   made into it directly; branches that are regularly merged
   into it are:
   - topic branches
   - 'origin'
   - 'release'
 - 'release' -- branched from 'origin' somewhere in the
   past; trivial/obviously correct commits are made into it
   directly; proven to be good topic branches are merged into it
   for consumption by others; branches that are regularly merged
   into it are:
   - topic branches
   - 'origin'
   - never 'test' 
[Footnote]

*1* IMHO "rm -i" is not that safe, though. If one overuses it, it trains one's fingers to say "y" without much thinking.

Previous: Don ZickusNext: Carl Baldwin
Message 5 of 22 in “bad git pull”
  1. Don ZickusDec 15, 2005
  2. Junio C HamanoDec 15, 2005
  3. Junio C HamanoDec 15, 2005
  4. Don ZickusDec 16, 2005
  5. Junio C HamanoDec 16, 2005
  6. Carl BaldwinDec 16, 2005
  7. Junio C HamanoDec 16, 2005
  8. Morten WelinderDec 16, 2005
  9. Junio C HamanoDec 16, 2005
  10. Linus TorvaldsDec 16, 2005
  11. Morten WelinderDec 17, 2005
  12. Linus TorvaldsDec 17, 2005
  13. Junio C HamanoDec 17, 2005
  14. Linus TorvaldsDec 17, 2005
  15. Junio C HamanoDec 17, 2005
  16. Nicolas PitreDec 17, 2005
  17. Junio C HamanoDec 18, 2005
  18. Nicolas PitreDec 18, 2005
  19. Linus TorvaldsDec 18, 2005
  20. Junio C HamanoDec 18, 2005
  21. Nicolas PitreDec 18, 2005
  22. Junio C HamanoDec 17, 2005

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.