Skip to content

Commit

Permalink
support clone -g option to add cloned repo to a group (#258)
Browse files Browse the repository at this point in the history
  • Loading branch information
nosarthur authored Jul 18, 2023
1 parent 25a2ea0 commit 54671cc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gita/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ def f_clone(args: argparse.Namespace):

if not args.from_file:
subprocess.run(["git", "clone", args.clonee], cwd=path)
# add the cloned repo to gita; group is also supported
cloned_path = os.path.join(path, args.clonee.split("/")[-1].split(".")[0])
args.paths = [cloned_path]
args.recursive = args.auto_group = args.bare = args.skip_submodule = False
f_add(args)
return

if args.preserve_path:
Expand Down

0 comments on commit 54671cc

Please sign in to comment.