…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 | 53 | protocol, |
| 54 | 54 | url, |
| 55 | 55 | directory, |
| 56 | + write_refs, | |
| 56 | 57 | }) => { |
| 57 | 58 | let (_handle, progress) = prepare(verbose, "pack-receive", core::pack::receive::PROGRESS_RANGE); |
| 58 | 59 | core::pack::receive( |
| 59 | 60 | protocol, |
| 60 | 61 | &url, |
| 61 | 62 | directory, |
| 63 | + write_refs, | |
| 62 | 64 | progress::DoOrDiscard::from(progress), |
| 63 | 65 | core::pack::receive::Context { |
| 64 | 66 | thread_limit, |
| @@ -92,6 +92,10 @@ pub struct PackReceive { · 91 unmodified lines | ||
| 92 | 92 | #[argh(option, short = 'p')] |
| 93 | 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 | 99 | /// the URLs or path from which to receive the pack. |
| 96 | 100 | /// |
| 97 | 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 | 127 | match cmd { |
| 128 | 128 | Subcommands::PackReceive { |
| 129 | 129 | protocol, |
| 130 | + write_refs, | |
| 130 | 131 | url, |
| 131 | 132 | directory, |
| 132 | 133 | } => prepare_and_run( |
| @@ -140,6 +141,7 @@ pub fn main() -> Result<()> { · 7 unmodified lines | ||
| 140 | 141 | protocol, |
| 141 | 142 | &url, |
| 142 | 143 | directory, |
| 144 | + write_refs, | |
| 143 | 145 | git_features::progress::DoOrDiscard::from(progress), |
| 144 | 146 | core::pack::receive::Context { |
| 145 | 147 | thread_limit, |
| @@ -49,6 +49,10 @@ pub enum Subcommands { · 48 unmodified lines | ||
| 49 | 49 | #[clap(long, short = "p")] |
| 50 | 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 | 56 | /// The URLs or path from which to receive the pack. |
| 53 | 57 | /// |
| 54 | 58 | /// See here for a list of supported URLs: https://www.git-scm.com/docs/git-clone#_git_urls |