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

Re: Bug^Feature? fetch protects only current working tree branch

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 23, 2017, 22:13 UTC
Message-ID
<xmqqo9saer9f.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<cb957174-5e9a-5603-ea9e-ac9b58a2eaad@mathema.de>
Andreas Heiduk <andreas.heiduk@mathema.de> writes:
Show 7 quoted lines
> A `git fetch . origin/master:master` protects the currently checked out 
> branch (HEAD) unless the `-u/--update-head-ok` is supplied. This avoids a
> mismatch between the index and HEAD. BUT branches which are HEADs in other
> working trees do not get that care - their state is silently screwed up.
>
> Is this intended behaviour or and just an oversight while implementing
> `git worktree`?

The latter. "git worktree" is an interesting feature and has potential to become useful in wider variety of workflows than it currently is, but end users should consider it still experimental as it still is with many such small rough edges like this one.

Patches to help improving the feature is of course very welcome.
Previous: Andreas HeidukNext: Andreas Heiduk
Message 2 of 3 in “Bug^Feature? fetch protects only current working tree branch”
  1. Andreas HeidukJul 23, 2017
  2. Junio C HamanoJul 23, 2017
  3. Andreas HeidukJul 24, 2017

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.