Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
git_borg_linker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LBMC
Hub
git_borg_linker
Commits
b7da81e2
Verified
Commit
b7da81e2
authored
Jan 31, 2023
by
nfontrod
Browse files
Options
Downloads
Patches
Plain Diff
src/main.rs: add push and pull commands
parent
daea2737
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main.rs
+13
-2
13 additions, 2 deletions
src/main.rs
with
13 additions
and
2 deletions
src/main.rs
+
13
−
2
View file @
b7da81e2
...
@@ -7,7 +7,6 @@ use configt::PartialPrune;
...
@@ -7,7 +7,6 @@ use configt::PartialPrune;
mod
checkout
;
mod
checkout
;
mod
commit
;
mod
commit
;
mod
compact
;
mod
compact
;
mod
push
;
mod
config_structure
;
mod
config_structure
;
mod
configt
;
mod
configt
;
mod
create_hooks
;
mod
create_hooks
;
...
@@ -17,6 +16,8 @@ mod init;
...
@@ -17,6 +16,8 @@ mod init;
mod
list
;
mod
list
;
mod
mount
;
mod
mount
;
mod
prune
;
mod
prune
;
mod
pull
;
mod
push
;
mod
remote
;
mod
remote
;
#[derive(Debug,
Parser)]
#[derive(Debug,
Parser)]
...
@@ -102,8 +103,9 @@ enum Commands {
...
@@ -102,8 +103,9 @@ enum Commands {
#[clap(subcommand)]
#[clap(subcommand)]
Remote
(
Remote
),
Remote
(
Remote
),
/// This command can be used to push a repository using a remote
/// This command can be used to push a repository using a remote
/// #[clap(subcommand)]
Push
(
Push
),
Push
(
Push
),
/// This command can be used to pull a repository using a remote
Pull
(
Pull
),
}
}
#[derive(Debug,
Args)]
#[derive(Debug,
Args)]
...
@@ -304,6 +306,12 @@ struct Push {
...
@@ -304,6 +306,12 @@ struct Push {
key
:
String
,
key
:
String
,
}
}
#[derive(Debug,
Args)]
struct
Pull
{
/// The name of the remote to use
key
:
String
,
}
fn
main
()
{
fn
main
()
{
let
args
=
Cli
::
parse
();
let
args
=
Cli
::
parse
();
...
@@ -387,5 +395,8 @@ fn main() {
...
@@ -387,5 +395,8 @@ fn main() {
Commands
::
Push
(
p
)
=>
{
Commands
::
Push
(
p
)
=>
{
push
::
push
(
&
p
.key
);
push
::
push
(
&
p
.key
);
}
}
Commands
::
Pull
(
p
)
=>
{
pull
::
pull
(
&
p
.key
);
}
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment