revwalk: ignore wrong object type in glob pushes

Pushing a whole namespace can cause us to attempt to push non-committish
objects. Catch this situation and special-case it for ignoring this.
This commit is contained in:
Carlos Martín Nieto
2014-02-01 15:19:13 +01:00
parent b4ef67d5eb
commit d465e4e980
3 changed files with 32 additions and 13 deletions

View File

@@ -110,6 +110,9 @@ GIT_EXTERN(int) git_revwalk_push(git_revwalk *walk, const git_oid *id);
* A leading 'refs/' is implied if not present as well as a trailing
* '/ *' if the glob lacks '?', '*' or '['.
*
* Any references matching this glob which do not point to a
* committish will be ignored.
*
* @param walk the walker being used for the traversal
* @param glob the glob pattern references should match
* @return 0 or an error code
@@ -149,6 +152,9 @@ GIT_EXTERN(int) git_revwalk_hide(git_revwalk *walk, const git_oid *commit_id);
* A leading 'refs/' is implied if not present as well as a trailing
* '/ *' if the glob lacks '?', '*' or '['.
*
* Any references matching this glob which do not point to a
* committish will be ignored.
*
* @param walk the walker being used for the traversal
* @param glob the glob pattern references should match
* @return 0 or an error code