…there really should be control over where to write them exactly
Showing the changes to src (4 of 10 files). Show all
Unified · Split
| @@ -53,12 +53,14 @@ pub fn main() -> Result<()> { · 52 unmodified lines | |||
| 53 | protocol, | 53 | protocol, |
| 54 | url, | 54 | url, |
| 55 | directory, | 55 | directory, |
| 56 | write_refs, | ||
| 56 | }) => { | 57 | }) => { |
| 57 | let (_handle, progress) = prepare(verbose, "pack-receive", core::pack::receive::PROGRESS_RANGE); | 58 | let (_handle, progress) = prepare(verbose, "pack-receive", core::pack::receive::PROGRESS_RANGE); |
| 58 | core::pack::receive( | 59 | core::pack::receive( |
| 59 | protocol, | 60 | protocol, |
| 60 | &url, | 61 | &url, |
| 61 | directory, | 62 | directory, |
| 63 | write_refs, | ||
| 62 | progress::DoOrDiscard::from(progress), | 64 | progress::DoOrDiscard::from(progress), |
| 63 | core::pack::receive::Context { | 65 | core::pack::receive::Context { |
| 64 | thread_limit, | 66 | thread_limit, |
| @@ -92,6 +92,10 @@ pub struct PackReceive { · 91 unmodified lines | |||
| 92 | #[argh(option, short = 'p')] | 92 | #[argh(option, short = 'p')] |
| 93 | pub protocol: Option<core::Protocol>, | 93 | pub protocol: Option<core::Protocol>, |
| 94 | 94 | ||
| 95 | /// write references to the given directory as well, right next to the pack and index file. | ||
| 96 | #[argh(switch, short = 'r')] | ||
| 97 | pub write_refs: bool, | ||
| 98 | |||
| 95 | /// the URLs or path from which to receive the pack. | 99 | /// the URLs or path from which to receive the pack. |
| 96 | /// | 100 | /// |
| 97 | /// See here for a list of supported URLs: https://www.git-scm.com/docs/git-clone#_git_urls | 101 | /// See here for a list of supported URLs: https://www.git-scm.com/docs/git-clone#_git_urls |
| @@ -127,6 +127,7 @@ pub fn main() -> Result<()> { · 126 unmodified lines | |||
| 127 | match cmd { | 127 | match cmd { |
| 128 | Subcommands::PackReceive { | 128 | Subcommands::PackReceive { |
| 129 | protocol, | 129 | protocol, |
| 130 | write_refs, | ||
| 130 | url, | 131 | url, |
| 131 | directory, | 132 | directory, |
| 132 | } => prepare_and_run( | 133 | } => prepare_and_run( |
| @@ -140,6 +141,7 @@ pub fn main() -> Result<()> { · 7 unmodified lines | |||
| 140 | protocol, | 141 | protocol, |
| 141 | &url, | 142 | &url, |
| 142 | directory, | 143 | directory, |
| 144 | write_refs, | ||
| 143 | git_features::progress::DoOrDiscard::from(progress), | 145 | git_features::progress::DoOrDiscard::from(progress), |
| 144 | core::pack::receive::Context { | 146 | core::pack::receive::Context { |
| 145 | thread_limit, | 147 | thread_limit, |
| @@ -49,6 +49,10 @@ pub enum Subcommands { · 48 unmodified lines | |||
| 49 | #[clap(long, short = "p")] | 49 | #[clap(long, short = "p")] |
| 50 | protocol: Option<core::Protocol>, | 50 | protocol: Option<core::Protocol>, |
| 51 | 51 | ||
| 52 | /// Write references to the given directory as well, right next to the pack and index file. | ||
| 53 | #[clap(long, short = "r")] | ||
| 54 | write_refs: bool, | ||
| 55 | |||
| 52 | /// The URLs or path from which to receive the pack. | 56 | /// The URLs or path from which to receive the pack. |
| 53 | /// | 57 | /// |
| 54 | /// See here for a list of supported URLs: https://www.git-scm.com/docs/git-clone#_git_urls | 58 | /// See here for a list of supported URLs: https://www.git-scm.com/docs/git-clone#_git_urls |