Merge branch 'jk/skip-prefix'
* jk/skip-prefix: http-push: refactor parsing of remote object names imap-send: use skip_prefix instead of using magic numbers use skip_prefix to avoid repeated calculations git: avoid magic number with skip_prefix fetch-pack: refactor parsing in get_ack fast-import: refactor parsing of spaces stat_opt: check extra strlen call daemon: use skip_prefix to avoid magic numbers fast-import: use skip_prefix for parsing input use skip_prefix to avoid repeating strings use skip_prefix to avoid magic numbers transport-helper: avoid reading past end-of-string fast-import: fix read of uninitialized argv memory apply: use skip_prefix instead of raw addition refactor skip_prefix to return a boolean avoid using skip_prefix as a boolean daemon: mark some strings as const parse_diff_color_slot: drop ofs parameter
This commit is contained in:
5
remote.c
5
remote.c
@ -488,9 +488,8 @@ static void read_config(void)
|
||||
current_branch = NULL;
|
||||
head_ref = resolve_ref_unsafe("HEAD", sha1, 0, &flag);
|
||||
if (head_ref && (flag & REF_ISSYMREF) &&
|
||||
starts_with(head_ref, "refs/heads/")) {
|
||||
current_branch =
|
||||
make_branch(head_ref + strlen("refs/heads/"), 0);
|
||||
skip_prefix(head_ref, "refs/heads/", &head_ref)) {
|
||||
current_branch = make_branch(head_ref, 0);
|
||||
}
|
||||
git_config(handle_config, NULL);
|
||||
if (branch_pushremote_name) {
|
||||
|
||||
Reference in New Issue
Block a user