Re: [PATCH/RFC] commit: new option to abort -a something is already staged
- From
Jacob Keller <jacob.keller@gmail.com>
- Date
- Aug 24, 2018, 02:59 UTC
- Message-ID
- <CA+P7+xohoHTnisAomMKixBJqNpjuvXV+nz=Cywsfb-wT=G8poA@mail.gmail.com>
- In-Reply-To
- <20180820154120.19297-1-pclouds@gmail.com>
On Mon, Aug 20, 2018 at 8:43 AM Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
Show 6 quoted lines
> Instead, let's handle just this problem for now. This new option > commit.preciousDirtyIndex, if set to false, will not allow `commit -a` > to continue if the final index is different from the existing one. I > don't think this can be achieved with hooks because the hooks don't > know about "-a" or different commit modes. >
Here you say setting it to "false" enables this check but...
Show 5 quoted lines
> +commit.preciousDirtyIndex:: > + If some changes are partially staged in the index (i.e. > + "git commit -a" and "git commit" commit different changes), reject > + "git commit -a". > +
Here, sounds like it is enabled by setting it to true.
Thanks, Jake