A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/GitoxideLabs/gitoxide/commit/85a24b3a07f08bc83a3ef34c3f07ed00cdbd9fe2 below:

add `gitoxide.parsePrecious` configuration key to opt-in to pre… · GitoxideLabs/gitoxide@85a24b3 · GitHub

File tree Expand file treeCollapse file tree 5 files changed

+29

-6

lines changed

Filter options

Expand file treeCollapse file tree 5 files changed

+29

-6

lines changed Original file line number Diff line number Diff line change

@@ -396,11 +396,20 @@ impl Cache {

396 396

Some(user_path) => Some(user_path),

397 397

None => self.xdg_config_path("ignore")?,

398 398

};

399 +

let parse_ignore = gix_ignore::search::Ignore {

400 +

support_precious: boolean(

401 +

self,

402 +

"gitoxide.parsePrecious",

403 +

&config::tree::Gitoxide::PARSE_PRECIOUS,

404 +

false,

405 +

)?,

406 +

};

399 407

Ok(gix_worktree::stack::state::Ignore::new(

400 408

overrides.unwrap_or_default(),

401 -

gix_ignore::Search::from_git_dir(git_dir, excludes_file, buf)?,

409 +

gix_ignore::Search::from_git_dir(git_dir, excludes_file, buf, parse_ignore)?,

402 410

None,

403 411

source,

412 +

parse_ignore,

404 413

))

405 414

}

406 415

// TODO: at least one test, maybe related to core.attributesFile configuration.

Original file line number Diff line number Diff line change

@@ -357,10 +357,16 @@ fn apply_environment_overrides(

357 357

"gitoxide",

358 358

None,

359 359

git_prefix,

360 -

&[{

361 -

let key = &Gitoxide::TRACE_PACKET;

362 -

(env(key), key.name)

363 -

}],

360 +

&[

361 +

{

362 +

let key = &Gitoxide::TRACE_PACKET;

363 +

(env(key), key.name)

364 +

},

365 +

{

366 +

let key = &Gitoxide::PARSE_PRECIOUS;

367 +

(env(key), key.name)

368 +

},

369 +

],

364 370

),

365 371

(

366 372

"gitoxide",

Original file line number Diff line number Diff line change

@@ -239,6 +239,7 @@ pub mod command_context {

239 239 240 240

///

241 241

pub mod exclude_stack {

242 +

use crate::config;

242 243

use std::path::PathBuf;

243 244 244 245

/// The error produced when setting up a stack to query `gitignore` information.

@@ -251,6 +252,8 @@ pub mod exclude_stack {

251 252

EnvironmentPermission(#[from] gix_sec::permission::Error<PathBuf>),

252 253

#[error("The value for `core.excludesFile` could not be read from configuration")]

253 254

ExcludesFilePathInterpolation(#[from] gix_config::path::interpolate::Error),

255 +

#[error(transparent)]

256 +

ParsePreciousEnabled(#[from] config::boolean::Error),

254 257

}

255 258

}

256 259 Original file line number Diff line number Diff line change

@@ -36,6 +36,9 @@ impl Gitoxide {

36 36

/// The `gitoxide.tracePacket` Key.

37 37

pub const TRACE_PACKET: keys::Boolean = keys::Boolean::new_boolean("tracePacket", &config::Tree::GITOXIDE)

38 38

.with_environment_override("GIT_TRACE_PACKET");

39 +

/// The `gitoxide.parsePrecious` Key.

40 +

pub const PARSE_PRECIOUS: keys::Boolean = keys::Boolean::new_boolean("parsePrecious", &config::Tree::GITOXIDE)

41 +

.with_environment_override("GIX_PARSE_PRECIOUS");

39 42

}

40 43 41 44

impl Section for Gitoxide {

@@ -44,7 +47,7 @@ impl Section for Gitoxide {

44 47

}

45 48 46 49

fn keys(&self) -> &[&dyn Key] {

47 -

&[&Self::USER_AGENT, &Self::TRACE_PACKET]

50 +

&[&Self::USER_AGENT, &Self::TRACE_PACKET, &Self::PARSE_PRECIOUS]

48 51

}

49 52 50 53

fn sub_sections(&self) -> &[&dyn Section] {

Original file line number Diff line number Diff line change

@@ -52,6 +52,7 @@ mod with_overrides {

52 52

.set("GIT_AUTHOR_DATE", default_date)

53 53

.set("EMAIL", "user email")

54 54

.set("GIX_PACK_CACHE_MEMORY", "0")

55 +

.set("GIX_PARSE_PRECIOUS", "1")

55 56

.set("GIX_OBJECT_CACHE_MEMORY", "5m")

56 57

.set("GIX_CREDENTIALS_HELPER_STDERR", "creds-stderr")

57 58

.set("GIX_EXTERNAL_COMMAND_STDERR", "filter-stderr")

@@ -244,6 +245,7 @@ mod with_overrides {

244 245

("gitoxide.commit.authorDate", default_date),

245 246

("gitoxide.commit.committerDate", default_date),

246 247

("gitoxide.user.emailFallback", "user email"),

248 +

("gitoxide.parsePrecious", "1"),

247 249

("core.deltaBaseCacheLimit", "0"),

248 250

("gitoxide.objects.cacheLimit", "5m"),

249 251

("gitoxide.pathspec.icase", "pathspecs-icase"),

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4