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

Pull without fetch

From
DRDamien Robert <damien.olivier.robert@gmail.com>
Date
Apr 6, 2019, 13:12 UTC
Message-ID
<20190406131200.xcd7gtf7dlc567uh@doriath>
Dear git developpers,

is there a way to do a git pull without it running git fetch? Looking at the source in builtin/pull.c does not seem to indicate so.

Here is my use case: I do a `git fetch --all` to look at the incoming changes, and only afterwards I would like to do a `git pull --no-fetch`. I could of course call `git merge`/`git rebase` directly, but the advantage of `git pull` is that it parses the value of branch.<name>.rebase for me (in `parse_config_rebase`). I could easily write a script for it, but this would just duplicate this part of git-pull, so we might as well use git pull directly. Moreover, `git-pull --rebase` used to have extra functionality where it looked at the reflog to find the merge base. This is now incorporated directly into git rebase, but this is one more reason I would like to use git pull directly.

I am missing another way? Would a patch to provide this feature be accepted?
-- 
Damien Robert
Next: Junio C Hamano
Message 1 of 9 in “Pull without fetch”
  1. Damien RobertApr 6, 2019
  2. Junio C HamanoApr 8, 2019
  3. Duy NguyenApr 8, 2019
  4. Ævar Arnfjörð BjarmasonApr 8, 2019
  5. Duy NguyenApr 8, 2019
  6. Damien RobertApr 8, 2019
  7. Damien RobertApr 8, 2019
  8. Junio C HamanoApr 9, 2019
  9. Damien RobertApr 11, 2019

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.