public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: "SZEDER Gábor" <szeder@ira•uka.de>
Cc: Jeff King <peff@peff•net>, git@vger•kernel.org
Subject: Re: [PATCH 2/2] sh-setup: make require_clean_work_tree() work on orphan branches
Date: Wed, 20 Jan 2016 16:06:01 -0800	[thread overview]
Message-ID: <xmqq7fj33ifq.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <1448376345-27339-2-git-send-email-szeder@ira.uka.de> ("SZEDER Gábor"'s message of "Tue, 24 Nov 2015 15:45:45 +0100")

SZEDER Gábor <szeder@ira•uka.de> 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 subsequent review of
this 2/2) makes it clear this is not a good idea.  By definition,
the index immediately after creating and getting on an orphan branch
is not clean [*1*].

I'll move the topic from "Needs review" to "Will discard" pile in my
tree.

Sorry for the noise.


[Footnote]

*1* Roughly speaking, if "git commit" (no arguments) to record the
state of the index succeeds without "--allow-empty", your index is
dirty with respect to HEAD.

  parent reply	other threads:[~2016-01-21  0:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-24 14:45 [PATCH 1/2] Add tests for git-sh-setup's require_clean_work_tree() SZEDER Gábor
2015-11-24 14:45 ` [PATCH 2/2] sh-setup: make require_clean_work_tree() work on orphan branches SZEDER Gábor
2015-11-24 20:50   ` Jeff King
2015-11-30 12:37     ` SZEDER Gábor
2015-12-02 23:07     ` Junio C Hamano
2015-11-25  6:51   ` Johannes Sixt
2015-11-30 12:24     ` SZEDER Gábor
2016-01-21  0:06   ` Junio C Hamano [this message]
2016-01-20 23:59 ` [PATCH 1/2] Add tests for git-sh-setup's require_clean_work_tree() Junio C Hamano
2016-01-21  1:27   ` SZEDER Gábor
2016-01-21  4:52     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq7fj33ifq.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=peff@peff$(echo .)net \
    --cc=szeder@ira$(echo .)uka.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox