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
06ea340a
"src/git@gitbio.ens-lyon.fr:fmortreu/nextflow.git" did not exist on "1e4f4848567ae80c6c91e9b1777e443301ba20e5"
Verified
Commit
06ea340a
authored
Jan 13, 2023
by
nfontrod
Browse files
Options
Downloads
Patches
Plain Diff
src/main.rs: handle remote module function
parent
01a2cfa9
No related branches found
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
+50
-8
50 additions, 8 deletions
src/main.rs
with
50 additions
and
8 deletions
src/main.rs
+
50
−
8
View file @
06ea340a
...
@@ -7,6 +7,7 @@ use configt::PartialPrune;
...
@@ -7,6 +7,7 @@ use configt::PartialPrune;
mod
checkout
;
mod
checkout
;
mod
commit
;
mod
commit
;
mod
compact
;
mod
compact
;
mod
config_structure
;
mod
configt
;
mod
configt
;
mod
create_hooks
;
mod
create_hooks
;
mod
delete
;
mod
delete
;
...
@@ -15,7 +16,7 @@ mod init;
...
@@ -15,7 +16,7 @@ mod init;
mod
list
;
mod
list
;
mod
mount
;
mod
mount
;
mod
prune
;
mod
prune
;
mod
config_structur
e
;
mod
remot
e
;
#[derive(Debug,
Parser)]
#[derive(Debug,
Parser)]
#[clap(name
=
"gblk"
)]
#[clap(name
=
"gblk"
)]
...
@@ -96,6 +97,9 @@ enum Commands {
...
@@ -96,6 +97,9 @@ enum Commands {
/// time interval without typing always the same prune command
/// time interval without typing always the same prune command
#[clap(subcommand)]
#[clap(subcommand)]
Config
(
Config
),
Config
(
Config
),
/// This command can be used to add a new remote for push and pull commands
#[clap(subcommand)]
Remote
(
Remote
),
}
}
#[derive(Debug,
Args)]
#[derive(Debug,
Args)]
...
@@ -230,11 +234,11 @@ enum Config {
...
@@ -230,11 +234,11 @@ enum Config {
#[derive(Debug,
Args)]
#[derive(Debug,
Args)]
struct
Add
{
struct
Add
{
/// The name of the
argument
to add, see optional arguments of the prune subcommands
/// The name of the
option
to add, see optional arguments of the prune subcommands
key
:
String
,
key
:
String
,
/// The value of the
argument
to add in the configuration file
/// The value of the
option
to add in the configuration file
value
:
String
,
value
:
String
,
/// Use this flag if you wan to add an
argument
in the global gblk
/// Use this flag if you wan to add an
option
in the global gblk
/// configuration file
/// configuration file
#[clap(short,
long,
takes_value
=
false
)]
#[clap(short,
long,
takes_value
=
false
)]
global
:
bool
,
global
:
bool
,
...
@@ -242,18 +246,49 @@ struct Add {
...
@@ -242,18 +246,49 @@ struct Add {
#[derive(Debug,
Args)]
#[derive(Debug,
Args)]
struct
Rm
{
struct
Rm
{
/// The name of the
argument
to remove, see optional arguments of the prune subcommands
/// The name of the
option
to remove, see optional arguments of the prune subcommands
key
:
String
,
key
:
String
,
/// Use this flag if you wan to remove an argument in the global gblk
/// Use this flag if you wan
t
to remove an argument in the global gblk
/// configuration file
/// configuration file
#[clap(short,
long,
takes_value
=
false
)]
#[clap(short,
long,
takes_value
=
false
)]
global
:
bool
,
global
:
bool
,
}
}
#[derive(Debug,
Args)]
#[derive(Debug,
Args)]
struct
Show
{
struct
Show
{
/// Use this flag if you wan to remove an argument in the global gblk
/// Use this flag if you want to show an argument in the global gblk
/// configuration file
#[clap(short,
long,
takes_value
=
false
)]
global
:
bool
,
}
#[derive(Debug,
Subcommand)]
enum
Remote
{
/// Add or update a remote in the configuration file
Add
(
RemoteAdd
),
/// Display globally and locally defined remotes
Show
,
/// Remove the configuration of a given key in prune
Rm
(
RemoteRm
),
}
#[derive(Debug,
Args)]
struct
RemoteAdd
{
/// The name of the remote to add
key
:
String
,
/// The path where the remote is pointing
value
:
String
,
/// Use this flag if you wan to add a remote in the global gblk
/// configuration file
#[clap(short,
long,
takes_value
=
false
)]
global
:
bool
,
}
#[derive(Debug,
Args)]
struct
RemoteRm
{
/// The name of the remote to remove
key
:
String
,
/// Use this flag if you want to remove the remote in the global gblk
/// configuration file
/// configuration file
#[clap(short,
long,
takes_value
=
false
)]
#[clap(short,
long,
takes_value
=
false
)]
global
:
bool
,
global
:
bool
,
...
@@ -332,5 +367,12 @@ fn main() {
...
@@ -332,5 +367,12 @@ fn main() {
Config
::
Rm
(
e
)
=>
configt
::
remove_config
(
&
e
.key
,
e
.global
),
Config
::
Rm
(
e
)
=>
configt
::
remove_config
(
&
e
.key
,
e
.global
),
Config
::
Prune
(
pp
)
=>
configt
::
launch_config_prune
(
pp
),
Config
::
Prune
(
pp
)
=>
configt
::
launch_config_prune
(
pp
),
},
},
Commands
::
Remote
(
remote
)
=>
match
remote
{
Remote
::
Add
(
e
)
=>
println!
(
"Not defined"
),
Remote
::
Show
=>
{
remote
::
show
();
}
Remote
::
Rm
(
e
)
=>
println!
(
"Not defined"
),
},
}
}
}
}
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