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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LBMC
Hub
git_borg_linker
Commits
f0092367
Commit
f0092367
authored
1 year ago
by
nfontrod
Browse files
Options
Downloads
Patches
Plain Diff
src/push.rs: function order change
parent
e1744280
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/push.rs
+17
-14
17 additions, 14 deletions
src/push.rs
with
17 additions
and
14 deletions
src/push.rs
+
17
−
14
View file @
f0092367
...
@@ -54,19 +54,6 @@ fn check_glob_exist_local(remote_file: &PathBuf) -> Option<PathBuf> {
...
@@ -54,19 +54,6 @@ fn check_glob_exist_local(remote_file: &PathBuf) -> Option<PathBuf> {
}
}
}
}
/// Function that checks if a glob file exists and return the first path found
/// if it's the case
///
/// # Arguments
/// - `remote_file`: The remote glob located by the remote
/// - `adress`: The adress of the remote folder
fn
check_glob_file_exists
(
remote_file
:
&
PathBuf
,
adress
:
&
str
)
->
Option
<
PathBuf
>
{
if
adress
==
"file"
{
check_glob_exist_local
(
remote_file
)
}
else
{
check_glob_file_exist_remote
(
remote_file
,
adress
)
}
}
/// Function that check if a dir exist on a remote filesystem
/// Function that check if a dir exist on a remote filesystem
/// # Arguments
/// # Arguments
...
@@ -94,6 +81,22 @@ fn check_glob_file_exist_remote(remote_tar: &PathBuf, adress: &str) -> Option<Pa
...
@@ -94,6 +81,22 @@ fn check_glob_file_exist_remote(remote_tar: &PathBuf, adress: &str) -> Option<Pa
}
}
}
}
/// Function that checks if a glob file exists and return the first path found
/// if it's the case
///
/// # Arguments
/// - `remote_file`: The remote glob located by the remote
/// - `adress`: The adress of the remote folder
fn
check_glob_file_exists
(
remote_file
:
&
PathBuf
,
adress
:
&
str
)
->
Option
<
PathBuf
>
{
if
adress
==
"file"
{
check_glob_exist_local
(
remote_file
)
}
else
{
check_glob_file_exist_remote
(
remote_file
,
adress
)
}
}
/// Function that check if a dir exist on a remote filesystem
/// Function that check if a dir exist on a remote filesystem
/// # Arguments
/// # Arguments
/// - `remote_dir`: The remote dir located by the remote
/// - `remote_dir`: The remote dir located by the remote
...
@@ -145,7 +148,7 @@ pub(crate) fn handle_existing_remote_file(
...
@@ -145,7 +148,7 @@ pub(crate) fn handle_existing_remote_file(
adress
:
&
str
,
adress
:
&
str
,
cmd
:
&
str
,
cmd
:
&
str
,
)
->
PathBuf
{
)
->
PathBuf
{
let
archive
=
remote_file
.file_stem
()
.unwrap
()
.to_str
()
.unwrap
();
let
archive
=
remote_file
.file_stem
()
.unwrap
()
.to_str
()
.unwrap
()
.split
(
'.'
)
.collect
::
<
Vec
<
_
>>
()[
0
]
;
let
filename_glob
=
remote_file
let
filename_glob
=
remote_file
.parent
()
.parent
()
.unwrap
()
.unwrap
()
...
...
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