File: 0009-Drop-all-unused-extended-version-handling.patch

package info (click to toggle)
cloud-init 25.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,304 kB
  • sloc: python: 136,706; sh: 3,883; makefile: 128; javascript: 30; xml: 22
file content (26 lines) | stat: -rw-r--r-- 823 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Description: Drop all unused extended version handling
Author: Bastian Blank <waldi@debian.org>
Date: Sun, 4 Dec 2016 12:13:49 +0100
Last-Update: 2019-08-29
Author: Noah Meyerhans <noahm@debian.org>

Index: cloud-init/tools/read-version
===================================================================
--- cloud-init.orig/tools/read-version
+++ cloud-init/tools/read-version
@@ -23,15 +23,6 @@ def tiny_p(cmd):
 
 
 def is_gitdir(path):
-    # Return boolean indicating if path is a git tree.
-    git_meta = os.path.join(path, ".git")
-    if os.path.isdir(git_meta):
-        return True
-    if os.path.exists(git_meta):
-        # in a git worktree, .git is a file with 'gitdir: x'
-        with open(git_meta, "rb") as fp:
-            if b"gitdir:" in fp.read():
-                return True
     return False