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

Re: Question regarding git fetch

From
Jeff King <peff@peff.net>
Date
Aug 27, 2009, 21:53 UTC
Message-ID
<20090827215305.GA6348@coredump.intra.peff.net>
In-Reply-To
<20090827215007.GA6231@coredump.intra.peff.net>
On Thu, Aug 27, 2009 at 05:50:07PM -0400, Jeff King wrote:
Show 14 quoted lines
> > I think this is a good example that any change results from this
> > discussion should apply _only_ to cases where command line refspecs lack
> > colon (i.e. used to mean "do not store this anywhere but in FETCH_HEAD").
> 
> I don't think the colon is the issue. Consider the same situation, but I
> say:
> 
>   # but today let's demo it first
>   $ git fetch origin master
>   $ git checkout -b demo FETCH_HEAD
> 
> I'm still screwed. The issue is that you consider your configured
> refspec destinations to be precious, and not merely a cache for what's
> happening on the remote side.

Which, btw, led me to consider whether there are heuristics for deciding when a fetch refspec means one thing and not the other. I don't think there are reliable ones (probably the default configured refs/remotes/$remotename/* would not yield false positives, but I think limiting to that would yield false negatives). So maybe this is something that should be configurable, disabled by default for now, and maybe enabled by default in the future (v1.7.0?).

-Peff
Previous: Jeff KingNext: Avery Pennarun
Message 11 of 17 in “Question regarding git fetch”
  1. Tom LambdaAug 27, 2009
  2. Avery PennarunAug 27, 2009
  3. Eric RaibleAug 27, 2009
  4. Avery PennarunAug 27, 2009
  5. Björn SteinbrinkAug 27, 2009
  6. Avery PennarunAug 27, 2009
  7. Jeff KingAug 27, 2009
  8. Jeff KingAug 27, 2009
  9. Junio C HamanoAug 27, 2009
  10. Jeff KingAug 27, 2009
  11. Jeff KingAug 27, 2009
  12. Avery PennarunAug 27, 2009
  13. Jeff KingAug 27, 2009
  14. Avery PennarunAug 27, 2009
  15. Junio C HamanoAug 27, 2009
  16. Jeff KingAug 27, 2009
  17. Tom LambdaAug 28, 2009

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.