git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* A few "linked checkout" niggles
@ 2015-07-15 23:13 Junio C Hamano
  2015-07-16  5:24 ` Duy Nguyen
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Junio C Hamano @ 2015-07-15 23:13 UTC (permalink / raw)
  To: Nguyễn Thái Ngọc Duy; +Cc: Eric Sunshine, git

I've tried to set up a non-bare clone of git.git at ~/w/src and
attached one of its branches to a separate work tree at ~/w/rerere

 ~/w/src$ git worktree add ../rerere jc/rerere

Then I tried the "multiple checkout not allowed".

 ~/w/src$ git checkout jc/rerere
 fatal: 'jc/rerere' is already checked out at '/home/gitster/w/rerere/.git'

You see the first "niggle" above.  Do we need "/.git" at the end?
That is hopefully merely cosmetic and I am guessing that we can
unconditionally drop "/.git" from the end, but maybe there are
subtle reasons why it may not be a good idea (e.g. introduces some
ambiguities?)

There is another, a more serious one.

 ~/w/src$ git fetch ../git.git jc/rerere:jc/rerere

This succeeds, without checking if there is a work tree that has it
checked out.  I think the safety in "git fetch" that can be disabled
by "--update-head-ok" option should be updated to reuse the same
protection used by the updated "git checkout".

Something to work on for 2.5.x maintenance track, aiming for 2.5.1.

Thanks.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-07-17 17:07 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-15 23:13 A few "linked checkout" niggles Junio C Hamano
2015-07-16  5:24 ` Duy Nguyen
2015-07-16  5:40   ` Eric Sunshine
2015-07-16 20:39 ` Junio C Hamano
2015-07-16 23:13   ` Duy Nguyen
2015-07-17  3:11     ` Eric Sunshine
2015-07-17 12:27 ` Michael J Gruber
2015-07-17 12:49   ` Duy Nguyen
2015-07-17 15:19     ` Junio C Hamano
2015-07-17 17:07       ` Eric Sunshine
2015-07-17 17:02     ` Eric Sunshine

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).