Hello, I am using magit on a Win7 machine. I get following error when calling `magit-status':
let: Wrong type argument: stringp, nil (backtrace attached) Environment: - Win7 - emachs 24.5 - git 2.4.5 (cygwin) - magit recent git-version Bisecting shows the following commit as root cause: cca66e5d04a41e3da79c648451f7f30f42a6d774 is the first bad commit commit cca66e5d04a41e3da79c648451f7f30f42a6d774 Author: Jonas Bernoulli Date: Thu Aug 27 21:29:42 2015 +0200 magit-rev-format: always treat REV as a commit, add ARGS This function is intended to print information about a commit, so cast it as a commit by appending "^{commit}" to REV. This is useful when REV actually is a tag, in that case `git show' always prints tag related information before the information requested using FORMAT, and so this function used to return incorrect information in that case. If the return value would be an empty string, then instead return nil. Also add the new argument ARGS. These arguments are passed to `git show' and should be used for arguments such as `--date=' which are respected by certain placeholders in FORMAT. Thank you for looking into this. -- CU Thomas -- You received this message because you are subscribed to the Google Groups "magit" group. To unsubscribe from this group and stop receiving emails from it, send an email to magit+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Debugger entered--Lisp error: (wrong-type-argument stringp nil) string-match("^\\([^ ]+\\) \\(.*\\)" nil) (let ((output (magit-rev-format "%h %s" (or branch "HEAD")))) (string-match "^\\([^ ]+\\) \\(.*\\)" output) (let ((string56747 output)) (let ((hash (match-string 1 string56747)) (msg (match-string 2 string56747))) (let* ((it (progn (vector ... ... ... ... nil nil nil nil nil nil nil nil magit-insert-section--parent nil)))) (progn (or (and (vectorp it) (>= ... 14) (memq ... cl-struct-magit-section-tags)) (error "%s accessing a non-%s" (quote magit-section-hidden) (quote magit-section))) (let* ((v it)) (aset v 6 (let ... ...)))) (let ((magit-insert-section--current it) (magit-insert-section--parent it) (magit-insert-section--oldroot (or magit-insert-section--oldroot ...))) (catch (quote cancel-section) (if branch nil (progn ... ...)) (magit-insert (concat ... ... " " ... msg "\n")) (run-hooks (quote magit-insert-section-hook)) (magit-insert-child-count it) (set-marker-insertion-type (progn ... ...) t) (let* (... ... ...) (save-excursion ... ...)) (if (eq it magit-root-section) (magit-section-show it) (progn ... ...))) it))))) (let* ((branch (if --cl-rest-- (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--)))) (magit-get-current-branch)))) (if --cl-rest-- (signal (quote wrong-number-of-arguments) (list (quote magit-insert-head-header) (+ 1 (length --cl-rest--))))) (let ((output (magit-rev-format "%h %s" (or branch "HEAD")))) (string-match "^\\([^ ]+\\) \\(.*\\)" output) (let ((string56747 output)) (let ((hash (match-string 1 string56747)) (msg (match-string 2 string56747))) (let* ((it (progn ...))) (progn (or (and ... ... ...) (error "%s accessing a non-%s" ... ...)) (let* (...) (aset v 6 ...))) (let ((magit-insert-section--current it) (magit-insert-section--parent it) (magit-insert-section--oldroot ...)) (catch (quote cancel-section) (if branch nil ...) (magit-insert ...) (run-hooks ...) (magit-insert-child-count it) (set-marker-insertion-type ... t) (let* ... ...) (if ... ... ...)) it)))))) magit-insert-head-header() funcall(magit-insert-head-header) (while (and (setq wrapper (car-safe (prog1 magit-insert-headers-hook (setq magit-insert-headers-hook (cdr magit-insert-headers-hook))))) (= (point) (point-min))) (funcall wrapper)) (let ((magit-insert-section-hook (cons (quote magit-insert-remaining-headers) (if (listp magit-insert-section-hook) magit-insert-section-hook (list magit-insert-section-hook)))) (magit-insert-headers-hook hooks) wrapper) (while (and (setq wrapper (car-safe (prog1 magit-insert-headers-hook (setq magit-insert-headers-hook (cdr magit-insert-headers-hook))))) (= (point) (point-min))) (funcall wrapper))) magit-insert-headers((magit-insert-diff-filter-header magit-insert-head-header magit-insert-upstream-header magit-insert-tags-header)) (if (magit-rev-verify "HEAD") (magit-insert-headers magit-status-headers-hook) (insert "In the beginning there was darkness\n\n")) magit-insert-status-headers() run-hooks(magit-status-sections-hook) (catch (quote cancel-section) (run-hooks (quote magit-status-sections-hook)) (run-hooks (quote magit-insert-section-hook)) (magit-insert-child-count section56743) (set-marker-insertion-type (progn (or (and (vectorp section56743) (>= (length section56743) 14) (memq (aref section56743 0) cl-struct-magit-section-tags)) (error "%s accessing a non-%s" (quote magit-section-start) (quote magit-section))) (aref section56743 3)) t) (let* ((end (progn (or (and (vectorp section56743) (>= ... 14) (memq ... cl-struct-magit-section-tags)) (error "%s accessing a non-%s" (quote magit-section-end) (quote magit-section))) (let* ((v section56743)) (aset v 5 (point-marker))))) (map (intern (format "magit-%s-section-map" (progn (or ... ...) (aref section56743 1))))) (map (and (boundp map) (symbol-value map)))) (save-excursion (goto-char (progn (or (and (vectorp section56743) (>= ... 14) (memq ... cl-struct-magit-section-tags)) (error "%s accessing a non-%s" (quote magit-section-start) (quote magit-section))) (aref section56743 3))) (while (< (point) end) (let ((next (or ... end))) (if (get-text-property (point) (quote magit-section)) nil (put-text-property (point) next (quote magit-section) section56743) (if map (progn ...))) (goto-char next))))) (if (eq section56743 magit-root-section) (magit-section-show section56743) (progn (or (and (vectorp (progn (or ... ...) (aref section56743 12))) (>= (length (progn ... ...)) 14) (memq (aref (progn ... ...) 0) cl-struct-magit-section-tags)) (error "%s accessing a non-%s" (quote magit-section-children) (quote magit-section))) (let* ((v (progn (or ... ...) (aref section56743 12)))) (aset v 13 (nconc (progn (or ... ...) (aref ... 13)) (list section56743))))))) (let ((magit-insert-section--current section56743) (magit-insert-section--parent section56743) (magit-insert-section--oldroot (or magit-insert-section--oldroot (if magit-insert-section--parent nil (prog1 magit-root-section (setq magit-root-section section56743)))))) (catch (quote cancel-section) (run-hooks (quote magit-status-sections-hook)) (run-hooks (quote magit-insert-section-hook)) (magit-insert-child-count section56743) (set-marker-insertion-type (progn (or (and (vectorp section56743) (>= (length section56743) 14) (memq (aref section56743 0) cl-struct-magit-section-tags)) (error "%s accessing a non-%s" (quote magit-section-start) (quote magit-section))) (aref section56743 3)) t) (let* ((end (progn (or (and ... ... ...) (error "%s accessing a non-%s" ... ...)) (let* (...) (aset v 5 ...)))) (map (intern (format "magit-%s-section-map" (progn ... ...)))) (map (and (boundp map) (symbol-value map)))) (save-excursion (goto-char (progn (or (and ... ... ...) (error "%s accessing a non-%s" ... ...)) (aref section56743 3))) (while (< (point) end) (let ((next ...)) (if (get-text-property ... ...) nil (put-text-property ... next ... section56743) (if map ...)) (goto-char next))))) (if (eq section56743 magit-root-section) (magit-section-show section56743) (progn (or (and (vectorp (progn ... ...)) (>= (length ...) 14) (memq (aref ... 0) cl-struct-magit-section-tags)) (error "%s accessing a non-%s" (quote magit-section-children) (quote magit-section))) (let* ((v (progn ... ...))) (aset v 13 (nconc (progn ... ...) (list section56743))))))) section56743) (let* ((section56743 (progn (vector (quote cl-struct-magit-section) (quote status) nil (point-marker) nil nil nil nil nil nil nil nil magit-insert-section--parent nil)))) (progn (or (and (vectorp section56743) (>= (length section56743) 14) (memq (aref section56743 0) cl-struct-magit-section-tags)) (error "%s accessing a non-%s" (quote magit-section-hidden) (quote magit-section))) (let* ((v section56743)) (aset v 6 (let ((value (run-hook-with-args-until-success ... section56743))) (if value (eq value (quote hide)) (let (...) (if it ... nil))))))) (let ((magit-insert-section--current section56743) (magit-insert-section--parent section56743) (magit-insert-section--oldroot (or magit-insert-section--oldroot (if magit-insert-section--parent nil (prog1 magit-root-section (setq magit-root-section section56743)))))) (catch (quote cancel-section) (run-hooks (quote magit-status-sections-hook)) (run-hooks (quote magit-insert-section-hook)) (magit-insert-child-count section56743) (set-marker-insertion-type (progn (or (and (vectorp section56743) (>= ... 14) (memq ... cl-struct-magit-section-tags)) (error "%s accessing a non-%s" (quote magit-section-start) (quote magit-section))) (aref section56743 3)) t) (let* ((end (progn (or ... ...) (let* ... ...))) (map (intern (format "magit-%s-section-map" ...))) (map (and (boundp map) (symbol-value map)))) (save-excursion (goto-char (progn (or ... ...) (aref section56743 3))) (while (< (point) end) (let (...) (if ... nil ... ...) (goto-char next))))) (if (eq section56743 magit-root-section) (magit-section-show section56743) (progn (or (and (vectorp ...) (>= ... 14) (memq ... cl-struct-magit-section-tags)) (error "%s accessing a non-%s" (quote magit-section-children) (quote magit-section))) (let* ((v ...)) (aset v 13 (nconc ... ...)))))) section56743)) magit-status-refresh-buffer() apply(magit-status-refresh-buffer nil) (save-excursion (apply magit-refresh-function magit-refresh-args)) (let ((inhibit-read-only t)) (erase-buffer) (save-excursion (apply magit-refresh-function magit-refresh-args))) (let* ((buffer (current-buffer)) (windows (apply (quote append) (mapcar (function (lambda (it) (let ... ...))) (or (get-buffer-window-list buffer nil t) (list (selected-window))))))) (deactivate-mark) (setq magit-section-highlight-overlays nil magit-section-highlighted-section nil magit-section-highlighted-sections nil magit-section-unhighlight-sections nil) (let ((inhibit-read-only t)) (erase-buffer) (save-excursion (apply magit-refresh-function magit-refresh-args))) (let ((--dolist-tail-- windows) window) (while --dolist-tail-- (setq window (car --dolist-tail--)) (let ((save-selected-window--state (internal--before-with-selected-window (car window)))) (save-current-buffer (unwind-protect (progn (select-window ... ...) (save-current-buffer ... ...)) (internal--after-with-selected-window save-selected-window--state)))) (setq --dolist-tail-- (cdr --dolist-tail--)))) (run-hooks (quote magit-refresh-buffer-hook)) (magit-section-update-highlight) (set-buffer-modified-p nil)) (progn (if magit-refresh-verbose (progn (message "Refreshing buffer `%s'..." (buffer-name)))) (let* ((buffer (current-buffer)) (windows (apply (quote append) (mapcar (function (lambda ... ...)) (or (get-buffer-window-list buffer nil t) (list ...)))))) (deactivate-mark) (setq magit-section-highlight-overlays nil magit-section-highlighted-section nil magit-section-highlighted-sections nil magit-section-unhighlight-sections nil) (let ((inhibit-read-only t)) (erase-buffer) (save-excursion (apply magit-refresh-function magit-refresh-args))) (let ((--dolist-tail-- windows) window) (while --dolist-tail-- (setq window (car --dolist-tail--)) (let ((save-selected-window--state (internal--before-with-selected-window ...))) (save-current-buffer (unwind-protect (progn ... ...) (internal--after-with-selected-window save-selected-window--state)))) (setq --dolist-tail-- (cdr --dolist-tail--)))) (run-hooks (quote magit-refresh-buffer-hook)) (magit-section-update-highlight) (set-buffer-modified-p nil)) (if magit-refresh-verbose (progn (message "Refreshing buffer `%s'...done (%.3fs)" (buffer-name) (float-time (time-subtract (current-time) magit-refresh-start-time)))))) (if magit-refresh-function (progn (if magit-refresh-verbose (progn (message "Refreshing buffer `%s'..." (buffer-name)))) (let* ((buffer (current-buffer)) (windows (apply (quote append) (mapcar (function ...) (or ... ...))))) (deactivate-mark) (setq magit-section-highlight-overlays nil magit-section-highlighted-section nil magit-section-highlighted-sections nil magit-section-unhighlight-sections nil) (let ((inhibit-read-only t)) (erase-buffer) (save-excursion (apply magit-refresh-function magit-refresh-args))) (let ((--dolist-tail-- windows) window) (while --dolist-tail-- (setq window (car --dolist-tail--)) (let ((save-selected-window--state ...)) (save-current-buffer (unwind-protect ... ...))) (setq --dolist-tail-- (cdr --dolist-tail--)))) (run-hooks (quote magit-refresh-buffer-hook)) (magit-section-update-highlight) (set-buffer-modified-p nil)) (if magit-refresh-verbose (progn (message "Refreshing buffer `%s'...done (%.3fs)" (buffer-name) (float-time (time-subtract (current-time) magit-refresh-start-time))))))) magit-refresh-buffer() (save-current-buffer (set-buffer buffer56742) (setq magit-refresh-function func56740) (setq magit-refresh-args args56741) (run-hooks (quote magit-mode-setup-hook)) (cond ((memq mode56739 (quote (magit-log-mode magit-reflog-mode))) (let nil (magit-xref-setup args56741))) ((memq mode56739 (quote (magit-diff-mode magit-revision-mode))) (let nil (magit-xref-setup args56741) (goto-char (point-min)))) (t nil)) (funcall mode56739) (magit-refresh-buffer)) (let* ((mode56739 (function magit-status-mode)) (func56740 (function magit-status-refresh-buffer)) (args56741 (list)) (buffer56742 (magit-mode-display-buffer magit-status-buffer-name-format mode56739 (or switch-function magit-status-buffer-switch-function) (let ((default-directory (or magit-mode-setup--topdir default-directory))) (let ((it ...)) (if it (if find-file-visit-truename ... it) (user-error "Not inside a Git repository"))))))) (save-current-buffer (set-buffer buffer56742) (setq magit-refresh-function func56740) (setq magit-refresh-args args56741) (run-hooks (quote magit-mode-setup-hook)) (cond ((memq mode56739 (quote (magit-log-mode magit-reflog-mode))) (let nil (magit-xref-setup args56741))) ((memq mode56739 (quote (magit-diff-mode magit-revision-mode))) (let nil (magit-xref-setup args56741) (goto-char (point-min)))) (t nil)) (funcall mode56739) (magit-refresh-buffer))) (let ((magit-mode-setup--topdir (file-name-as-directory (expand-file-name directory)))) (let* ((mode56739 (function magit-status-mode)) (func56740 (function magit-status-refresh-buffer)) (args56741 (list)) (buffer56742 (magit-mode-display-buffer magit-status-buffer-name-format mode56739 (or switch-function magit-status-buffer-switch-function) (let ((default-directory ...)) (let (...) (if it ... ...)))))) (save-current-buffer (set-buffer buffer56742) (setq magit-refresh-function func56740) (setq magit-refresh-args args56741) (run-hooks (quote magit-mode-setup-hook)) (cond ((memq mode56739 (quote (magit-log-mode magit-reflog-mode))) (let nil (magit-xref-setup args56741))) ((memq mode56739 (quote (magit-diff-mode magit-revision-mode))) (let nil (magit-xref-setup args56741) (goto-char (point-min)))) (t nil)) (funcall mode56739) (magit-refresh-buffer)))) magit-status-internal("c:/daten/users/DE_hts2fe/git-emacs/.emacs.d/") (if directory (let ((toplevel (magit-toplevel directory))) (setq directory (file-name-as-directory (expand-file-name directory))) (if (and toplevel (string-equal directory toplevel)) (magit-status-internal directory) (if (y-or-n-p (if toplevel (format "%s is a repository. Create another in %s? " toplevel directory) (format "Create repository in %s? " directory))) (progn (magit-init directory))))) (magit-status-internal default-directory)) magit-status(nil) call-interactively(magit-status nil nil) command-execute(magit-status)