Commit 3c96aa9
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>1 parent 607bd83 commit 3c96aa9
2 files changed
+35
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
767 | 767 | | |
768 | 768 | | |
769 | 769 | | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
770 | 775 | | |
771 | 776 | | |
772 | | - | |
| 777 | + | |
773 | 778 | | |
774 | | - | |
775 | | - | |
| 779 | + | |
776 | 780 | | |
777 | | - | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
778 | 795 | | |
779 | 796 | | |
780 | 797 | | |
781 | 798 | | |
782 | | - | |
| 799 | + | |
783 | 800 | | |
784 | 801 | | |
785 | 802 | | |
| |||
795 | 812 | | |
796 | 813 | | |
797 | 814 | | |
798 | | - | |
| 815 | + | |
799 | 816 | | |
800 | 817 | | |
801 | 818 | | |
| |||
814 | 831 | | |
815 | 832 | | |
816 | 833 | | |
817 | | - | |
| 834 | + | |
818 | 835 | | |
819 | 836 | | |
820 | 837 | | |
821 | 838 | | |
822 | | - | |
| 839 | + | |
823 | 840 | | |
824 | 841 | | |
825 | 842 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
301 | 311 | | |
302 | 312 | | |
303 | 313 | | |
| |||
0 commit comments