git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Linked workdirs break typo-correction.
@ 2015-06-25 14:15 Bjørnar Snoksrud
  2015-06-26 10:37 ` [PATCH] setup: set env $GIT_WORK_TREE when work tree is set, like $GIT_DIR Nguyễn Thái Ngọc Duy
  0 siblings, 1 reply; 7+ messages in thread
From: Bjørnar Snoksrud @ 2015-06-25 14:15 UTC (permalink / raw)
  To: Git Mailing List

This is a weird one..

When standing in a folder inside a linked working copy, the
typo-correction breaks all commands.

Repro:
~/git $ git --version
git version 2.4.4.600.g6397abd
~/git $ git init bar
Initialized empty Git repository in ~/git/bar/.git/
~/git $ cd bar
~/git/bar (master #) $ git commit -m init --allow-empty
[master (root-commit) 554ea84] init
~/git/bar (master) $ mkdir folder
~/git/bar (master) $ touch folder/file
~/git/bar (master) $ git add folder
~/git/bar (master +) $ git commit -m folder
[master 8c00ba8] folder
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 folder/file
~/git/bar (master) $ cd folder/
~/git/bar/folder (master) $ git shw
WARNING: You called a Git command named 'shw', which does not exist.
Continuing under the assumption that you meant 'show'
in 0.1 seconds automatically...
commit 8c00ba8d30cff0e0d1b9cf110a65ea8f33edf8b2
Author: Bjørnar Snoksrud <bsnoksru@cisco.com>
Date:   Thu Jun 25 16:08:01 2015 +0200

    folder

diff --git a/folder/file b/folder/file
new file mode 100644
index 0000000..e69de29
bsnoksru@calculon ~/git/bar/folder (master) $ git branch foo
bsnoksru@calculon ~/git/bar/folder (master) $ git checkout foo --to
~/git/foo
Enter /home/bsnoksru/git/foo (identifier foo)
Switched to branch 'foo'
bsnoksru@calculon ~/git/bar/folder (master) $ cd ../../foo/folder/
~/git/foo/folder (foo) $ git shw
WARNING: You called a Git command named 'shw', which does not exist.
Continuing under the assumption that you meant 'show'
in 0.1 seconds automatically...
fatal: internal error: work tree has already been set
Current worktree: ~/git/foo
New worktree: ~/git/foo/folder
~/git/foo/folder (foo) $ git brnch baz
WARNING: You called a Git command named 'brnch', which does not exist.
Continuing under the assumption that you meant 'branch'
in 0.1 seconds automatically...
fatal: internal error: work tree has already been set
Current worktree: /home/bsnoksru/git/foo
New worktree: /home/bsnoksru/git/foo/folder


-- 
bjornar@snoksrud.no

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

end of thread, other threads:[~2015-06-27  5:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-25 14:15 Linked workdirs break typo-correction Bjørnar Snoksrud
2015-06-26 10:37 ` [PATCH] setup: set env $GIT_WORK_TREE when work tree is set, like $GIT_DIR Nguyễn Thái Ngọc Duy
2015-06-26 11:56   ` Jeff King
2015-06-27  5:57     ` Duy Nguyen
2015-06-26 17:15   ` Junio C Hamano
2015-06-26 19:02     ` Junio C Hamano
2015-06-26 17:30   ` Junio C Hamano

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 NNTP newsgroup(s).