summaryrefslogtreecommitdiff
path: root/reachable.c
diff options
context:
space:
mode:
authorLibravatar Stefan Beller <sbeller@google.com>2017-09-12 10:30:27 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-09-14 15:05:51 +0900
commit3c96aa97232367a24eef8b3b387f5ddae5b0c10f (patch)
tree63b2cfeb38174fdf5e607561c2a7b8feb9671550 /reachable.c
parentpack: make packed_git_mru global a value instead of a pointer (diff)
downloadtgif-3c96aa97232367a24eef8b3b387f5ddae5b0c10f.tar.xz
push, fetch: error out for submodule entries not pointing to commits
The check_has_commit helper uses resolves a submodule entry to a commit, when validating its existence. As a side effect this means tolerates a submodule entry pointing to a tag, which is not a valid submodule entry that git commands would know how to cope with. Tighten the check to require an actual commit, not a tag pointing to a commit. Also improve the error handling when a submodule entry points to non-commit (e.g., a blob) to error out instead of warning and pretending the pointed to object doesn't exist. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'reachable.c')
0 files changed, 0 insertions, 0 deletions