Skip to content

Commit 386673c

Browse files
committed
Less ambiguous name for 'index-from-pack': 'pack-index-from-data'
1 parent c9e62c5 commit 386673c

File tree

14 files changed

+17
-17
lines changed

14 files changed

+17
-17
lines changed

Diff for: CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### v0.3
22

3-
* add `pack-explode` and `index-from-pack` sub-commands
3+
* add `pack-explode` and `pack-index-from-data` sub-commands
44
* massive speed improvements for `pack-verify`
55

66
Many small and possibly breaking changes are not mentioned here.

Diff for: Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ $(linux_repo):
126126
stress: ## Run various algorithms on big repositories
127127
$(MAKE) -j3 $(linux_repo) $(rust_repo) release-lean
128128
time ./target/release/gixp --verbose pack-verify --re-encode $(linux_repo)/objects/pack/*.idx
129-
mkdir out && time ./target/release/gixp --verbose index-from-pack -p $(linux_repo)/objects/pack/*.pack out/
129+
mkdir out && time ./target/release/gixp --verbose pack-index-from-data -p $(linux_repo)/objects/pack/*.pack out/
130130
time ./target/release/gixp --verbose pack-verify out/*.idx
131131

132132
time ./target/release/gixp --verbose pack-verify --statistics $(rust_repo)/objects/pack/*.idx

Diff for: git-protocol/src/packet_line/read.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ where
6868
}
6969
}
7070

71-
pub fn to_read_with_sidebands<P: Progress>(&mut self, progress: P) -> ToRead<T, P> {
71+
pub fn as_read_with_sidebands<P: Progress>(&mut self, progress: P) -> ToRead<T, P> {
7272
ToRead::new(self, progress)
7373
}
7474
}

Diff for: git-protocol/tests/packet_line/read.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ mod to_read {
2222
assert_eq!(exhaust(&mut rd), 2);
2323
rd.reset();
2424
assert_eq!(rd.read_line()??.to_text().0.as_bstr(), b"NAK".as_bstr());
25-
let pack_read = rd.to_read_with_sidebands(git_features::progress::Discard);
25+
let pack_read = rd.as_read_with_sidebands(git_features::progress::Discard);
2626
let pack_entries = pack::data::Iter::new_from_header(
2727
pack_read,
2828
pack::data::iter::Mode::Verify,

Diff for: performance-tasks.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
that could be used for the improved cache. With the current cache and no sorted offsets, the time nearly triples.
1212
* [ ] _progress measuring costs when using 96 cores_ (see [this comment][josh-aug-12])
1313
* potential savings: low
14-
* [ ] Add '--chunk|batch-size' flag to `pack-verify` and `index-from-pack` to allow tuning sizes for large amounts of cores
14+
* [ ] Add '--chunk|batch-size' flag to `pack-verify` and `pack-index-from-data` to allow tuning sizes for large amounts of cores
1515
* @joshtriplett write: "I did find that algorithm when I was looking for the chunk size, though I didn't dig into the details. As a quick hack, I tried dropping the upper number from 1000 to 250, which made no apparent difference in performance."
1616
* potential savings: ~~medium~~ unclear
1717
* [ ] On 96 core machines, it takes visible time until all threads are started and have work. Is it because starting 100 threads takes so long? Or is it contention to get work?

Diff for: src/plumbing/lean.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ mod options {
3636
///
3737
/// This command can also be used to stream packs to standard input or to repair partial packs.
3838
#[derive(FromArgs, PartialEq, Debug)]
39-
#[argh(subcommand, name = "index-from-pack")]
39+
#[argh(subcommand, name = "pack-index-from-data")]
4040
pub struct IndexFromPack {
4141
/// specify how to iterate the pack, defaults to 'verify'
4242
///

Diff for: src/plumbing/pretty.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ mod options {
5656
/// This command can also be used to stream packs to standard input or to repair partial packs.
5757
#[clap(setting = AppSettings::ColoredHelp)]
5858
#[clap(setting = AppSettings::DisableVersion)]
59-
IndexFromPack {
59+
PackIndexFromData {
6060
/// Specify how to iterate the pack, defaults to 'verify'
6161
///
6262
/// Valid values are
@@ -280,12 +280,12 @@ pub fn main() -> Result<()> {
280280
git_features::interrupt::init_handler(std::io::stderr());
281281

282282
match cmd {
283-
Subcommands::IndexFromPack {
283+
Subcommands::PackIndexFromData {
284284
iteration_mode,
285285
pack_path,
286286
directory,
287287
} => prepare_and_run(
288-
"index-from-pack",
288+
"pack-index-from-data",
289289
verbose,
290290
progress,
291291
progress_keep_open,

Diff for: tests/stateless-journey.sh

+8-8
Original file line numberDiff line numberDiff line change
@@ -50,27 +50,27 @@ title "CLI ${kind}"
5050

5151
title plumbing
5252
snapshot="$snapshot/plumbing"
53-
(when "running 'index-from-pack"
54-
snapshot="$snapshot/index-from-pack"
53+
(when "running 'pack-index-from-data"
54+
snapshot="$snapshot/pack-index-from-data"
5555
PACK_FILE="$fixtures/packs/pack-11fdfa9e156ab73caae3b6da867192221f2089c2.pack"
5656
(with "a valid and complete pack file"
5757
(with "NO output directory specified"
5858
(with "pack file passed as file"
5959
it "generates an index into a sink and outputs pack and index information" && {
6060
WITH_SNAPSHOT="$snapshot/no-output-dir-success" \
61-
expect_run $SUCCESSFULLY "$exe_plumbing" index-from-pack -p "$PACK_FILE"
61+
expect_run $SUCCESSFULLY "$exe_plumbing" pack-index-from-data -p "$PACK_FILE"
6262
}
6363
)
6464
(with "pack file passed from stdin"
6565
it "generates an index into a sink and outputs pack and index information" && {
6666
WITH_SNAPSHOT="$snapshot/no-output-dir-success" \
67-
expect_run $SUCCESSFULLY "$exe_plumbing" index-from-pack < "$PACK_FILE"
67+
expect_run $SUCCESSFULLY "$exe_plumbing" pack-index-from-data < "$PACK_FILE"
6868
}
6969
if test "$kind" = "max"; then
7070
(with "--format json"
7171
it "generates the index into a sink and outputs information as JSON" && {
7272
WITH_SNAPSHOT="$snapshot/no-output-dir-as-json-success" \
73-
expect_run $SUCCESSFULLY "$exe_plumbing" --format json index-from-pack < "$PACK_FILE"
73+
expect_run $SUCCESSFULLY "$exe_plumbing" --format json pack-index-from-data < "$PACK_FILE"
7474
}
7575
)
7676
fi
@@ -80,7 +80,7 @@ snapshot="$snapshot/plumbing"
8080
(with "with an output directory specified"
8181
it "generates an index and outputs information" && {
8282
WITH_SNAPSHOT="$snapshot/output-dir-success" \
83-
expect_run $SUCCESSFULLY "$exe_plumbing" index-from-pack -p "$PACK_FILE" "$PWD"
83+
expect_run $SUCCESSFULLY "$exe_plumbing" pack-index-from-data -p "$PACK_FILE" "$PWD"
8484
}
8585
it "writes the index and pack into the directory (they have the same names, different suffixes)" && {
8686
WITH_SNAPSHOT="$snapshot/output-dir-content" \
@@ -97,15 +97,15 @@ snapshot="$snapshot/plumbing"
9797

9898
it "generates an index and outputs information (instead of failing)" && {
9999
WITH_SNAPSHOT="$snapshot/output-dir-restore-success" \
100-
expect_run $SUCCESSFULLY "$exe_plumbing" index-from-pack -i restore -p "$PACK_FILE" "$PWD"
100+
expect_run $SUCCESSFULLY "$exe_plumbing" pack-index-from-data -i restore -p "$PACK_FILE" "$PWD"
101101
}
102102

103103
if test "$kind" = "max"; then
104104
(with "--format json and the very same output directory"
105105
it "generates the index, overwriting existing files, and outputs information as JSON" && {
106106
WITH_SNAPSHOT="$snapshot/output-dir-restore-as-json-success" \
107107
SNAPSHOT_FILTER=remove-paths \
108-
expect_run $SUCCESSFULLY "$exe_plumbing" --format json index-from-pack -i restore $PWD < "$PACK_FILE"
108+
expect_run $SUCCESSFULLY "$exe_plumbing" --format json pack-index-from-data -i restore $PWD < "$PACK_FILE"
109109
}
110110
)
111111
fi

0 commit comments

Comments
 (0)