Commit 471fd3f
match_explicit_lhs: allow a "verify only" mode
The match_explicit_lhs function has all of the logic
necessary to verify the refspecs without actually doing any
work. This patch lets callers pass a NULL "match" pointer to
indicate they want a "verify only" operation.
For the most part, we just need to avoid writing to the NULL
pointer. However, we also have to refactor the
try_explicit_object_name sub-function; it indicates success by
allocating and returning a new ref. Instead, we give it an
"out" parameter for the match and return a numeric status.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent f7ade3d commit 471fd3f
1 file changed
Lines changed: 24 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1031 | 1031 | | |
1032 | 1032 | | |
1033 | 1033 | | |
1034 | | - | |
| 1034 | + | |
| 1035 | + | |
1035 | 1036 | | |
1036 | 1037 | | |
1037 | 1038 | | |
1038 | | - | |
| 1039 | + | |
| 1040 | + | |
1039 | 1041 | | |
1040 | 1042 | | |
1041 | 1043 | | |
| |||
1055 | 1057 | | |
1056 | 1058 | | |
1057 | 1059 | | |
1058 | | - | |
| 1060 | + | |
| 1061 | + | |
1059 | 1062 | | |
1060 | 1063 | | |
1061 | | - | |
1062 | 1064 | | |
1063 | | - | |
1064 | | - | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
1065 | 1071 | | |
1066 | | - | |
1067 | | - | |
1068 | | - | |
1069 | | - | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
1070 | 1079 | | |
1071 | 1080 | | |
1072 | 1081 | | |
| |||
1103 | 1112 | | |
1104 | 1113 | | |
1105 | 1114 | | |
1106 | | - | |
| 1115 | + | |
| 1116 | + | |
1107 | 1117 | | |
1108 | 1118 | | |
1109 | 1119 | | |
1110 | 1120 | | |
1111 | 1121 | | |
1112 | 1122 | | |
1113 | | - | |
1114 | | - | |
| 1123 | + | |
1115 | 1124 | | |
1116 | | - | |
| 1125 | + | |
| 1126 | + | |
1117 | 1127 | | |
1118 | 1128 | | |
1119 | 1129 | | |
| |||
0 commit comments