git-remote-ops 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +33 -32
- package/README.md +80 -206
- package/dist/cli.js +215 -0
- package/dist/cli.js.map +1 -0
- package/{types → dist}/client.d.ts +11 -15
- package/dist/client.d.ts.map +1 -0
- package/{esm → dist}/client.js +107 -83
- package/dist/client.js.map +1 -0
- package/{types → dist}/errors.d.ts +30 -16
- package/dist/errors.d.ts.map +1 -0
- package/{esm → dist}/errors.js +17 -8
- package/dist/errors.js.map +1 -0
- package/{types → dist}/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/{esm → dist}/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/{types → dist}/logger.d.ts +11 -0
- package/dist/logger.d.ts.map +1 -0
- package/{esm → dist}/logger.js +3 -19
- package/dist/logger.js.map +1 -0
- package/{esm → dist}/objects/commit.js +1 -0
- package/dist/objects/commit.js.map +1 -0
- package/{esm → dist}/objects/index.js +1 -0
- package/dist/objects/index.js.map +1 -0
- package/{types → dist}/objects/tree.d.ts.map +1 -1
- package/{esm → dist}/objects/tree.js +2 -2
- package/dist/objects/tree.js.map +1 -0
- package/{esm → dist}/pack/delta.js +1 -0
- package/dist/pack/delta.js.map +1 -0
- package/{esm → dist}/pack/index.js +1 -0
- package/dist/pack/index.js.map +1 -0
- package/{types → dist}/pack/objects.d.ts.map +1 -1
- package/{esm → dist}/pack/objects.js +3 -3
- package/dist/pack/objects.js.map +1 -0
- package/{types → dist}/pack/parser.d.ts +19 -3
- package/dist/pack/parser.d.ts.map +1 -0
- package/{esm → dist}/pack/parser.js +46 -15
- package/dist/pack/parser.js.map +1 -0
- package/{esm → dist}/protocol/index.js +1 -0
- package/dist/protocol/index.js.map +1 -0
- package/{types → dist}/protocol/pkt_line.d.ts +3 -3
- package/{types → dist}/protocol/pkt_line.d.ts.map +1 -1
- package/{esm → dist}/protocol/pkt_line.js +1 -0
- package/dist/protocol/pkt_line.js.map +1 -0
- package/{esm → dist}/protocol/refs.js +1 -0
- package/dist/protocol/refs.js.map +1 -0
- package/{types → dist}/protocol/upload_pack.d.ts +1 -0
- package/{types → dist}/protocol/upload_pack.d.ts.map +1 -1
- package/{esm → dist}/protocol/upload_pack.js +10 -1
- package/dist/protocol/upload_pack.js.map +1 -0
- package/dist/store.d.ts +28 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +179 -0
- package/dist/store.js.map +1 -0
- package/{types → dist}/transport.d.ts +15 -2
- package/dist/transport.d.ts.map +1 -0
- package/{esm → dist}/transport.js +44 -15
- package/dist/transport.js.map +1 -0
- package/{types → dist}/types.d.ts +12 -7
- package/dist/types.d.ts.map +1 -0
- package/{esm → dist}/types.js +1 -0
- package/dist/types.js.map +1 -0
- package/package.json +42 -29
- package/esm/_dnt.shims.js +0 -72
- package/esm/cli.js +0 -217
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/_argument_types.js +0 -1
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/_errors.js +0 -133
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/_spread.js +0 -1
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/_type_utils.js +0 -1
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/_utils.js +0 -141
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/command.js +0 -1861
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/help/_help_generator.js +0 -357
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/mod.js +0 -13
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/type.js +0 -27
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/action_list.js +0 -16
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/boolean.js +0 -13
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/child_command.js +0 -14
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/command.js +0 -9
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/enum.js +0 -24
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/file.js +0 -12
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/integer.js +0 -9
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/number.js +0 -9
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/secret.js +0 -7
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/string.js +0 -9
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types.js +0 -2
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/upgrade/_check_version.js +0 -26
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/_errors.js +0 -129
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/_utils.js +0 -100
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/_validate_flags.js +0 -166
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/flags.js +0 -750
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/mod.js +0 -55
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/types/boolean.js +0 -11
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/types/integer.js +0 -9
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/types/number.js +0 -11
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/types/string.js +0 -4
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/types.js +0 -1
- package/esm/deps/jsr.io/@cliffy/internal/1.1.0/runtime/exit.js +0 -16
- package/esm/deps/jsr.io/@cliffy/internal/1.1.0/runtime/get_args.js +0 -11
- package/esm/deps/jsr.io/@cliffy/internal/1.1.0/runtime/get_columns.js +0 -25
- package/esm/deps/jsr.io/@cliffy/internal/1.1.0/runtime/get_env.js +0 -18
- package/esm/deps/jsr.io/@cliffy/internal/1.1.0/runtime/inspect.js +0 -11
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/_layout.js +0 -616
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/_utils.js +0 -79
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/border.js +0 -18
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/cell.js +0 -190
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/column.js +0 -117
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/consume_words.js +0 -64
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/mod.js +0 -42
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/row.js +0 -82
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/table.js +0 -341
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/unicode_width.js +0 -101
- package/esm/deps/jsr.io/@std/crypto/1.1.0/_types.js +0 -2
- package/esm/deps/jsr.io/@std/crypto/1.1.0/_wasm/lib/deno_std_wasm_crypto.internal.js +0 -237
- package/esm/deps/jsr.io/@std/crypto/1.1.0/_wasm/lib/deno_std_wasm_crypto.js +0 -2277
- package/esm/deps/jsr.io/@std/crypto/1.1.0/_wasm/mod.js +0 -46
- package/esm/deps/jsr.io/@std/crypto/1.1.0/aes_gcm.js +0 -132
- package/esm/deps/jsr.io/@std/crypto/1.1.0/crypto.js +0 -270
- package/esm/deps/jsr.io/@std/crypto/1.1.0/mod.js +0 -23
- package/esm/deps/jsr.io/@std/crypto/1.1.0/timing_safe_equal.js +0 -61
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common16.js +0 -51
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common_detach.js +0 -13
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_types.js +0 -2
- package/esm/deps/jsr.io/@std/encoding/1.0.10/hex.js +0 -87
- package/esm/deps/jsr.io/@std/fmt/1.0.10/colors.js +0 -903
- package/esm/deps/jsr.io/@std/text/1.0.18/closest_string.js +0 -46
- package/esm/deps/jsr.io/@std/text/1.0.18/levenshtein_distance.js +0 -127
- package/esm/package.json +0 -3
- package/types/_dnt.shims.d.ts +0 -16
- package/types/_dnt.shims.d.ts.map +0 -1
- package/types/client.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_argument_types.d.ts +0 -163
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_argument_types.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_errors.d.ts +0 -71
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_errors.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_spread.d.ts +0 -16
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_spread.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_type_utils.d.ts +0 -15
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_type_utils.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_utils.d.ts +0 -38
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_utils.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/command.d.ts +0 -1086
- package/types/deps/jsr.io/@cliffy/command/1.1.0/command.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/help/_help_generator.d.ts +0 -33
- package/types/deps/jsr.io/@cliffy/command/1.1.0/help/_help_generator.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/mod.d.ts +0 -78
- package/types/deps/jsr.io/@cliffy/command/1.1.0/mod.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/type.d.ts +0 -51
- package/types/deps/jsr.io/@cliffy/command/1.1.0/type.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/action_list.d.ts +0 -10
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/action_list.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/boolean.d.ts +0 -10
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/boolean.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/child_command.d.ts +0 -10
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/child_command.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/command.d.ts +0 -8
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/command.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/enum.d.ts +0 -11
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/enum.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/file.d.ts +0 -6
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/file.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/integer.d.ts +0 -8
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/integer.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/number.d.ts +0 -8
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/number.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/secret.d.ts +0 -6
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/secret.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/string.d.ts +0 -8
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/string.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types.d.ts +0 -161
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/upgrade/_check_version.d.ts +0 -4
- package/types/deps/jsr.io/@cliffy/command/1.1.0/upgrade/_check_version.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/_errors.d.ts +0 -67
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/_errors.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/_utils.d.ts +0 -17
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/_utils.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/_validate_flags.d.ts +0 -11
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/_validate_flags.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/flags.d.ts +0 -154
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/flags.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/mod.d.ts +0 -57
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/mod.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types/boolean.d.ts +0 -4
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types/boolean.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types/integer.d.ts +0 -4
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types/integer.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types/number.d.ts +0 -4
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types/number.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types/string.d.ts +0 -4
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types/string.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types.d.ts +0 -170
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/exit.d.ts +0 -8
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/exit.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/get_args.d.ts +0 -7
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/get_args.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/get_columns.d.ts +0 -7
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/get_columns.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/get_env.d.ts +0 -8
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/get_env.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/inspect.d.ts +0 -7
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/inspect.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/table/1.1.0/_layout.d.ts +0 -108
- package/types/deps/jsr.io/@cliffy/table/1.1.0/_layout.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/table/1.1.0/_utils.d.ts +0 -26
- package/types/deps/jsr.io/@cliffy/table/1.1.0/_utils.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/table/1.1.0/border.d.ts +0 -21
- package/types/deps/jsr.io/@cliffy/table/1.1.0/border.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/table/1.1.0/cell.d.ts +0 -155
- package/types/deps/jsr.io/@cliffy/table/1.1.0/cell.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/table/1.1.0/column.d.ts +0 -97
- package/types/deps/jsr.io/@cliffy/table/1.1.0/column.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/table/1.1.0/consume_words.d.ts +0 -30
- package/types/deps/jsr.io/@cliffy/table/1.1.0/consume_words.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/table/1.1.0/mod.d.ts +0 -43
- package/types/deps/jsr.io/@cliffy/table/1.1.0/mod.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/table/1.1.0/row.d.ts +0 -67
- package/types/deps/jsr.io/@cliffy/table/1.1.0/row.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/table/1.1.0/table.d.ts +0 -235
- package/types/deps/jsr.io/@cliffy/table/1.1.0/table.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/table/1.1.0/unicode_width.d.ts +0 -40
- package/types/deps/jsr.io/@cliffy/table/1.1.0/unicode_width.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/crypto/1.1.0/_types.d.ts +0 -9
- package/types/deps/jsr.io/@std/crypto/1.1.0/_types.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/crypto/1.1.0/_wasm/lib/deno_std_wasm_crypto.d.ts +0 -2
- package/types/deps/jsr.io/@std/crypto/1.1.0/_wasm/lib/deno_std_wasm_crypto.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/crypto/1.1.0/_wasm/lib/deno_std_wasm_crypto.internal.d.ts +0 -69
- package/types/deps/jsr.io/@std/crypto/1.1.0/_wasm/lib/deno_std_wasm_crypto.internal.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/crypto/1.1.0/_wasm/mod.d.ts +0 -13
- package/types/deps/jsr.io/@std/crypto/1.1.0/_wasm/mod.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/crypto/1.1.0/aes_gcm.d.ts +0 -76
- package/types/deps/jsr.io/@std/crypto/1.1.0/aes_gcm.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/crypto/1.1.0/crypto.d.ts +0 -149
- package/types/deps/jsr.io/@std/crypto/1.1.0/crypto.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/crypto/1.1.0/mod.d.ts +0 -22
- package/types/deps/jsr.io/@std/crypto/1.1.0/mod.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/crypto/1.1.0/timing_safe_equal.d.ts +0 -40
- package/types/deps/jsr.io/@std/crypto/1.1.0/timing_safe_equal.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/encoding/1.0.10/_common16.d.ts +0 -23
- package/types/deps/jsr.io/@std/encoding/1.0.10/_common16.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/encoding/1.0.10/_common_detach.d.ts +0 -4
- package/types/deps/jsr.io/@std/encoding/1.0.10/_common_detach.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/encoding/1.0.10/_types.d.ts +0 -9
- package/types/deps/jsr.io/@std/encoding/1.0.10/_types.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/encoding/1.0.10/hex.d.ts +0 -39
- package/types/deps/jsr.io/@std/encoding/1.0.10/hex.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/fmt/1.0.10/colors.d.ts +0 -700
- package/types/deps/jsr.io/@std/fmt/1.0.10/colors.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/text/1.0.18/closest_string.d.ts +0 -42
- package/types/deps/jsr.io/@std/text/1.0.18/closest_string.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/text/1.0.18/levenshtein_distance.d.ts +0 -23
- package/types/deps/jsr.io/@std/text/1.0.18/levenshtein_distance.d.ts.map +0 -1
- package/types/errors.d.ts.map +0 -1
- package/types/index.d.ts.map +0 -1
- package/types/logger.d.ts.map +0 -1
- package/types/pack/parser.d.ts.map +0 -1
- package/types/transport.d.ts.map +0 -1
- package/types/types.d.ts.map +0 -1
- /package/{types → dist}/cli.d.ts +0 -0
- /package/{types → dist}/cli.d.ts.map +0 -0
- /package/{types → dist}/objects/commit.d.ts +0 -0
- /package/{types → dist}/objects/commit.d.ts.map +0 -0
- /package/{types → dist}/objects/index.d.ts +0 -0
- /package/{types → dist}/objects/index.d.ts.map +0 -0
- /package/{types → dist}/objects/tree.d.ts +0 -0
- /package/{types → dist}/pack/delta.d.ts +0 -0
- /package/{types → dist}/pack/delta.d.ts.map +0 -0
- /package/{types → dist}/pack/index.d.ts +0 -0
- /package/{types → dist}/pack/index.d.ts.map +0 -0
- /package/{types → dist}/pack/objects.d.ts +0 -0
- /package/{types → dist}/protocol/index.d.ts +0 -0
- /package/{types → dist}/protocol/index.d.ts.map +0 -0
- /package/{types → dist}/protocol/refs.d.ts +0 -0
- /package/{types → dist}/protocol/refs.d.ts.map +0 -0
package/AGENTS.md
CHANGED
|
@@ -6,48 +6,50 @@ contributor-internal lore (parser invariants, harness boot), see `docs/`.
|
|
|
6
6
|
## What this library is
|
|
7
7
|
|
|
8
8
|
Read-only Git client over smart HTTP. No `.git` dir, no subprocess, no working tree. Fetches one
|
|
9
|
-
commit / one tree / one blob from a remote and
|
|
9
|
+
commit / one tree / one blob from a remote and stores decoded objects in caller-supplied `storeDir`.
|
|
10
10
|
|
|
11
11
|
## What it is NOT
|
|
12
12
|
|
|
13
13
|
- Not a `git` replacement. No push, no working tree, no ref writes, no merges.
|
|
14
14
|
- Not a clone manager. No `have` negotiation, no incremental sync — every fetch is from-scratch with
|
|
15
15
|
`done`.
|
|
16
|
-
- Not streaming.
|
|
16
|
+
- Not a fully streaming parser. Extracted packs are loaded in memory during parse.
|
|
17
17
|
|
|
18
18
|
If consumer needs writes or full clones, shell out to `git` instead.
|
|
19
19
|
|
|
20
20
|
## Install
|
|
21
21
|
|
|
22
22
|
```ts
|
|
23
|
-
import { RemoteGit } from "
|
|
23
|
+
import { RemoteGit } from "git-remote-ops";
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
Node.js 24 LTS package. Use pnpm for local development and npm-compatible package installs for consumers.
|
|
27
27
|
|
|
28
28
|
CLI:
|
|
29
29
|
|
|
30
30
|
```sh
|
|
31
|
-
|
|
31
|
+
pnpm install
|
|
32
|
+
pnpm build
|
|
33
|
+
pnpm exec git-remote-ops --help
|
|
32
34
|
```
|
|
33
35
|
|
|
34
36
|
## Core API
|
|
35
37
|
|
|
36
38
|
One class. All methods async. All return `Result<T, GitRemoteOpsError>` from
|
|
37
|
-
|
|
39
|
+
`better-result` — never throw.
|
|
38
40
|
|
|
39
41
|
```ts
|
|
40
|
-
const client = new RemoteGit(url, { logger
|
|
42
|
+
const client = new RemoteGit(url, { storeDir, logger?, diagnostic? });
|
|
41
43
|
|
|
42
44
|
await client.discover(); // -> ServerProfile
|
|
43
45
|
await client.probe(verbose?); // -> ServerProfile (filter probe)
|
|
44
46
|
await client.lsRefs(); // -> Map<refName, sha>
|
|
45
47
|
await client.resolveRef(ref); // -> sha
|
|
46
|
-
await client.fetchCommit(ref, { depth?, filter?,
|
|
48
|
+
await client.fetchCommit(ref, { depth?, filter?, parseScope? });
|
|
47
49
|
await client.fetchBlob(sha);
|
|
48
50
|
await client.fetchTree(sha);
|
|
49
51
|
await client.fetchTreeForCommit(ref, opts);
|
|
50
|
-
client.getObject(sha);
|
|
52
|
+
await client.getObject(sha); // disk store lookup, no network
|
|
51
53
|
```
|
|
52
54
|
|
|
53
55
|
## Result handling
|
|
@@ -71,26 +73,26 @@ if you want exceptions.
|
|
|
71
73
|
|
|
72
74
|
## Caching behaviour consumers should know
|
|
73
75
|
|
|
74
|
-
|
|
76
|
+
`RemoteGit` keeps one `ServerProfile` in memory. Objects live on disk under `storeDir`:
|
|
75
77
|
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
+
- `objects/<aa>/<rest>` — Git-compatible loose objects.
|
|
79
|
+
- `incoming/` — transient raw responses and extracted packs.
|
|
80
|
+
- `snapshots/` — depth-1 snapshot markers.
|
|
78
81
|
|
|
79
82
|
Implications:
|
|
80
83
|
|
|
81
|
-
- Reuse
|
|
82
|
-
-
|
|
83
|
-
|
|
84
|
-
- Concurrent calls on one instance share the cache; no internal locking.
|
|
84
|
+
- Reuse `storeDir` across calls/processes — commit → tree → blob dedupes `want`s from disk.
|
|
85
|
+
- `getObject` is async because it reads the loose-object store.
|
|
86
|
+
- Concurrent writers rely on atomic temp-file rename only; no lockfile yet.
|
|
85
87
|
|
|
86
88
|
## Choosing options
|
|
87
89
|
|
|
88
|
-
| Goal | Recipe
|
|
89
|
-
| --------------------------- |
|
|
90
|
-
| One commit's metadata | `fetchCommit(ref, { depth: 1, filter: "blob:none" })`
|
|
91
|
-
| List files at snapshot | `fetchTreeForCommit(ref, { depth: 1, filter: "blob:none"
|
|
92
|
-
| One known blob | `fetchBlob(sha)` (no profile probe needed)
|
|
93
|
-
| Path → blob without network | `
|
|
90
|
+
| Goal | Recipe |
|
|
91
|
+
| --------------------------- | ------------------------------------------------------------------------------------ |
|
|
92
|
+
| One commit's metadata | `fetchCommit(ref, { depth: 1, filter: "blob:none" })` |
|
|
93
|
+
| List files at snapshot | `fetchTreeForCommit(ref, { depth: 1, filter: "blob:none" })` |
|
|
94
|
+
| One known blob | `fetchBlob(sha)` (no profile probe needed) |
|
|
95
|
+
| Path → blob without network | read trees from `getObject` / `LooseObjectStore`, then use `objects/tree.ts` helpers |
|
|
94
96
|
|
|
95
97
|
`depth: 1` + `filter: "blob:none"` is the cheap default. Both gracefully degrade if server doesn't
|
|
96
98
|
advertise the capability — depth drops, filter logs at info and proceeds.
|
|
@@ -100,10 +102,10 @@ advertise the capability — depth drops, filter logs at info and proceeds.
|
|
|
100
102
|
Library silent unless told otherwise.
|
|
101
103
|
|
|
102
104
|
```ts
|
|
103
|
-
import { Logger } from "
|
|
105
|
+
import { Logger } from "git-remote-ops";
|
|
104
106
|
|
|
105
107
|
const logger = new Logger({ level: "debug" });
|
|
106
|
-
const client = new RemoteGit(url, { logger });
|
|
108
|
+
const client = new RemoteGit(url, { logger, storeDir });
|
|
107
109
|
// ...
|
|
108
110
|
console.error(logger.summary()); // metrics table
|
|
109
111
|
```
|
|
@@ -122,7 +124,7 @@ git-remote-ops list-files <url> [--ref HEAD] [--depth N] [--filter SPEC | --no-
|
|
|
122
124
|
[--details]
|
|
123
125
|
git-remote-ops cat-blob <url> <blob-sha>
|
|
124
126
|
|
|
125
|
-
Global: -q | -v | --debug | --stats
|
|
127
|
+
Global: --store-dir <path> | -q | -v | --debug | --stats
|
|
126
128
|
```
|
|
127
129
|
|
|
128
130
|
Stdout = data. Stderr = logs + errors. Exit 1 on any `Result.err`.
|
|
@@ -132,8 +134,8 @@ Full reference: `docs/cli.md`.
|
|
|
132
134
|
## Common pitfalls
|
|
133
135
|
|
|
134
136
|
**Calling `fetchTree(commit.tree)` after `fetchCommit(ref)` with default options.** Default
|
|
135
|
-
`
|
|
136
|
-
`{
|
|
137
|
+
`parseScope: "target"` only materializes the commit itself. Use `fetchTreeForCommit` or pass
|
|
138
|
+
`{ parseScope: "all" }` to `fetchCommit`.
|
|
137
139
|
|
|
138
140
|
**Expecting full history.** `depth: 1` (the CLI default) gives one commit. Drop depth for full
|
|
139
141
|
history; expect a much larger pack.
|
|
@@ -141,11 +143,10 @@ history; expect a much larger pack.
|
|
|
141
143
|
**Treating `RefNotFoundError` as fatal.** A 40-char hex sha is accepted even when not in the ad —
|
|
142
144
|
try direct sha if your ref is unusual.
|
|
143
145
|
|
|
144
|
-
**Confusing `getObject` with a fetch.** `getObject` only checks the
|
|
145
|
-
not yet materialized. No network call.
|
|
146
|
+
**Confusing `getObject` with a fetch.** `getObject` only checks the disk store. Returns `undefined`
|
|
147
|
+
if not yet materialized. No network call.
|
|
146
148
|
|
|
147
|
-
**Throwing away
|
|
148
|
-
Reuse it.
|
|
149
|
+
**Throwing away `storeDir` between calls.** Re-fetches the same objects. Reuse the directory.
|
|
149
150
|
|
|
150
151
|
## Where to look in source
|
|
151
152
|
|
|
@@ -170,7 +171,7 @@ Every file carries a module-level JSDoc banner with intent. Every constant docum
|
|
|
170
171
|
|
|
171
172
|
## Versioning
|
|
172
173
|
|
|
173
|
-
Pre-1.0. API may shift. Pin exact
|
|
174
|
+
Pre-1.0. API may shift. Pin exact package versions in `package.json`.
|
|
174
175
|
|
|
175
176
|
## License
|
|
176
177
|
|
package/README.md
CHANGED
|
@@ -1,247 +1,121 @@
|
|
|
1
1
|
# git-remote-ops
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
wire protocol that `git fetch` does, then materializes the parts you actually want — one commit, one
|
|
5
|
-
tree, one file — straight into memory.
|
|
3
|
+
Read-only Git remote operations over smart HTTP.
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
Fetch commit metadata, trees, file lists, or blobs from a remote Git repository without cloning and without shelling out to `git`.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
|
|
11
|
-
cat-blob https://github.com/torvalds/linux.git \
|
|
12
|
-
e8c39d0f… > Makefile
|
|
10
|
+
npm install git-remote-ops
|
|
13
11
|
```
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
metadata.
|
|
17
|
-
|
|
18
|
-
## Why bother
|
|
19
|
-
|
|
20
|
-
A surprising amount of production code shells out to `git` just to read a file. That works, but it
|
|
21
|
-
forces a clone — every byte of every revision of every path — to retrieve one revision of one path.
|
|
22
|
-
On a large monorepo the clone is the entire latency budget.
|
|
23
|
-
|
|
24
|
-
The Git smart-HTTP protocol has supported targeted fetches for years. With shallow depth
|
|
25
|
-
(`--depth=1`) and partial-clone filters (`--filter=blob:none`, `--filter=tree:0`) you can ask the
|
|
26
|
-
server for _just the snapshot you care about_, often a few hundred kilobytes total. Mainline `git`
|
|
27
|
-
exposes this, but to use it you still need an on-disk clone and a forked process.
|
|
28
|
-
|
|
29
|
-
`git-remote-ops` is the thin client you'd write if you only ever did this one thing: a few hundred
|
|
30
|
-
lines of TypeScript that build the same `want`/`done` request `git` would, parse the packfile that
|
|
31
|
-
comes back, and hand you the decoded objects.
|
|
32
|
-
|
|
33
|
-
## What's in the box
|
|
34
|
-
|
|
35
|
-
Six subcommands, all read-only:
|
|
13
|
+
Run CLI without installing into project:
|
|
36
14
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
| `probe` | Capability sniff: protocol version, shallow, filter dialects. |
|
|
40
|
-
| `ls-refs` | List advertised refs as `<sha> <name>`. |
|
|
41
|
-
| `cat-commit` | Fetch + decode a commit object. |
|
|
42
|
-
| `cat-tree` | Fetch + decode a root tree (or a specific tree by sha). |
|
|
43
|
-
| `list-files` | Walk a snapshot and emit every path. |
|
|
44
|
-
| `cat-blob` | Stream one blob's raw bytes to stdout. |
|
|
45
|
-
|
|
46
|
-
And the same operations are available as a library:
|
|
47
|
-
|
|
48
|
-
```typescript
|
|
49
|
-
import { RemoteGit } from "jsr:@local/git-remote-ops";
|
|
50
|
-
|
|
51
|
-
const client = new RemoteGit("https://github.com/owner/repo.git");
|
|
52
|
-
const { sha, commit } = (await client.fetchCommit("HEAD")).unwrap();
|
|
53
|
-
const tree = (await client.fetchTree(commit.tree)).unwrap();
|
|
54
|
-
const blob = (await client.fetchBlob(tree[0].sha)).unwrap();
|
|
15
|
+
```bash
|
|
16
|
+
npx git-remote-ops --help
|
|
55
17
|
```
|
|
56
18
|
|
|
57
|
-
|
|
58
|
-
[`better-result`](https://jsr.io/@local/better-result) — never throws.
|
|
59
|
-
|
|
60
|
-
## How it works
|
|
19
|
+
## CLI
|
|
61
20
|
|
|
62
|
-
|
|
21
|
+
Every command needs `--store-dir`. Reuse same directory to avoid re-downloading objects.
|
|
63
22
|
|
|
23
|
+
```bash
|
|
24
|
+
git-remote-ops --store-dir /tmp/git-remote-ops-cache ls-refs https://github.com/owner/repo.git
|
|
64
25
|
```
|
|
65
|
-
┌──────────────────────────┐
|
|
66
|
-
src/client.ts ─→ │ RemoteGit (public API) │
|
|
67
|
-
└────────────┬─────────────┘
|
|
68
|
-
│
|
|
69
|
-
┌────────────────────────┼───────────────────────┐
|
|
70
|
-
▼ ▼ ▼
|
|
71
|
-
src/protocol/ src/pack/ src/objects/
|
|
72
|
-
pkt-line, refs, pack parser, delta, commit + tree
|
|
73
|
-
upload-pack zlib bridge decoders
|
|
74
|
-
│ ▲
|
|
75
|
-
▼ │
|
|
76
|
-
src/transport.ts ─────────────┘
|
|
77
|
-
(fetch wrappers)
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### 1. Transport — `src/transport.ts`
|
|
81
|
-
|
|
82
|
-
Two `fetch` calls do all the network work:
|
|
83
|
-
|
|
84
|
-
1. `GET /info/refs?service=git-upload-pack` — the ref advertisement.
|
|
85
|
-
2. `POST /git-upload-pack` — the actual fetch, body framed below.
|
|
86
|
-
|
|
87
|
-
Both helpers thread an optional `Logger` so byte counts and durations roll into the same metrics
|
|
88
|
-
struct the CLI's `--stats` flag prints.
|
|
89
|
-
|
|
90
|
-
### 2. Protocol — `src/protocol/`
|
|
91
|
-
|
|
92
|
-
**pkt-line framing.** Everything Git sends over HTTP is wrapped in a 4-byte ASCII-hex length prefix.
|
|
93
|
-
Length `0000` is a flush; `0001` and `0002` are v2 control packets. `parsePktLines` walks a buffer
|
|
94
|
-
end-to-end, returning subarray views — no payload bytes are copied. Trailing `\n`s are preserved
|
|
95
|
-
because some callers care.
|
|
96
|
-
|
|
97
|
-
**Ref advertisement.** v0/v1 puts capabilities NUL-separated on the first ref line; v2 puts them on
|
|
98
|
-
standalone pkt-lines after `version 2`. We parse both, merge the capability sets, and prefer v2 when
|
|
99
|
-
both are advertised.
|
|
100
|
-
|
|
101
|
-
**`git-upload-pack` request.** A `want <sha>` line per object, an optional `deepen <n>` for shallow,
|
|
102
|
-
an optional `filter <spec>` for partial-clone, a flush, then `done`. The v2 encoder adds a
|
|
103
|
-
`command=fetch` header section and turns capabilities into separate argument lines instead of riding
|
|
104
|
-
the first `want`.
|
|
105
|
-
|
|
106
|
-
**Sideband demux.** The response is itself a stream of pkt-lines; each data line starts with a
|
|
107
|
-
channel byte. Channel 1 is the packfile, channel 2 is human-readable progress, channel 3 is fatal
|
|
108
|
-
stderr. `extractPack` looks at the first real data line, picks the right strategy (raw `PACK`
|
|
109
|
-
signature, sideband, or PACK-search fallback), and returns the concatenated channel-1 bytes.
|
|
110
|
-
|
|
111
|
-
### 3. Packfile — `src/pack/`
|
|
112
26
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
The parser walks entries in order. For non-delta types it inflates and hashes the body in one shot.
|
|
118
|
-
For deltas — two flavours, `OBJ_OFS_DELTA` (base referenced by negative byte offset) and
|
|
119
|
-
`OBJ_REF_DELTA` (base referenced by 20-byte sha) — it applies the delta against the resolved base
|
|
120
|
-
and re-hashes the reconstructed object.
|
|
121
|
-
|
|
122
|
-
Two implementation notes worth flagging:
|
|
123
|
-
|
|
124
|
-
**zlib boundaries.** Multiple deflate streams sit back-to-back inside the pack with no length
|
|
125
|
-
prefix. The streaming API doesn't tell you how many input bytes a single decode consumed, so we
|
|
126
|
-
reach into `node:zlib`'s `_processChunk` and read `bytesWritten` to advance the cursor. It's an
|
|
127
|
-
implementation detail of Node's zlib binding, but it's a stable one, and the alternative is parsing
|
|
128
|
-
deflate headers ourselves.
|
|
27
|
+
```bash
|
|
28
|
+
git-remote-ops --store-dir /tmp/git-remote-ops-cache \
|
|
29
|
+
cat-commit https://github.com/owner/repo.git --ref main
|
|
30
|
+
```
|
|
129
31
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
32
|
+
```bash
|
|
33
|
+
git-remote-ops --store-dir /tmp/git-remote-ops-cache \
|
|
34
|
+
list-files https://github.com/owner/repo.git --ref main
|
|
35
|
+
```
|
|
133
36
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
37
|
+
```bash
|
|
38
|
+
git-remote-ops --store-dir /tmp/git-remote-ops-cache \
|
|
39
|
+
cat-blob https://github.com/owner/repo.git <blob-sha> > file.bin
|
|
40
|
+
```
|
|
137
41
|
|
|
138
|
-
|
|
42
|
+
Commands:
|
|
139
43
|
|
|
140
|
-
|
|
141
|
-
|
|
44
|
+
```text
|
|
45
|
+
probe <url>
|
|
46
|
+
ls-refs <url>
|
|
47
|
+
cat-commit <url> [--ref HEAD] [--depth 1] [--filter blob:none | --no-filter]
|
|
48
|
+
cat-tree <url> [--ref HEAD] [--depth 1] [--filter blob:none | --no-filter] [--tree-sha <sha>]
|
|
49
|
+
list-files <url> [--ref HEAD] [--depth 1] [--filter blob:none | --no-filter] [--details]
|
|
50
|
+
cat-blob <url> <blob-sha>
|
|
51
|
+
```
|
|
142
52
|
|
|
143
|
-
|
|
144
|
-
blank line + free-form message; we keep `tree`, first `parent`, `author`, `committer`. Multiple
|
|
145
|
-
`parent` lines (merge commits) collapse to the first because this client only walks toward snapshots
|
|
146
|
-
— never along history.
|
|
53
|
+
See [`docs/cli.md`](docs/cli.md) for full CLI reference.
|
|
147
54
|
|
|
148
|
-
|
|
149
|
-
resolve `path/to/file` to a blob sha without touching the network.
|
|
55
|
+
## API
|
|
150
56
|
|
|
151
|
-
|
|
57
|
+
```ts
|
|
58
|
+
import { RemoteGit } from "git-remote-ops";
|
|
152
59
|
|
|
153
|
-
|
|
60
|
+
const git = new RemoteGit("https://github.com/owner/repo.git", {
|
|
61
|
+
storeDir: "/tmp/git-remote-ops-cache",
|
|
62
|
+
});
|
|
154
63
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
64
|
+
const commit = await git.fetchCommit("HEAD", {
|
|
65
|
+
depth: 1,
|
|
66
|
+
filter: "blob:none",
|
|
67
|
+
});
|
|
68
|
+
if (commit.isErr()) throw commit.error;
|
|
160
69
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
exists because some servers _advertise_ filter support but don't honour it — we send minimal-cost
|
|
164
|
-
test fetches with `blob:none` and `tree:0` and look at the returned pack to find out.
|
|
70
|
+
const tree = await git.fetchTree(commit.value.commit.tree);
|
|
71
|
+
if (tree.isErr()) throw tree.error;
|
|
165
72
|
|
|
166
|
-
|
|
73
|
+
console.log(tree.value);
|
|
74
|
+
```
|
|
167
75
|
|
|
168
|
-
|
|
169
|
-
|
|
76
|
+
```ts
|
|
77
|
+
const files = await git.fetchTreeForCommit("main", {
|
|
78
|
+
depth: 1,
|
|
79
|
+
filter: "blob:none",
|
|
80
|
+
});
|
|
170
81
|
|
|
171
|
-
|
|
172
|
-
const
|
|
173
|
-
|
|
174
|
-
switch (result.error._tag) {
|
|
175
|
-
case "TransportError": // .status, .url, .method available
|
|
176
|
-
case "PackParseError": // .offset, .reason
|
|
177
|
-
case "ObjectNotFoundError": // .sha
|
|
178
|
-
// …
|
|
82
|
+
if (files.isOk()) {
|
|
83
|
+
for (const entry of files.value.entries) {
|
|
84
|
+
console.log(entry.mode, entry.sha, entry.name);
|
|
179
85
|
}
|
|
180
86
|
}
|
|
181
87
|
```
|
|
182
88
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
- Levelled messages (`info`, `debug`, `trace`) with namespaced children.
|
|
190
|
-
- Cumulative metrics: HTTP request count / bytes / time, pack objects by type / bytes / parse time.
|
|
191
|
-
- An aligned summary table for `--stats`.
|
|
192
|
-
|
|
193
|
-
The library never logs above `info` unless you ask. Pass a configured `Logger` via
|
|
194
|
-
`new RemoteGit(url, { logger })`, or hand it a `diagnostic` callback and the constructor will route
|
|
195
|
-
debug-level lines to it.
|
|
196
|
-
|
|
197
|
-
## CLI
|
|
198
|
-
|
|
199
|
-
```text
|
|
200
|
-
git-remote-ops <command> [options] <url>
|
|
201
|
-
|
|
202
|
-
Global flags:
|
|
203
|
-
-q, --quiet silent
|
|
204
|
-
-v, --verbose debug
|
|
205
|
-
--debug trace
|
|
206
|
-
--stats print metrics summary after completion
|
|
207
|
-
|
|
208
|
-
probe <url>
|
|
209
|
-
ls-refs <url>
|
|
210
|
-
cat-commit <url> [--ref HEAD] [--depth 1] [--filter blob:none | --no-filter]
|
|
211
|
-
cat-tree <url> [--ref HEAD] [--depth 1] [--filter blob:none | --no-filter]
|
|
212
|
-
[--tree-sha <sha>]
|
|
213
|
-
list-files <url> [--ref HEAD] [--depth 1] [--filter blob:none | --no-filter]
|
|
214
|
-
[--details]
|
|
215
|
-
cat-blob <url> <blob-sha>
|
|
89
|
+
```ts
|
|
90
|
+
const blob = await git.fetchBlob("<blob-sha>");
|
|
91
|
+
if (blob.isOk()) {
|
|
92
|
+
await writeFile("file.bin", blob.value);
|
|
93
|
+
}
|
|
216
94
|
```
|
|
217
95
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
96
|
+
Core methods:
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
await git.probe();
|
|
100
|
+
await git.lsRefs();
|
|
101
|
+
await git.resolveRef(ref);
|
|
102
|
+
await git.fetchCommit(ref, options?);
|
|
103
|
+
await git.fetchTree(treeSha);
|
|
104
|
+
await git.fetchTreeForCommit(ref, options?);
|
|
105
|
+
await git.fetchBlob(blobSha);
|
|
106
|
+
await git.getObject(sha);
|
|
229
107
|
```
|
|
230
108
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
109
|
+
All public methods return `Result<T, GitRemoteOpsError>` from `better-result`.
|
|
110
|
+
|
|
111
|
+
## Cache
|
|
234
112
|
|
|
235
|
-
|
|
113
|
+
`storeDir` persists fetched Git objects. Reuse it across calls or CLI runs.
|
|
236
114
|
|
|
237
|
-
|
|
238
|
-
refs. It also makes no attempt to negotiate `have` lines — every request is a from-scratch fetch
|
|
239
|
-
with `done`, on the assumption that you're after small slices of remote history rather than
|
|
240
|
-
incrementally syncing a clone.
|
|
115
|
+
## Limits
|
|
241
116
|
|
|
242
|
-
|
|
243
|
-
`blob:none` + `--depth=1`), but a streaming parser would be a reasonable evolution.
|
|
117
|
+
Fetch only. No push, checkout, ref writes, or full clone management.
|
|
244
118
|
|
|
245
119
|
## License
|
|
246
120
|
|
|
247
|
-
See `LICENSE
|
|
121
|
+
MIT. See [`LICENSE`](LICENSE).
|