[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gited 09c79b9 64/73: Separate versions from file names
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gited 09c79b9 64/73: Separate versions from file names with -- |
Date: |
Sun, 29 Nov 2020 00:00:40 -0500 (EST) |
branch: externals/gited
commit 09c79b95f4b468d0bcce872112920adb4e44d843
Author: Tino Calancha <tino.calancha@gmail.com>
Commit: Tino Calancha <tino.calancha@gmail.com>
Separate versions from file names with --
Bump version to v0.5.4
* packages/gited/gited.el (gited-diff):
Add separator (--) after versions.
* packages/gited/gited-tests.el (gited-diff-test): Add test.
---
gited-tests.el | 14 ++++++++++++++
gited.el | 5 ++---
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/gited-tests.el b/gited-tests.el
index e72e32e..fff6de5 100644
--- a/gited-tests.el
+++ b/gited-tests.el
@@ -198,6 +198,20 @@ Return the last evaled BODY form."
(delete-directory dir1 'recursive)
(delete-directory dir2 'recursive))))
+(ert-deftest gited-diff-test ()
+ "Test for `gited-diff'.
+Create a repository with 2 identical branches, `master' and `foo'.
+Each branch contains just one file `foo'. Since this file has same name as one
+of the branches, then we must add '--' after the versions.
+For example, the Git command to get the diff between the 2 branches is as
follows:
+git diff master foo --."
+ (skip-unless (executable-find vc-git-program))
+ (let ((dir (make-temp-file "gited" 'dir))
+ (inhibit-message t))
+ (with-gited-repo dir
+ (gited-copy-branch "master" gited-initial-filename)
+ (with-specified-completion-branch gited-initial-filename
+ (should-not (gited-diff "master"))))))
(provide 'gited-tests)
;;; gited-tests.el ends here
diff --git a/gited.el b/gited.el
index 5900c7a..283e5cb 100644
--- a/gited.el
+++ b/gited.el
@@ -12,7 +12,7 @@
;; Package-Requires: ((emacs "24.4") (cl-lib "0.5"))
;; Last-Updated: Tue Jul 30 18:28:26 CEST 2019
;; By: calancha
-;; Update #: 697
+;; Update #: 698
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
@@ -1974,8 +1974,7 @@ diff OLD-REF REF."
(with-current-buffer buf
(let ((inhibit-read-only t))
(erase-buffer)
- (gited-git-command `("diff" ,old-ref ,ref)
- (current-buffer)))
+ (gited-git-command `("diff" ,old-ref ,ref "--") (current-buffer)))
(display-buffer buf))
(gited--set-output-buffer-mode buf 'diff)))
- [elpa] externals/gited 790c20c 09/73: gited-mark-branches-by-date: Use less verbose default, (continued)
- [elpa] externals/gited 790c20c 09/73: gited-mark-branches-by-date: Use less verbose default, Stefan Monnier, 2020/11/29
- [elpa] externals/gited 046dffd 20/73: Update documentation, Stefan Monnier, 2020/11/29
- [elpa] externals/gited 5f57f01 21/73: * gited.el (gited-mode-map): Use prefix '* s' for all stash commands., Stefan Monnier, 2020/11/29
- [elpa] externals/gited 8db1633 04/73: gited-update: Don't overwrite `tabulated-list-sort-key', Stefan Monnier, 2020/11/29
- [elpa] externals/gited 5138dee 01/73: Add new library gited.el, Stefan Monnier, 2020/11/29
- [elpa] externals/gited 9989d95 05/73: Fix sort of columns when gited-hide-details-mode is enabled, Stefan Monnier, 2020/11/29
- [elpa] externals/gited 861281e 06/73: * gited.el (gited-mark-branches-regexp): Fix docstring., Stefan Monnier, 2020/11/29
- [elpa] externals/gited eeadd65 26/73: Add missing docstrings for several commands, Stefan Monnier, 2020/11/29
- [elpa] externals/gited 239ac36 31/73: * gited.el: Bump version to 0.2.3., Stefan Monnier, 2020/11/29
- [elpa] externals/gited fd28d69 48/73: * gited-tests.el (gited-test1): Use gited--last-commit-title., Stefan Monnier, 2020/11/29
- [elpa] externals/gited 09c79b9 64/73: Separate versions from file names with --,
Stefan Monnier <=
- [elpa] externals/gited ed83468 59/73: * packages/gited/gited.el: Bump version to v5.0.1, Stefan Monnier, 2020/11/29
- [elpa] externals/gited 8502d7c 53/73: Handle multi remote repositories, Stefan Monnier, 2020/11/29
- [elpa] externals/gited 55fc368 54/73: Fix gited-push bug from previous commit, Stefan Monnier, 2020/11/29
- [elpa] externals/gited 8241ee5 41/73: gited-checkout-branch: Set right faces for marked branches, Stefan Monnier, 2020/11/29
- [elpa] externals/gited 0a303a1 70/73: Make code more compact by using pcase-dolist, Stefan Monnier, 2020/11/29
- [elpa] externals/gited 40e57eb 60/73: * gited/gited.el: Don't require `gited-ci`, which isn't found., Stefan Monnier, 2020/11/29
- [elpa] externals/gited b5fdc7e 61/73: Add missing file gited-ci.el, Stefan Monnier, 2020/11/29
- [elpa] externals/gited ad074e1 49/73: * packages/gited/gited.el (gited-stash-branch): Update Gited buffer on success, Stefan Monnier, 2020/11/29
- [elpa] externals/gited 36ec8fa 34/73: ; * packages/gited/gited.el: Update file header., Stefan Monnier, 2020/11/29
- [elpa] externals/gited f81463e 44/73: gited-git-checkout: New function, Stefan Monnier, 2020/11/29