Re: [PATCH 05/31] rebase: improve detection of rebase in progress
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 28, 2010, 23:08 UTC
- Message-ID
- <7vaajpv6lh.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1293528648-21873-6-git-send-email-martin.von.zweigbergk@gmail.com>
Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> writes:
> Currently, the existence of rebase-merge/ is tested with 'test -d', > while the existence of rebase-apply/ is tested by creating the > directory and then deleting it again. Any good reason for this?
I don't recall how the merge side reached the current shape of the code, but I think the rebase-apply one was that we wanted to make sure not only we don't have a directory but also we actually _can_ create one. If somebody had a bad permission set, "test -d" wouldn't help us much. We would fail later and error diagnosis codepath should do the right thing anyway, so it is not a correctness issue, but is more about attempting to notice an error early rather than late.