Skip to content
Open

Jch #2105

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
fb78702
refs: avoid "too many arguments"
gitster Aug 6, 2024
becacd2
cat-file: avoid "too many arguments"
gitster Aug 6, 2024
2446e8f
notes: avoid "too many arguments"
gitster Aug 6, 2024
6c8ee88
miscellaneous: avoid "too many arguments"
gitster Aug 6, 2024
1e77bf0
packfile: move sizep computation
peff Aug 23, 2024
117addc
packfile: allow content-limit for cat-file
peff Aug 23, 2024
b2df0c0
packfile: fix off-by-one in content_limit comparison
Aug 23, 2024
a5f683f
packfile: inline cache_or_unpack_entry
Aug 23, 2024
98521d6
cat-file: use delta_base_cache entries directly
Aug 23, 2024
28402bc
packfile: packed_object_info avoids packed_to_object_type
Aug 23, 2024
7d4e4d5
object_info: content_limit only applies to blobs
Aug 23, 2024
489810f
cat-file: batch-command uses content_limit
Aug 23, 2024
1732dda
cat-file: batch_write: use size_t for length
Aug 23, 2024
f043683
cat-file: use writev(2) if available
Aug 23, 2024
31c5b4b
version: refactor strbuf_sanitize()
chriscool Sep 10, 2024
8afd0ee
strbuf: refactor strbuf_trim_trailing_ch()
chriscool Sep 10, 2024
3cb155a
Add 'promisor-remote' capability to protocol v2
chriscool Sep 10, 2024
bc0c4e1
promisor-remote: check advertised name or URL
chriscool Sep 10, 2024
82d283c
t7500: make each piece more independent
gitster Oct 14, 2024
dbafaff
config: values of pathname type can be prefixed with :(optional)
gitster Oct 14, 2024
2da08f2
parseopt: values of pathname type can be prefixed with :(optional)
gitster Oct 14, 2024
bed4d80
builtin/ls-remote: plug leaking server options
pks-t Oct 21, 2024
bfac141
t/helper: fix leaks in "reach" test tool
pks-t Oct 21, 2024
f4bb632
grep: fix leak in `grep_splice_or()`
pks-t Oct 21, 2024
4042f03
builtin/grep: fix leak with `--max-count=0`
pks-t Oct 21, 2024
ab28bc8
revision: fix leaking bloom filters
pks-t Oct 21, 2024
27a1c1f
diff-lib: fix leaking diffopts in `do_diff_cache()`
pks-t Oct 21, 2024
c0a1026
pretty: clear signature check
pks-t Oct 21, 2024
5ca4de4
upload-pack: fix leaking URI protocols
pks-t Oct 21, 2024
27164f7
builtin/commit: fix leaking change data contents
pks-t Oct 21, 2024
ecbb58e
trailer: fix leaking trailer values
pks-t Oct 21, 2024
9d0482d
trailer: fix leaking strbufs when formatting trailers
pks-t Oct 21, 2024
06d6581
builtin/commit: fix leaking cleanup config
pks-t Oct 21, 2024
7c66167
transport-helper: fix leaking import/export marks
pks-t Oct 21, 2024
8eded2f
builtin/tag: fix leaking key ID on failure to sign
pks-t Oct 21, 2024
9a2c5b0
combine-diff: fix leaking lost lines
pks-t Oct 21, 2024
8977bcf
dir: release untracked cache data
pks-t Oct 21, 2024
1fe066c
sparse-index: correctly free EWAH contents
pks-t Oct 21, 2024
a4a3b8c
t/helper: stop re-initialization of `the_repository`
pks-t Oct 21, 2024
44cbc97
t/helper: fix leaking buffer in "dump-untracked-cache"
pks-t Oct 21, 2024
e0e970d
dir: fix leak when parsing "status.showUntrackedFiles"
pks-t Oct 21, 2024
3ec42f3
builtin/merge: release outbut buffer after performing merge
pks-t Oct 21, 2024
931847a
list-objects-filter-options: work around reported leak on error
pks-t Oct 21, 2024
e6e6315
reftable/system: move "dir.h" to its only user
pks-t Oct 23, 2024
ac90e9f
reftable: explicitly handle hash format IDs
pks-t Oct 23, 2024
da2d199
reftable/system: stop depending on "hash.h"
pks-t Oct 23, 2024
3c58a50
reftable/stack: stop using `fsync_component()` directly
pks-t Oct 23, 2024
3f5e8d2
reftable/system: provide thin wrapper for tempfile subsystem
pks-t Oct 23, 2024
ec282c1
reftable/stack: drop only use of `get_locked_file_path()`
pks-t Oct 23, 2024
3740325
reftable/system: provide thin wrapper for lockfile subsystem
pks-t Oct 23, 2024
ae0f757
compat/mingw: support POSIX semantics for atomic renames
pks-t Oct 27, 2024
0142990
show-index: fix uninitialized hash function
quanta-kt Oct 26, 2024
2be7127
Documentation/git-bundle.txt: mention full backup example
LemmingAvalanche Oct 29, 2024
4f68a40
Documentation/git-bundle.txt: mention --all in spec. refs
LemmingAvalanche Oct 29, 2024
c4ac5fa
Documentation/git-bundle.txt: discuss naïve backups
LemmingAvalanche Oct 29, 2024
fcae55a
fetch-pack: refactor packet writing
calvin-wan-google Oct 28, 2024
9ddf78d
fetch-pack: move fetch initialization
calvin-wan-google Oct 28, 2024
bc52916
serve: advertise object-info feature
calvin-wan-google Oct 28, 2024
8c4368d
transport: add client support for object-info
calvin-wan-google Oct 28, 2024
f1ffe74
cat-file: add declaration of variable i inside its for loop
peijianju Oct 28, 2024
999bed8
cat-file: add remote-object-info to batch-command
peijianju Oct 28, 2024
d9b67c3
path-walk: introduce an object walk by path
derrickstolee Oct 31, 2024
44425c4
test-lib-functions: add test_cmp_sorted
derrickstolee Oct 31, 2024
35e6cf9
t6601: add helper for testing path-walk API
derrickstolee Oct 31, 2024
ca51c2d
path-walk: allow consumer to specify object types
derrickstolee Oct 31, 2024
8fa5e62
path-walk: visit tags and cached objects
derrickstolee Oct 31, 2024
c99f26c
path-walk: mark trees and blobs as UNINTERESTING
derrickstolee Oct 31, 2024
d18caa1
Merge branch 'kn/arbitrary-suffixes' into jch
ttaylorr Nov 1, 2024
fbed493
Merge branch 'kn/ci-clang-format-tidy' into jch
ttaylorr Nov 1, 2024
46be1b3
Merge branch 'cw/config-extensions' into jch
ttaylorr Nov 1, 2024
1597170
Merge branch 'ps/upgrade-clar' into jch
ttaylorr Nov 1, 2024
5b107fa
###
ttaylorr Nov 1, 2024
ff12b90
Merge branch 'jk/left-right-bitmap' into jch
ttaylorr Nov 1, 2024
8f346e1
### match next
ttaylorr Nov 1, 2024
ce4ffbd
Merge branch 'ej/cat-file-remote-object-info' into jch
ttaylorr Nov 1, 2024
5215bb8
Merge branch 'ps/mingw-rename' into jch
ttaylorr Nov 1, 2024
5640c87
Merge branch 'ps/reftable-detach' into jch
ttaylorr Nov 1, 2024
7be0046
Merge branch 'cc/promisor-remote-capability' into jch
ttaylorr Nov 1, 2024
96e5742
Merge branch 'jc/too-many-arguments' into jch
ttaylorr Nov 1, 2024
04bc973
Merge branch 'ew/cat-file-optim' into jch
ttaylorr Nov 1, 2024
71cf160
Merge branch 'bc/drop-ancient-libcurl-and-perl' into jch
ttaylorr Nov 1, 2024
f0176fb
Merge branch 'jc/optional-path' into jch
ttaylorr Nov 1, 2024
ddedb0e
Merge branch 'ps/leakfixes-part-9' into jch
ttaylorr Nov 1, 2024
2f42bd7
Merge branch 'as/show-index-uninitialized-hash' into jch
ttaylorr Nov 1, 2024
c65c75b
Merge branch 'kh/bundle-docs' into jch
ttaylorr Nov 1, 2024
5212635
Merge branch 'ds/path-walk-1' into jch
ttaylorr Nov 1, 2024
515fd3a
Merge branch 'bc/ancient-ci' into jch
ttaylorr Nov 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
miscellaneous: avoid "too many arguments"
Imagine seeing your command failing with "too many arguments" when
you run "git cmd foo bar baz".  Can you tell it will work if you
said "git cmd foo bar"?  Or is that trimming your command line too
much?  Too little?

Instead, if the command reports "unexpected argument: 'bar'", you'd
know that "bar" and everything after it is unwanted.

Let's make it so for a few remaining commands.

Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
gitster committed Aug 6, 2024
commit 6c8ee88aff15f00751a32bf297e0d7f47f91d75f
4 changes: 1 addition & 3 deletions builtin/prune-packed.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ int cmd_prune_packed(int argc, const char **argv, const char *prefix)
prune_packed_usage, 0);

if (argc > 0)
usage_msg_opt(_("too many arguments"),
prune_packed_usage,
prune_packed_options);
die(_("'git prune-packed' takes no arguments"));

prune_packed_objects(opts);
return 0;
Expand Down
3 changes: 2 additions & 1 deletion builtin/receive-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -2503,7 +2503,8 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix)
argc = parse_options(argc, argv, prefix, options, receive_pack_usage, 0);

if (argc > 1)
usage_msg_opt(_("too many arguments"), receive_pack_usage, options);
usage_msg_optf(_("unexpected argument: '%s'"),
receive_pack_usage, options, argv[1]);
if (argc == 0)
usage_msg_opt(_("you must specify a directory"), receive_pack_usage, options);

Expand Down
2 changes: 1 addition & 1 deletion builtin/tag.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)

object_ref = argc == 2 ? argv[1] : "HEAD";
if (argc > 2)
die(_("too many arguments"));
die(_("unexpected argument: '%s'"), argv[2]);

if (repo_get_oid(the_repository, object_ref, &object))
die(_("Failed to resolve '%s' as a valid ref."), object_ref);
Expand Down