GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • g 0.0.9 documentation

This view

  • Original page
  • New address

GeezerVison is showing g.git-pull.com — Internal API

Internal API¶

Most users do not need this page. Start with Quickstart or CLI Reference if you only want the command-line wrapper.

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()
¶
function[source]
function[source]
g.create_parser()
¶

Create argument parser for g CLI.

Returns:

Configured argument parser for the g command.

Return type:

argparse.ArgumentParser

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=DEFAULT, cmd_args=DEFAULT, wait=False, *args, **kwargs)
¶
function[source]
function[source]
g.run(cmd=DEFAULT, cmd_args=DEFAULT, wait=False, *args, **kwargs)
¶

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.

Parameters:
  • cmd (str | bytes | PathLike[str] | PathLike[bytes] | object)

  • cmd_args (object)

  • wait (bool)

  • args (object)

  • kwargs (Any)

Return type:

Popen[str] | None

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.