Skip to content

Commit 3c786e8

Browse files
committed
Added branch name back to command-line usage
I inadvertently removed the command-line usage of the tool. This works now: gitpuller [-h] git_url [branch_name] [repo_dir]
1 parent 3280fdd commit 3c786e8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

nbgitpuller/pull.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,11 +303,13 @@ def main():
303303

304304
parser = argparse.ArgumentParser(description='Synchronizes a github repository with a local repository.')
305305
parser.add_argument('git_url', help='Url of the repo to sync')
306+
parser.add_argument('branch_name', default='master', help='Branch of repo to sync', nargs='?')
306307
parser.add_argument('repo_dir', default='.', help='Path to clone repo under', nargs='?')
307308
args = parser.parse_args()
308309

309310
for line in GitPuller(
310311
args.git_url,
311-
args.repo_dir
312+
args.repo_dir,
313+
branch=args.branch_name
312314
).pull():
313315
print(line)

0 commit comments

Comments
 (0)