Merging upstream version 0.16.2.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
e5b13b4219
commit
00055ea0b5
8 changed files with 832 additions and 588 deletions
750
gita/__main__.py
750
gita/__main__.py
File diff suppressed because it is too large
Load diff
|
@ -47,6 +47,7 @@
|
|||
},
|
||||
"push":{
|
||||
"cmd": "git push",
|
||||
"allow_all": true,
|
||||
"help": "push the local updates"
|
||||
},
|
||||
"rebase":{
|
||||
|
|
|
@ -279,6 +279,7 @@ def _make_name(path: str, repos: Dict[str, Dict[str, str]],
|
|||
def add_repos(repos: Dict[str, Dict[str, str]], new_paths: List[str],
|
||||
include_bare=False,
|
||||
exclude_submodule=False,
|
||||
dry_run=False,
|
||||
) -> Dict[str, Dict[str, str]]:
|
||||
"""
|
||||
Write new repo paths to file; return the added repos.
|
||||
|
@ -291,6 +292,10 @@ def add_repos(repos: Dict[str, Dict[str, str]], new_paths: List[str],
|
|||
new_repos = {}
|
||||
if new_paths:
|
||||
print(f"Found {len(new_paths)} new repo(s).")
|
||||
if dry_run:
|
||||
for p in new_paths:
|
||||
print(p)
|
||||
return {}
|
||||
name_counts = Counter(
|
||||
os.path.basename(os.path.normpath(p)) for p in new_paths
|
||||
)
|
||||
|
@ -453,14 +458,14 @@ def get_cmds_from_files() -> Dict[str, Dict[str, str]]:
|
|||
return cmds
|
||||
|
||||
|
||||
def parse_repos_and_rest(input: List[str]
|
||||
def parse_repos_and_rest(input: List[str], quote_mode=False,
|
||||
) -> Tuple[Dict[str, Dict[str, str]], List[str]]:
|
||||
"""
|
||||
Parse gita input arguments
|
||||
|
||||
@return: repos and the rest (e.g., gita shell and super commands)
|
||||
"""
|
||||
i = None
|
||||
i = 0
|
||||
names = []
|
||||
repos = get_repos()
|
||||
groups = get_groups()
|
||||
|
@ -475,6 +480,10 @@ def parse_repos_and_rest(input: List[str]
|
|||
i += 1
|
||||
if not names and ctx:
|
||||
names = [ctx.stem]
|
||||
if quote_mode and i + 1 != len(input):
|
||||
print(input[i], 'is not a repo or group' )
|
||||
sys.exit(2)
|
||||
|
||||
if names:
|
||||
chosen = {}
|
||||
for k in names:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue