Skip to content

Commit

Permalink
Merge pull request #431 from ywangd/git-430
Browse files Browse the repository at this point in the history
Fix suffix stripping of git repo url
  • Loading branch information
ywangd authored Feb 14, 2021
2 parents 6f8527e + b7d31f0 commit 773d15b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bin/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,13 @@ def git_commit(args):
def git_clone(args):
if len(args) > 0:
url = args[0]
repo = Gittle.clone(args[0], args[1] if len(args) > 1 else os.path.split(args[0])[-1].rstrip('.git'), bare=False)
if len(args) > 1:
args_1 = args[1]
else:
args_1 = os.path.split(args[0])[-1]
if args_1.endswith('.git'):
args_1 = args_1[:-4]
repo = Gittle.clone(args[0], args_1, bare=False)

#Set the origin
config = repo.repo.get_config()
Expand Down

0 comments on commit 773d15b

Please sign in to comment.