Re: [PATCH 2/2] sh-setup: make require_clean_work_tree() work on orphan branches

2016-01-20 Thread Junio C Hamano
SZEDER Gábor writes: > git-sh-setup's require_clean_work_tree() always exits with error on an > orphan branch, even when the index and worktree are both clean. Ah, I just sent a review on 1/2 as I found it was not commented on by anybody, but re-reading this sentence (and

Re: [PATCH 2/2] sh-setup: make require_clean_work_tree() work on orphan branches

2015-12-02 Thread Junio C Hamano
Jeff King writes: > On Tue, Nov 24, 2015 at 03:45:45PM +0100, SZEDER Gábor wrote: > >> git-sh-setup's require_clean_work_tree() always exits with error on an >> orphan branch, even when the index and worktree are both clean. The >> reason is that require_clean_work_tree() starts

Re: [PATCH 2/2] sh-setup: make require_clean_work_tree() work on orphan branches

2015-11-30 Thread SZEDER Gábor
Quoting Jeff King : On Tue, Nov 24, 2015 at 03:45:45PM +0100, SZEDER Gábor wrote: git-sh-setup's require_clean_work_tree() always exits with error on an orphan branch, even when the index and worktree are both clean. The reason is that require_clean_work_tree() starts off

Re: [PATCH 2/2] sh-setup: make require_clean_work_tree() work on orphan branches

2015-11-30 Thread SZEDER Gábor
Quoting Johannes Sixt : --- a/git-sh-setup.sh +++ b/git-sh-setup.sh @@ -200,7 +200,19 @@ require_work_tree () { } require_clean_work_tree () { - git rev-parse --verify HEAD >/dev/null || exit 1 + if git rev-parse --verify HEAD >/dev/null 2>/dev/null + then +

Re: [PATCH 2/2] sh-setup: make require_clean_work_tree() work on orphan branches

2015-11-24 Thread Johannes Sixt
Am 24.11.2015 um 15:45 schrieb SZEDER Gábor: git-sh-setup's require_clean_work_tree() always exits with error on an orphan branch, even when the index and worktree are both clean. The reason is that require_clean_work_tree() starts off with verifying HEAD, to make sure that it can safely pass

Re: [PATCH 2/2] sh-setup: make require_clean_work_tree() work on orphan branches

2015-11-24 Thread Jeff King
On Tue, Nov 24, 2015 at 03:45:45PM +0100, SZEDER Gábor wrote: > git-sh-setup's require_clean_work_tree() always exits with error on an > orphan branch, even when the index and worktree are both clean. The > reason is that require_clean_work_tree() starts off with verifying > HEAD, to make sure

[PATCH 2/2] sh-setup: make require_clean_work_tree() work on orphan branches

2015-11-24 Thread SZEDER Gábor
git-sh-setup's require_clean_work_tree() always exits with error on an orphan branch, even when the index and worktree are both clean. The reason is that require_clean_work_tree() starts off with verifying HEAD, to make sure that it can safely pass HEAD to 'git diff-index' later when it comes to