A full change hash resolves without its # aa4939e07a09
A change named by its full 64-digit hash without the #, as bookmark show
--json and the hub's API print heads, resolves wherever a change is
named; 64 hex digits cannot be a ChangeId, which has 32. JSON output
now feeds back into bookmark set, bookmark create and checkout.
closes #103
- **Full hashes as `--json` prints them (#103).** A change named by its full 64-digit hash without the `#`, as `oxy bookmark show --json` and the hub's API print heads, resolves wherever a change is named (`bookmark set`, `bookmark create`, `checkout`, …), so JSON output feeds back into commands.
6
+
5
7
- **Large new files are not snapshotted unseen, and past snapshots expire (#98).** A 1 GB image left untracked in a working tree was taken in by the next `status` and kept by the operation log for good: deleting the file and running `gc --now` freed nothing. Now a new, untracked file over `snapshot.max-new-file-size` (default 100 MiB) is left out and named by `status`, with how to ignore it or raise the limit; tracked files and files already in the working copy are unaffected. Past working-copy snapshots keep their files only for `core.snapshot-retention` (default 7 days), so `gc` prunes what only they held, and `oxy gc --expire-snapshots --now` does it at once. `undo` and `op restore` to an operation whose working copy has expired keep the files as they are.
6
8
7
9
- **`oxy undo` undoes this workspace's last command (#99).** It undid the repository's newest operation, whichever workspace made it: in a repository with several workspaces an undo could take back another workspace's commit or merge, and it said only which operation it went back to. Operations now record their workspace, and undo takes back this workspace's last command, leaving other workspaces' work as it is. On a bookmark both share, only its own heads go; a change another workspace built on it, or the workspace it would take away, refuses the undo and names it. Undo now says which command it undid and what that changed, passes over pushes (the remote keeps what it was sent), and warns when an undone commit is already on a remote. `oxy amend` warns when it rewrites a change a remote already has, so the next push will need `--force`.
…
172 unchanged lines
modifiedcrates/oxy-core/src/repo/mod.rs+5−1
…
2479 unchanged lines
2480
2480
return fail("empty change specifier");
2481
2481
}
2482
2482
let entries = self.log()?;
2483
-
let matches: Vec<&LogEntry> = if let Some(hp) = spec.strip_prefix('#') {
2483
+
// A full hash as `--json` prints it, without its `#`: 64 hex digits
2484
+
// cannot be a ChangeId, which has 32 (oxygen#103).