Subject: Re: bug#64055: Implementation of modifying VC change comments for Git

From: Dmitry Gutov <[email-masked]>
Date: Mon, 21 Oct 2024 21:08:37 +0100

On 20/10/2024 08:19, Sean Whitton wrote:
> +         (nothing-staged
> +          (zerop
> +           (vc-git-command nil t nil "diff" "--cached" "--quiet"))))

Testing it a little more, this seems insufficient because rebase aborts 
on non-staged changes too. This seems to cover both cases:

          (no-changes
           (zerop
            (vc-git-command nil t nil "diff" "HEAD" "--quiet"))))

Regarding the command's latency it seems to be distributed like this in 
my current example:

allowed rewrite?
Elapsed time: 0.028043s
stash push maybe
Elapsed time: 0.072001s
rebase autosquash
Elapsed time: 0.047211s
stash pop
Elapsed time: 0.032561s

So all steps are somewhat expensive, but stashing is #1 in that. Overall 
it seems fine, not a problem for the interactive command.