diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-12-27 11:16:25 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-12-27 11:16:25 -0800 |
commit | 0faff988eed719c53daf470cf0a88c26d0e83525 (patch) | |
tree | 418f15e9ae3b21871a5a7d8b0dcc732c83095bcf /branch.c | |
parent | a13e45f1e7e6fc02d4e10e0589578a77e84f3ffb (diff) | |
parent | 255073ca59de7cd293e4a9d6c12831b6e505c37e (diff) | |
download | git-0faff988eed719c53daf470cf0a88c26d0e83525.tar.gz |
Merge branch 'ks/branch-cleanup'
Code clean-up.
* ks/branch-cleanup:
builtin/branch: strip refs/heads/ using skip_prefix
branch: update warning message shown when copying a misnamed branch
branch: group related arguments of create_branch()
branch: improve documentation and naming of create_branch() parameters
Diffstat (limited to 'branch.c')
-rw-r--r-- | branch.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -244,7 +244,7 @@ N_("\n" "\"git push -u\" to set the upstream config as you push."); void create_branch(const char *name, const char *start_name, - int force, int reflog, int clobber_head, + int force, int clobber_head_ok, int reflog, int quiet, enum branch_track track) { struct commit *commit; @@ -258,7 +258,7 @@ void create_branch(const char *name, const char *start_name, if (track == BRANCH_TRACK_EXPLICIT || track == BRANCH_TRACK_OVERRIDE) explicit_tracking = 1; - if ((track == BRANCH_TRACK_OVERRIDE || clobber_head) + if ((track == BRANCH_TRACK_OVERRIDE || clobber_head_ok) ? validate_branchname(name, &ref) : validate_new_branchname(name, &ref, force)) { if (!force) |