File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change
1
+ //! Utilities to handle program arguments and other values of interest.
1
2
use std:: ffi:: { OsStr , OsString } ;
2
3
3
4
use crate :: bstr:: { BString , ByteVec } ;
4
5
6
+ /// Returns the name of the agent for identification towards a remote server as statically known when compiling the crate.
7
+ /// Suitable for both `git` servers and HTTP servers, and used unless configured otherwise.
8
+ ///
9
+ /// Note that it's meant to be used in conjunction with [`protocol::fetch::agent()`][crate::protocol::fetch::agent()] which
10
+ /// prepends `git/`.
11
+ pub fn agent ( ) -> & ' static str {
12
+ concat ! ( "oxide-" , env!( "CARGO_PKG_VERSION" ) )
13
+ }
14
+
5
15
/// Equivalent to `std::env::args_os()`, but with precomposed unicode on MacOS and other apple platforms.
6
16
#[ cfg( not( target_vendor = "apple" ) ) ]
7
17
pub fn args_os ( ) -> impl Iterator < Item = OsString > {
Original file line number Diff line number Diff line change @@ -338,7 +338,6 @@ pub mod state {
338
338
///
339
339
pub mod discover;
340
340
341
- ///
342
341
pub mod env;
343
342
344
343
mod kind;
You can’t perform that action at this time.
0 commit comments