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

Re: How to check new commit availability without full fetch?

From
Dmitry Potapov <dpotapov@gmail.com>
Date
Jan 11, 2010, 05:38 UTC
Message-ID
<20100111053815.GB10586@dpotapov.dyndns.org>
In-Reply-To
<ee2a733e1001101736p2f395de6ka05044fe7cca624d@mail.gmail.com>
On Sun, Jan 10, 2010 at 08:36:44PM -0500, Leo Razoumov wrote:
> 
> BTW, pull and push are in a way symmetric operations.

Not really... 'pull' = 'fetch' + 'merge', while 'push' only propagates changes without any merging. You can say 'fetch' and 'push' are in a way symmetric operations, but this symmetry is limited due to difference in usage between local and remote branches.

> Is there any
> deep reason why push supports --dry-run but pull/fetch does not??

I guess it is because no one needs it. 'push' has --dry-run, because it updates local references in a remote repository. So, you may want to be sure that you are pushing the right thing. On the other hand, I see no reason to have --dry-run for 'fetch', because it updates only remote references, making them to point to the current state of the corresponding branches. 'fetch' does not change any local branch, so I see no reason for --dry-run.

What use case do you have in mind that needs --dry-run for 'fetch'?
Dmitry
Previous: Leo RazoumovNext: Robin Rosenberg
Message 14 of 20 in “How to check new commit availability without full fetch?”
  1. Leo RazoumovJan 10, 2010
  2. Nicolas PitreJan 10, 2010
  3. Junio C HamanoJan 10, 2010
  4. Nicolas PitreJan 10, 2010
  5. Leo RazoumovJan 11, 2010
  6. Tay Ray ChuanJan 11, 2010
  7. Junio C HamanoJan 11, 2010
  8. Michael WittenJan 11, 2010
  9. Junio C HamanoJan 11, 2010
  10. Nicolas PitreJan 11, 2010
  11. Leo RazoumovJan 11, 2010
  12. Nicolas PitreJan 11, 2010
  13. Leo RazoumovJan 11, 2010
  14. Dmitry PotapovJan 11, 2010
  15. Robin RosenbergJan 11, 2010
  16. Junio C HamanoJan 11, 2010
  17. Nicolas PitreJan 11, 2010
  18. Junio C HamanoJan 11, 2010
  19. Nicolas PitreJan 11, 2010
  20. Andreas SchwabJan 11, 2010

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.