]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/vfs2.py
ls: add --commit-hash and drop vfs nominal_oid
[bup.git] / lib / bup / vfs2.py
index dfc747a4db7f6dbf858cbc3b984eec05823850de..5fbcc6a43a0cbcc26a03cbcdbbe8ea0a785c25b6 100644 (file)
@@ -40,9 +40,8 @@ fill_in_metadata_if_dir() or ensure_item_has_metadata()).
 Commit items represent commits (e.g. /.tag/some-commit or
 /foo/latest), and for most purposes, they appear as the underlying
 tree.  S_ISDIR(item_mode(item)) will return true for both tree Items
-and Commits and the commit's oid is the tree hash.  The commit hash
-will be item.coid, and nominal_oid(item) will return coid for commits,
-oid for everything else.
+and Commits and the commit's oid is the tree hash; the commit hash is
+item.coid.
 
 """
 
@@ -231,15 +230,6 @@ _root = Root(meta=default_dir_mode)
 _tags = Tags(meta=default_dir_mode)
 
 
-def nominal_oid(item):
-    """If the item is a Commit, return its commit oid, otherwise return
-    the item's oid, if it has one.
-
-    """
-    if isinstance(item, Commit):
-        return item.coid
-    return getattr(item, 'oid', None)
-
 def copy_item(item):
     """Return a completely independent copy of item, such that
     modifications will not affect the original.