diff options
| author | Junio C Hamano <gitster@pobox.com> | 2017-11-06 13:11:24 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2017-11-06 13:11:24 +0900 |
| commit | a823e3a7fc75c25677d7d6eaa9defc089412ff0e (patch) | |
| tree | ed3aea71a27fe2723467d4349b582ade991609c6 /builtin | |
| parent | Merge branch 'sb/diff-color-moved-use-xdl-recmatch' (diff) | |
| parent | worktree: handle broken symrefs in find_shared_symref() (diff) | |
| download | git-a823e3a7fc75c25677d7d6eaa9defc089412ff0e.tar.gz git-a823e3a7fc75c25677d7d6eaa9defc089412ff0e.zip | |
Merge branch 'jk/misc-resolve-ref-unsafe-fixes'
Some codepaths did not check for errors when asking what branch the
HEAD points at, which have been fixed.
* jk/misc-resolve-ref-unsafe-fixes:
worktree: handle broken symrefs in find_shared_symref()
log: handle broken HEAD in decoration check
remote: handle broken symrefs
test-ref-store: avoid passing NULL to printf
Diffstat (limited to 'builtin')
| -rw-r--r-- | builtin/remote.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/remote.c b/builtin/remote.c index 4f5cac96b0..bc89623695 100644 --- a/builtin/remote.c +++ b/builtin/remote.c @@ -565,7 +565,7 @@ static int read_remote_branches(const char *refname, item = string_list_append(rename->remote_branches, xstrdup(refname)); symref = resolve_ref_unsafe(refname, RESOLVE_REF_READING, NULL, &flag); - if (flag & REF_ISSYMREF) + if (symref && (flag & REF_ISSYMREF)) item->util = xstrdup(symref); else item->util = NULL; |
