summaryrefslogtreecommitdiff
path: root/t.py
diff options
context:
space:
mode:
Diffstat (limited to 't.py')
-rw-r--r--t.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/t.py b/t.py
new file mode 100644
index 00000000..560e420e
--- /dev/null
+++ b/t.py
@@ -0,0 +1,9 @@
+from git import Repo
+
+
+def get_active_branch(gitobj: Repo) -> str:
+ return gitobj.active_branch.name
+
+
+gitobj = Repo(".")
+print(get_active_branch(gitobj))