1
0
mirror of https://github.com/git/git.git synced 2024-10-21 06:59:20 +02:00
git/builtin
brian m. carlson c5aecfc866 bundle: add new version for use with SHA-256
Currently we detect the hash algorithm in use by the length of the
object ID.  This is inelegant and prevents us from using a different
hash algorithm that is also 256 bits in length.

Since we cannot extend the v2 format in a backward-compatible way, let's
add a v3 format, which is identical, except for the addition of
capabilities, which are prefixed by an at sign.  We add "object-format"
as the only capability and reject unknown capabilities, since we do not
have a network connection and therefore cannot negotiate with the other
side.

For compatibility, default to the v2 format for SHA-1 and require v3
for SHA-256.

In t5510, always use format v3 so we can be sure we produce consistent
results across hash algorithms.  Since head -n N lists the top N lines
instead of the Nth line, let's run our output through sed to normalize
it and compare it against a fixed value, which will make sure we get
exactly what we're expecting.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-30 09:16:48 -07:00
..
add.c
am.c auto-gc: pass --quiet down from am, commit, merge and rebase 2020-05-07 12:24:35 -07:00
annotate.c
apply.c
archive.c
bisect--helper.c Merge branch 'cb/bisect-helper-parser-fix' 2020-06-08 18:06:32 -07:00
blame.c Merge branch 'dl/opt-callback-cleanup' 2020-05-05 14:54:27 -07:00
branch.c Merge branch 'es/get-worktrees-unsort' 2020-07-06 22:09:15 -07:00
bundle.c bundle: add new version for use with SHA-256 2020-07-30 09:16:48 -07:00
cat-file.c Merge branch 'cc/cat-file-usage-update' into master 2020-07-09 14:00:41 -07:00
check-attr.c
check-ignore.c
check-mailmap.c
check-ref-format.c
checkout-index.c
checkout.c Merge branch 'bc/filter-process' 2020-06-08 18:06:30 -07:00
clean.c clean: optimize and document cases where we recurse into subdirectories 2020-06-12 17:27:16 -07:00
clone.c Merge branch 'js/default-branch-name' 2020-07-06 22:09:17 -07:00
column.c
commit-graph.c Merge branch 'tb/commit-graph-no-check-oids' into master 2020-07-15 16:29:45 -07:00
commit-tree.c
commit.c Merge branch 'jc/auto-gc-quiet' 2020-05-13 12:19:19 -07:00
config.c worktree: drop get_worktrees() unused 'flags' argument 2020-06-22 10:31:15 -07:00
count-objects.c
credential.c
describe.c
diff-files.c diff-files: treat "i-t-a" files as "not-in-index" 2020-06-22 10:46:45 -07:00
diff-index.c
diff-tree.c
diff.c Merge branch 'ct/diff-with-merge-base-clarification' into master 2020-07-09 14:00:43 -07:00
difftool.c
env--helper.c
fast-export.c fast-export: use local array to store anonymized oid 2020-06-25 14:19:23 -07:00
fetch-pack.c Merge branch 'jt/cdn-offload' 2020-06-25 12:27:47 -07:00
fetch.c Merge branch 'xl/upgrade-repo-format' 2020-06-29 14:17:24 -07:00
fmt-merge-msg.c
for-each-ref.c Merge branch 'jk/for-each-ref-multi-key-sort-fix' 2020-05-08 14:25:04 -07:00
fsck.c Merge branch 'es/get-worktrees-unsort' 2020-07-06 22:09:15 -07:00
gc.c
get-tar-commit-id.c
grep.c Merge branch 'dl/opt-callback-cleanup' 2020-05-05 14:54:27 -07:00
hash-object.c
help.c Merge branch 'es/bugreport' 2020-05-01 13:39:59 -07:00
index-pack.c builtin/index-pack: add option to specify hash algorithm 2020-06-19 14:04:08 -07:00
init-db.c init: allow setting the default for the initial branch name via the config 2020-06-24 09:14:21 -07:00
interpret-trailers.c
log.c Merge branch 'dl/opt-callback-cleanup' 2020-05-05 14:54:27 -07:00
ls-files.c Merge branch 'dl/opt-callback-cleanup' 2020-05-05 14:54:27 -07:00
ls-remote.c builtin/ls-remote: initialize repository based on fetch 2020-05-27 10:07:07 -07:00
ls-tree.c
mailinfo.c
mailsplit.c
merge-base.c
merge-file.c
merge-index.c
merge-ours.c
merge-recursive.c
merge-tree.c
merge.c Merge branch 'an/merge-single-strategy-optim' 2020-06-02 13:35:01 -07:00
mktag.c
mktree.c
multi-pack-index.c
mv.c
name-rev.c
notes.c
pack-objects.c upload-pack: send part of packfile response as uri 2020-06-10 18:06:34 -07:00
pack-redundant.c
pack-refs.c
patch-id.c
prune-packed.c
prune.c Merge branch 'tb/shallow-cleanup' 2020-05-13 12:19:18 -07:00
pull.c Merge branch 'cb/is-descendant-of' 2020-07-06 22:09:16 -07:00
push.c Merge branch 'dl/push-recurse-submodules-fix' 2020-05-05 14:54:28 -07:00
range-diff.c
read-tree.c
rebase.c Merge branch 'jc/auto-gc-quiet' 2020-05-13 12:19:19 -07:00
receive-pack.c Merge branch 'bc/sha-256-part-2' 2020-07-06 22:09:13 -07:00
reflog.c Merge branch 'es/get-worktrees-unsort' 2020-07-06 22:09:15 -07:00
remote-ext.c
remote-fd.c
remote.c
repack.c Merge branch 'tb/shallow-cleanup' 2020-05-13 12:19:18 -07:00
replace.c
rerere.c
reset.c
rev-list.c
rev-parse.c Merge branch 'tb/shallow-cleanup' 2020-05-13 12:19:18 -07:00
revert.c
rm.c
send-pack.c
shortlog.c
show-branch.c
show-index.c builtin/show-index: provide options to determine hash algo 2020-05-27 10:07:07 -07:00
show-ref.c
sparse-checkout.c Merge branch 'xl/upgrade-repo-format' 2020-06-29 14:17:24 -07:00
stash.c Merge branch 'en/fill-directory-exponential' 2020-04-29 16:15:31 -07:00
stripspace.c
submodule--helper.c Merge branch 'js/default-branch-name' 2020-07-06 22:09:17 -07:00
symbolic-ref.c
tag.c Merge branch 'jk/for-each-ref-multi-key-sort-fix' 2020-05-08 14:25:04 -07:00
unpack-file.c
unpack-objects.c
update-index.c
update-ref.c
update-server-info.c
upload-archive.c
upload-pack.c
var.c
verify-commit.c
verify-pack.c builtin/verify-pack: implement an --object-format option 2020-07-30 09:16:48 -07:00
verify-tag.c
worktree.c Merge branch 'es/get-worktrees-unsort' 2020-07-06 22:09:15 -07:00
write-tree.c