cc789a5baf4a

Fix error with tags

Tags are defined on a commit, such as the current commit `repo['.']`.
They are not defined on the working directory, which `repo[None]` gives.
[view raw] [browse files]
author Sietse Brouwer <sbbrouwer@gmail.com>
date Tue, 26 May 2020 15:08:02 +0200
parents d87bc22b5a2e
children e2d60e4e3caf
branches/tags (none)
files prompt.py

Changes

diff -r d87bc22b5a2e -r cc789a5baf4a prompt.py
--- a/prompt.py	Sun Jul 19 11:12:21 2020 -0400
+++ b/prompt.py	Tue May 26 15:08:02 2020 +0200
@@ -295,10 +295,12 @@
         return _with_groups(g, flag) if flag else ''
 
     def _tags(m):
+        # Show tags of p1.
+        # As an alternative, we could show tags of p1 and p2.
         g = m.groups()
 
         sep = g[2][1:] if g[2] else ' '
-        tags = repo[None].tags()
+        tags = repo['.'].tags()
 
         quiet = _get_filter('quiet', g)
         if quiet: