1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-18 15:04:49 +01:00
Commit graph

9 commits

Author SHA1 Message Date
Stephen Boyd
3778292017 parse-opts: prepare for OPT_FILENAME
To give OPT_FILENAME the prefix, we pass the prefix to parse_options()
which passes the prefix to parse_options_start() which sets the prefix
member of parse_opts_ctx accordingly. If there isn't a prefix in the
calling context, passing NULL will suffice.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-25 01:07:25 -07:00
Josh Micich
31c8221acb mktree: validate entry type in input
Previously mktree would accept tree entries which had a mismatch between
the declared type and the actual type of object.  Check the actual type of
the object when it is available locally.

Signed-off-by: Josh Micich <josh.micich@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-16 10:35:45 -07:00
Josh Micich
f1cf2d8b14 mktree --batch: build more than one tree object
This option works in a similar way to the '--batch' option of 'git cat-file'.
It enables creation of many tree objects with a single process.

The change was motivated by performance considerations in applications that
need to create many tree objects. A non-rigorous test showed tree creation
times improved from (roughly) 200ms to 50ms.

Signed-off-by: Josh Micich <josh.micich@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-16 10:28:59 -07:00
Josh Micich
e01662bb5d mktree --missing: updated usage message and man page
Update usage message in builtin-mktree.c to include '--missing'.  Do the
same to man page and clarify that the input does not have to be sorted.

Signed-off-by: Josh Micich <josh.micich@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-16 10:25:49 -07:00
Junio C Hamano
1c64e79a62 mktree --missing: allow missing objects
We need to allow input lines that point at objects that we do not
have when dealing with submodule entries anyway.  This adds an explicit
option to allow missing objects of other types, to be consistent with
the use of --info-only option to the update-index command and --missing-ok
option to the write-tree command.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-10 17:31:01 -07:00
Junio C Hamano
ad87b5dd93 mktree: do not barf on a submodule commit
It is perfectly normal if a tree entry points at a missing commit as long
as the mode of the entry says it is a submodule.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-10 12:41:35 -07:00
Junio C Hamano
fe0bb5f7bc builtin-mktree.c: use a helper function to handle one line of input
The main() function used to do the whole thing; this moves the handling of
a single input line to a separate function to make it easier to read.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-10 12:41:35 -07:00
Junio C Hamano
1fdee85c88 mktree: use parse-options
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-10 12:41:35 -07:00
Junio C Hamano
633e3556cc build-in git-mktree
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-10 12:41:35 -07:00
Renamed from mktree.c (Browse further)