[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#52349: 29.0.50; vc-git and diff-mode: stage hunks
From: |
Juri Linkov |
Subject: |
bug#52349: 29.0.50; vc-git and diff-mode: stage hunks |
Date: |
Thu, 08 Sep 2022 22:29:29 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) |
>>>>> Perhaps we should also check that there are no existing staged changes for
>>>>> those files, and if so, abort? This way we won't commit anything else by
>>>>> accident.
>>>> Will do later.
>>> Shouldn't be too hard, if we don't try to do it eagerly. Just add a check
>>> inside (when vc-git-patch-string ...) in vc-git-checkin.
>> + (unless (eq (vc-git-command nil t nil "diff" "--cached" "--quiet") 0)
>> + (error "Index not empty"))
>
> user-error, maybe?
Oh, it has a sad shortcoming: this feature can't be used when a new file
is added with 'C-x v v' since new files get added directly to the index,
and checking for the empty index raises the error for the whole changeset
with modified old files and new files.
- bug#52349: 29.0.50; vc-git and diff-mode: stage hunks,
Juri Linkov <=
- bug#52349: 29.0.50; vc-git and diff-mode: stage hunks, Sean Whitton, 2022/09/08
- bug#52349: 29.0.50; vc-git and diff-mode: stage hunks, Dmitry Gutov, 2022/09/09
- bug#52349: 29.0.50; vc-git and diff-mode: stage hunks, Juri Linkov, 2022/09/11
- bug#52349: 29.0.50; vc-git and diff-mode: stage hunks, Dmitry Gutov, 2022/09/11
- bug#52349: 29.0.50; vc-git and diff-mode: stage hunks, Juri Linkov, 2022/09/12
- bug#52349: 29.0.50; vc-git and diff-mode: stage hunks, Dmitry Gutov, 2022/09/18
- bug#52349: 29.0.50; vc-git and diff-mode: stage hunks, Juri Linkov, 2022/09/19
- bug#52349: 29.0.50; vc-git and diff-mode: stage hunks, Dmitry Gutov, 2022/09/19