linuxinstaller/libreticmenu/libreticmenuBranch.py

15 lines
254 B
Python
Raw Normal View History

2024-09-30 19:32:52 +02:00
from git import Repo
import os
def getlibreticmenuBranch():
repo = Repo(os.getcwd())
branch = repo.active_branch
return branch.name
def setlibreticmenuBranch(branch):
repo = Repo(os.getcwd())
git = repo.git
git.switch(branch)