Re: git emacs mode patch

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: git emacs mode patch

From: Alexandre Julliard <hidden>
Date: 2016-06-15 22:43:00

Gábor Melis [off-list ref] writes:
+(defcustom git-hide-unknown t
+  "Hide files with unknown status by default."
+  :group 'git
+  :type 'boolean)
This one should default to nil for backwards compatibility.
quoted hunk
@@ -1017,15 +1028,18 @@ and returns the process output as a string."
       (with-temp-buffer
         (git-run-command t nil "diff-index" "-z" "-M" "HEAD")
         (git-parse-status status)))
+    (unless (member 'up-to-date hidden-statuses)
       (with-temp-buffer
-        (git-run-command t nil "ls-files" "-z" "-u")
-        (git-parse-ls-unmerged status))
+        (git-run-command t nil "ls-files" "-z" "-t")
+        (git-parse-ls-files status 'unknown)))
+    (unless (member 'unknown hidden-statuses)
Why are you removing the ls-files -u?  This will break the detection
of unmerged files.
+(defun git-toggle-up-to-date ()
+  (interactive)
+  (if (member 'up-to-date hidden-statuses)
+      (setq hidden-statuses (remove 'up-to-date hidden-statuses))
+    (push 'up-to-date hidden-statuses))
The status should be named 'uptodate instead of 'up-to-date since
that's what's used for individual files. Having two different
spellings for the same word would be very confusing.

-- 
Alexandre Julliard
julliard@winehq.org

Re: git emacs mode patch

From: Gábor Melis <hidden>
Date: 2016-06-15 22:43:01

On Saturday 17 March 2007 11:04, Alexandre Julliard wrote:
Gábor Melis [off-list ref] writes:
quoted
+(defcustom git-hide-unknown t
+  "Hide files with unknown status by default."
+  :group 'git
+  :type 'boolean)
This one should default to nil for backwards compatibility.
quoted
@@ -1017,15 +1028,18 @@ and returns the process output as a
string." (with-temp-buffer
         (git-run-command t nil "diff-index" "-z" "-M" "HEAD")
         (git-parse-status status)))
+    (unless (member 'up-to-date hidden-statuses)
       (with-temp-buffer
-        (git-run-command t nil "ls-files" "-z" "-u")
-        (git-parse-ls-unmerged status))
+        (git-run-command t nil "ls-files" "-z" "-t")
+        (git-parse-ls-files status 'unknown)))
+    (unless (member 'unknown hidden-statuses)
Why are you removing the ls-files -u?  This will break the detection
of unmerged files.
quoted
+(defun git-toggle-up-to-date ()
+  (interactive)
+  (if (member 'up-to-date hidden-statuses)
+      (setq hidden-statuses (remove 'up-to-date hidden-statuses))
+    (push 'up-to-date hidden-statuses))
The status should be named 'uptodate instead of 'up-to-date since
that's what's used for individual files. Having two different
spellings for the same word would be very confusing.
Attached updated patch that adresses these valid objections and only 
lists files once.

Gábor
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help