Adding upstream version 0.15.9.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
495df48c0a
commit
203fae4667
4 changed files with 21 additions and 4 deletions
2
.github/workflows/nos.yml
vendored
2
.github/workflows/nos.yml
vendored
|
@ -23,3 +23,5 @@ jobs:
|
||||||
- name: Pytest
|
- name: Pytest
|
||||||
run: |
|
run: |
|
||||||
pytest tests --cov=./gita
|
pytest tests --cov=./gita
|
||||||
|
- name: Upload coverage to Codecov
|
||||||
|
uses: codecov/codecov-action@v2
|
||||||
|
|
|
@ -361,7 +361,7 @@ Thus the installed git version may matter.
|
||||||
I have git `1.8.3.1`, `2.17.2`, and `2.20.1` on my machines, and
|
I have git `1.8.3.1`, `2.17.2`, and `2.20.1` on my machines, and
|
||||||
their results agree.
|
their results agree.
|
||||||
|
|
||||||
## tips
|
## Tips
|
||||||
|
|
||||||
effect | shell command
|
effect | shell command
|
||||||
---|---
|
---|---
|
||||||
|
|
|
@ -58,6 +58,7 @@ def _path_name(name: str) -> str:
|
||||||
def f_add(args: argparse.Namespace):
|
def f_add(args: argparse.Namespace):
|
||||||
repos = utils.get_repos()
|
repos = utils.get_repos()
|
||||||
paths = args.paths
|
paths = args.paths
|
||||||
|
groups = utils.get_groups()
|
||||||
if 0:
|
if 0:
|
||||||
# add to global and tag as main
|
# add to global and tag as main
|
||||||
main_repos = utils.add_repos(repos, paths, repo_type='m')
|
main_repos = utils.add_repos(repos, paths, repo_type='m')
|
||||||
|
@ -79,6 +80,13 @@ def f_add(args: argparse.Namespace):
|
||||||
if new_groups:
|
if new_groups:
|
||||||
print(f'Created {len(new_groups)} new group(s).')
|
print(f'Created {len(new_groups)} new group(s).')
|
||||||
utils.write_to_groups_file(new_groups, 'a+')
|
utils.write_to_groups_file(new_groups, 'a+')
|
||||||
|
if new_repos and args.group:
|
||||||
|
gname = args.group
|
||||||
|
gname_repos = set(groups[gname]['repos'])
|
||||||
|
gname_repos.update(new_repos)
|
||||||
|
groups[gname]['repos'] = sorted(gname_repos)
|
||||||
|
print(f'Added {len(new_repos)} repos to the {gname} group')
|
||||||
|
utils.write_to_groups_file(groups, 'w')
|
||||||
|
|
||||||
|
|
||||||
def f_rename(args: argparse.Namespace):
|
def f_rename(args: argparse.Namespace):
|
||||||
|
@ -112,6 +120,8 @@ def f_color(args: argparse.Namespace):
|
||||||
writer = csv.DictWriter(f, fieldnames=colors)
|
writer = csv.DictWriter(f, fieldnames=colors)
|
||||||
writer.writeheader()
|
writer.writeheader()
|
||||||
writer.writerow(colors)
|
writer.writerow(colors)
|
||||||
|
elif cmd == 'reset':
|
||||||
|
Path(common.get_config_fname('color.csv')).unlink(missing_ok=True)
|
||||||
|
|
||||||
|
|
||||||
def f_info(args: argparse.Namespace):
|
def f_info(args: argparse.Namespace):
|
||||||
|
@ -389,6 +399,9 @@ def main(argv=None):
|
||||||
p_add = subparsers.add_parser('add', description='add repo(s)',
|
p_add = subparsers.add_parser('add', description='add repo(s)',
|
||||||
help='add repo(s)')
|
help='add repo(s)')
|
||||||
p_add.add_argument('paths', nargs='+', type=_path_name, help="repo(s) to add")
|
p_add.add_argument('paths', nargs='+', type=_path_name, help="repo(s) to add")
|
||||||
|
p_add.add_argument('-g','--group',
|
||||||
|
choices=utils.get_groups(),
|
||||||
|
help="add repo(s) to the specified group")
|
||||||
xgroup = p_add.add_mutually_exclusive_group()
|
xgroup = p_add.add_mutually_exclusive_group()
|
||||||
xgroup.add_argument('-r', '--recursive', action='store_true',
|
xgroup.add_argument('-r', '--recursive', action='store_true',
|
||||||
help="recursively add repo(s) in the given path(s).")
|
help="recursively add repo(s) in the given path(s).")
|
||||||
|
@ -455,6 +468,8 @@ def main(argv=None):
|
||||||
help='additional help with sub-command -h')
|
help='additional help with sub-command -h')
|
||||||
color_cmds.add_parser('ll',
|
color_cmds.add_parser('ll',
|
||||||
description='display available colors and the current branch coloring in the ll sub-command')
|
description='display available colors and the current branch coloring in the ll sub-command')
|
||||||
|
color_cmds.add_parser('reset',
|
||||||
|
description='reset color scheme.')
|
||||||
pc_set = color_cmds.add_parser('set',
|
pc_set = color_cmds.add_parser('set',
|
||||||
description='Set color for local/remote situation.')
|
description='Set color for local/remote situation.')
|
||||||
pc_set.add_argument('situation',
|
pc_set.add_argument('situation',
|
||||||
|
@ -594,8 +609,8 @@ def main(argv=None):
|
||||||
'man',
|
'man',
|
||||||
nargs=argparse.REMAINDER,
|
nargs=argparse.REMAINDER,
|
||||||
help="execute arbitrary git command/alias for specified repo(s), group(s), or all repos.\n"
|
help="execute arbitrary git command/alias for specified repo(s), group(s), or all repos.\n"
|
||||||
"Example: gita super myrepo1 diff --name-only --staged\n"
|
"Example: gita super repo1 diff --name-only --staged;\n"
|
||||||
"Another: gita super checkout master ")
|
"gita super checkout master ")
|
||||||
p_super.set_defaults(func=f_super)
|
p_super.set_defaults(func=f_super)
|
||||||
|
|
||||||
# shell mode
|
# shell mode
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -7,7 +7,7 @@ with open('README.md', encoding='utf-8') as f:
|
||||||
setup(
|
setup(
|
||||||
name='gita',
|
name='gita',
|
||||||
packages=['gita'],
|
packages=['gita'],
|
||||||
version='0.15.7.3',
|
version='0.15.8',
|
||||||
license='MIT',
|
license='MIT',
|
||||||
description='Manage multiple git repos with sanity',
|
description='Manage multiple git repos with sanity',
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue