Name |
Last commit
|
Last update |
---|---|---|
.. | ||
badssl.c | ||
clone.c | ||
fetch.c | ||
fetchhead.c | ||
push.c | ||
push_util.c | ||
push_util.h | ||
remotes.c |
According to git-fetch(1), "[t]he colon can be omitted when <dst> is empty." So according to git, the refspec "refs/heads/master" is the same as the refspec "refs/heads/master:" when fetching changes. When trying to fetch from a remote with a trailing colon with libgit2, though, the fetch actually fails while it works when the trailing colon is left out. So obviously, libgit2 does _not_ treat these two refspec formats the same for fetches. The problem results from parsing refspecs, where the resulting refspec has its destination set to an empty string in the case of a trailing colon and to a `NULL` pointer in the case of no trailing colon. When passing this to our DWIM machinery, the empty string gets translated to "refs/heads/", which is simply wrong. Fix the problem by having the parsing machinery treat both cases the same for fetch refspecs.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
badssl.c | Loading commit data... | |
clone.c | Loading commit data... | |
fetch.c | Loading commit data... | |
fetchhead.c | Loading commit data... | |
push.c | Loading commit data... | |
push_util.c | Loading commit data... | |
push_util.h | Loading commit data... | |
remotes.c | Loading commit data... |