File tree Expand file tree Collapse file tree 3 files changed +61
-0
lines changed Expand file tree Collapse file tree 3 files changed +61
-0
lines changed Original file line number Diff line number Diff line change @@ -260,6 +260,7 @@ def main(
260
260
app .command ()(git_sim .commands .pull )
261
261
app .command ()(git_sim .commands .push )
262
262
app .command ()(git_sim .commands .rebase )
263
+ app .command ()(git_sim .commands .remote )
263
264
app .command ()(git_sim .commands .reset )
264
265
app .command ()(git_sim .commands .restore )
265
266
app .command ()(git_sim .commands .revert )
Original file line number Diff line number Diff line change @@ -264,6 +264,26 @@ def rebase(
264
264
handle_animations (scene = scene )
265
265
266
266
267
+ def remote (
268
+ action : str = typer .Argument (
269
+ default = None ,
270
+ help = "The action to perform for the remote" ,
271
+ ),
272
+ remote : str = typer .Argument (
273
+ default = None ,
274
+ help = "The name of the remote" ,
275
+ ),
276
+ url_or_path : str = typer .Argument (
277
+ default = None ,
278
+ help = "The url or path to the remote" ,
279
+ ),
280
+ ):
281
+ from git_sim .remote import Remote
282
+
283
+ scene = Remote (action = action , remote = remote , url_or_path = url_or_path )
284
+ handle_animations (scene = scene )
285
+
286
+
267
287
def reset (
268
288
commit : str = typer .Argument (
269
289
default = "HEAD" ,
Original file line number Diff line number Diff line change
1
+ import sys
2
+ import os
3
+ import git
4
+ import numpy
5
+ import tempfile
6
+ import shutil
7
+ import stat
8
+ import re
9
+
10
+ import manim as m
11
+
12
+ from typing import List
13
+ from argparse import Namespace
14
+
15
+ from git .exc import GitCommandError , InvalidGitRepositoryError
16
+ from git .repo import Repo
17
+
18
+ from git_sim .git_sim_base_command import GitSimBaseCommand
19
+ from git_sim .settings import settings
20
+
21
+
22
+ class Remote (GitSimBaseCommand ):
23
+ def __init__ (self , action : str , remote : str , url_or_path : str ):
24
+ super ().__init__ ()
25
+ self .action = action
26
+ self .remote = remote
27
+ self .url_or_path = url_or_path
28
+ self .cmd += f"{ type (self ).__name__ .lower ()} { self .action } { self .remote } { self .url_or_path } "
29
+
30
+ def construct (self ):
31
+ if not settings .stdout and not settings .output_only_path and not settings .quiet :
32
+ print (f"{ settings .INFO_STRING } { self .cmd } " )
33
+
34
+ self .show_intro ()
35
+ #self.recenter_frame()
36
+ #self.scale_frame()
37
+ #self.add_details(repo_name)
38
+ self .show_command_as_title ()
39
+ self .fadeout ()
40
+ self .show_outro ()
You can’t perform that action at this time.
0 commit comments