Skip to content

Commit

Permalink
Rename "report" to "ignore" and update comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
wrzian committed Sep 16, 2024
1 parent 76524dd commit 5ed90ba
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 101 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
* `jj op undo` now reports information on the operation that has been undone.

* Updated how we handle executable bits in the working copy to allow unix to
disable reporting executable bit changes if they're using a nonstandard
filesystem. We try to detect this on unix by default, but it can be overrident
manually by setting `core.report-executable-bit = false`.
ignore executable bit changes when using a nonstandard filesystem. We try to
detect the filesystem's behavior on unix by default, but it can be overrident
manually by setting `core.ignore-executable-bit = false`.

### Fixed bugs

Expand Down
4 changes: 2 additions & 2 deletions cli/src/config-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@
}
}
},
"report-executable-bit": {
"ignore-executable-bit": {
"type": "boolean",
"description": "Whether to report changes to the executable bit for files on unix. This is ignored on windows."
"description": "Whether to ignore changes to the executable bit for files on unix. This is always true on windows"
}
}
},
Expand Down
4 changes: 2 additions & 2 deletions cli/src/merge_tools/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use jj_lib::matchers::Matcher;
use jj_lib::merged_tree::MergedTree;
use jj_lib::repo_path::RepoPath;
use jj_lib::repo_path::RepoPathBuf;
use jj_lib::settings::report_executable_bit;
use jj_lib::settings::ignore_executable_bit;
use jj_lib::settings::ConfigResultExt as _;
use jj_lib::settings::UserSettings;
use jj_lib::working_copy::SnapshotError;
Expand Down Expand Up @@ -192,7 +192,7 @@ impl DiffEditor {
) -> Result<Self, MergeToolConfigError> {
let tool = get_tool_config(settings, name)?
.unwrap_or_else(|| MergeTool::external(ExternalMergeTool::with_program(name)));
let exec_config = report_executable_bit(settings.config());
let exec_config = ignore_executable_bit(settings.config());
Self::new_inner(tool, settings, base_ignores, exec_config)
}

Expand Down
4 changes: 2 additions & 2 deletions cli/src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use std::thread::JoinHandle;

use indoc::indoc;
use itertools::Itertools as _;
use jj_lib::settings::report_executable_bit;
use jj_lib::settings::ignore_executable_bit;
use minus::MinusError;
use minus::Pager as MinusPager;
use tracing::instrument;
Expand Down Expand Up @@ -368,7 +368,7 @@ impl Ui {
paginate: pagination_setting(config)?,
progress_indicator,
output: UiOutput::new_terminal(),
exec_config: report_executable_bit(config),
exec_config: ignore_executable_bit(config),
})
}

Expand Down
27 changes: 15 additions & 12 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -951,24 +951,27 @@ snapshots on filestem changes by setting
You can check whether Watchman is enabled and whether it is installed correctly
using `jj debug watchman status`.

## Report executable bit
## Ignore the executable bit

`core.report-executable-bit = true | false`
`core.ignore-executable-bit = true | false`

Whether to report changes to the executable bit for files on unix. On windows
there is no executable bit and this config is completely ignored.
TODO: rest

Whether to ignore changes to the executable bit for files on unix. On windows
there is no executable bit and this config is unused.

On unix we determine the default value by querying the filesystem as to whether
executable bits are supported. If they are, we will report changes to files'
executable bit and update the repository. Otherwise we will only update files if
they are manually changed via `jj file chmod`.
executable bits are supported. If they are, we will not ignore them and changing
a files' executable bit will update the repository. If they are not supported we
will only update files through manual changes via `jj file chmod`.

On unix setting this to `false` will disable executable bit reporting and
setting it to `true` will enable it regardless of our filesystem check. This can
be useful for users dual-booting windows or experimenting with nonstandard
filesystems.
On unix setting this to `true` will ignore executable bits on files and setting
it to `false` will respect executable bits on files regardless of our filesystem
check. This can be useful for users dual-booting windows or experimenting with
nonstandard filesystems.

You can manually update an executable bit with `jj file chmod x <paths>` or
You can manually update an executable bit for a file on either unix or windows
regardless of this setting with `jj file chmod x <paths>` or
`jj file chmod x <paths>`.

## Snapshot settings
Expand Down
Loading

0 comments on commit 5ed90ba

Please sign in to comment.