diff options
| author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2019-03-29 17:39:10 +0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2019-04-02 13:57:00 +0900 |
| commit | e342c63a4e070bd1398b9aa86ac4ce917edbadc7 (patch) | |
| tree | 851c933ff4b53f79f4ff9f56e9f07536f9f23ee2 /builtin/commit.c | |
| parent | switch: stop accepting pathspec (diff) | |
| download | git-e342c63a4e070bd1398b9aa86ac4ce917edbadc7.tar.gz git-e342c63a4e070bd1398b9aa86ac4ce917edbadc7.zip | |
switch: reject "do nothing" case
"git checkout" can be executed without any arguments. What it does is
not exactly great: it switches from HEAD to HEAD and shows worktree
modification as a side effect.
Make switch reject this case. Just use "git status" if you want
that side effect. For switch, you have to either
- really switch a branch
- (explicitly) detach from the current branch
- create a new branch
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions
