Thread (2 messages) 2 messages, 2 authors, 2016-06-15

Re: [RFC/PATCH] Add multiple workdir support to branch/checkout

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:52:11

Jay Soffian [off-list ref] writes:
On Wed, Oct 5, 2011 at 9:15 PM, Junio C Hamano [off-list ref] wrote:
quoted
Jay Soffian [off-list ref] writes:
quoted
So you're envisioning this?

  $ git commit foo.c
  Warning, master is also checked out in workdir2
No. I would rather think it needs to be forced.
Now they do what? Either commit --force or create a new branch?
Wouldn't it have been better to create the new branch before they
started editing?
If they are going to commit, and if they knew that they are going to
commit, yes.

But why do you want to forbid people from just checking things out if they
are not interested in committing? That is where I think you are going
backwards.
I guess it depends what you mostly use your workdirs for. For me, it's
to have different branches checked out, not to have the same branch
checked out in multiple locations.
Then you wouldn't have any problem if commit refused to make commit on the
branch that is checked out elsewhere, no?

I am not saying we should never have an option to _warn_ checking out the
same branch in multiple places. I am saying it is wrong to forbid doing so
by default.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help