emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/agitate 4d5209f2d4 1/4: Revise agitate--vc-git-commit-p


From: ELPA Syncer
Subject: [elpa] externals/agitate 4d5209f2d4 1/4: Revise agitate--vc-git-commit-prompt
Date: Tue, 4 Oct 2022 12:57:16 -0400 (EDT)

branch: externals/agitate
commit 4d5209f2d4e4f023de4e2bb5d068d8fa87cb7ddb
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Revise agitate--vc-git-commit-prompt
    
    1. The 'long' argument is not useful.
    
    2. Be opinionated about the format.  I considered vc-git-log-switches
       but that may not produce results that are appropriate for the
       minibuffer.
---
 agitate.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/agitate.el b/agitate.el
index 5093f51850..ef1e47ce1d 100644
--- a/agitate.el
+++ b/agitate.el
@@ -384,10 +384,9 @@ With optional BACK, find the beginning, else the end."
   (when (string-match "\\b\\([0-9a-z]+\\)\\(\s+\\)?" string)
     (match-string 1 string)))
 
-(defun agitate--vc-git-commit-prompt (&optional file long)
+(defun agitate--vc-git-commit-prompt (&optional file)
   "Prompt for Git commit and return it as a string.
 With optional FILE, limit the commits to those pertinent to it.
-With optional LONG do not abbreviate commit hashes.
 
 The number of revisions in the log is controlled by the user
 option `agitate-log-limit'."
@@ -406,8 +405,9 @@ option `agitate-log-limit'."
       (process-lines
        vc-git-program "log"
        (format "-n %d" agitate-log-limit)
-       (if long "--pretty=oneline" "--oneline")
-       (or file "--")))
+       "--pretty=format:%h  %ad  %an: %s"
+       "--date=short"
+       "--"))
      nil t)))
 
 ;;;###autoload



reply via email to

[Prev in Thread] Current Thread [Next in Thread]