Internal API¶
Note
These APIs are private and can break between versions. If you want to use them directly, file an issue on the tracker.
Package for g.
- g.create_parser()[source]¶
Create argument parser for g CLI.
- Return type:
- Returns:
Configured argument parser for the g command.
- Return type:
Examples
>>> parser = create_parser() >>> parser.prog 'g'
>>> args = parser.parse_args(['status']) >>> args.vcs_args ['status']
>>> args = parser.parse_args(['commit', '-m', 'message']) >>> args.vcs_args ['commit', '-m', 'message']
- g.run(cmd=<object object>, cmd_args=<object object>, wait=False, *args, **kwargs)[source]¶
CLI Entrypoint for g, overlay for current directory’s VCS utility.
Environment variables¶
- G_IS_TEST :
Control whether run() returns proc so function can be tested. If proc was always returned, it would print <Popen: returncode: 1 args: [‘git’]> after command.