Skip to content

Commit

Permalink
add pull subcommand
Browse files Browse the repository at this point in the history
  • Loading branch information
nosarthur committed Apr 30, 2018
1 parent dea0911 commit ec73839
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ The supported commands are
* `gita ls <repo-name>`: display the absolute path of the specified repo
* `gita fetch`: fetch all remote updates
* `gita fetch <repo-name(s)>`: fetch remote updates for the specified repo(s)
* `gita pull <repo-name(s)>`: pull remote updates for the specified repo(s)
* `gita merge <repo-name(s)>`: merge remote updates for the specified repo(s)
* `gita push <repo-name(s)>`: push local updates of the specified repo(s) to remote

Expand Down
5 changes: 5 additions & 0 deletions gita/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ def main(argv=None):
help="fetch remote update for the chosen repo(s)")
p_fetch.set_defaults(func=f_git_cmd, cmd='git fetch')

p_pull = subparsers.add_parser('pull', help='pull remote updates')
p_pull.add_argument('repo', nargs='+', choices=utils.get_repos(),
help="pull remote update for the chosen repo(s)")
p_pull.set_defaults(func=f_git_cmd, cmd='git pull')

p_merge = subparsers.add_parser('merge', help='merge remote updates')
p_merge.add_argument('repo', nargs='+', choices=utils.get_repos(),
help="merge remote update for the chosen repo(s)")
Expand Down

0 comments on commit ec73839

Please sign in to comment.