diff --git a/src/main.rs b/src/main.rs index 1d13e6a..11803f6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -88,6 +88,13 @@ enum Opts { )] hidden: bool, + #[structopt( + short = "G", + long = "no-transfer-git", + help = "Do not transfer .git. Note that .git is hidden so .git is transferred only if --transfer-hidden is set and --no-transfer-git is not set" + )] + no_transfer_git: bool, + #[structopt(help = "cargo command that will be executed remotely")] command: String, @@ -110,6 +117,7 @@ fn main() { no_copy_lock, manifest_path, hidden, + no_transfer_git, command, options, } = Opts::from_args(); @@ -161,6 +169,10 @@ fn main() { rsync_to.arg("--exclude").arg(".*"); } + if no_transfer_git { + rsync_to.arg("--exclude").arg(".git"); + } + rsync_to .arg("--rsync-path") .arg("mkdir -p remote-builds && rsync")