From: Junio C Hamano Date: Wed, 14 Mar 2007 22:59:04 +0000 (-0700) Subject: Merge GIT 1.5.0.4 X-Git-Tag: v1.5.1-rc1~27 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/803527f1d9b284fa848d4a4bad23158c162a5d54?ds=inline;hp=-c Merge GIT 1.5.0.4 --- 803527f1d9b284fa848d4a4bad23158c162a5d54 diff --combined Documentation/git-config.txt index 68de5881bd,ccb8b36f9a..c759efb7fc --- a/Documentation/git-config.txt +++ b/Documentation/git-config.txt @@@ -16,8 -16,6 +16,8 @@@ SYNOPSI 'git-config' [--global] [type] --get-all name [value_regex] 'git-config' [--global] [type] --unset name [value_regex] 'git-config' [--global] [type] --unset-all name [value_regex] +'git-config' [--global] [type] --rename-section old_name new_name +'git-config' [--global] [type] --remove-section name 'git-config' [--global] -l | --list DESCRIPTION @@@ -76,17 -74,11 +76,17 @@@ OPTION --global:: Use global ~/.gitconfig file rather than the repository .git/config. +--remove-section:: + Remove the given section from the configuration file. + +--rename-section:: + Rename the given section to a new name. + --unset:: Remove the line matching the key from config file. --unset-all:: - Remove all matching lines from config file. + Remove all lines matching the key from config file. -l, --list:: List all variables set in config file. diff --combined git-checkout.sh index 6caa9fdcc6,83b2639d6f..fcadf200ee --- a/git-checkout.sh +++ b/git-checkout.sh @@@ -12,7 -12,6 +12,7 @@@ new new_name= force= branch= +track= newbranch= newbranch_log= merge= @@@ -34,10 -33,7 +34,10 @@@ while [ "$#" != "0" ]; d die "git checkout: we do not like '$newbranch' as a branch name." ;; "-l") - newbranch_log=1 + newbranch_log=-l + ;; + "--track"|"--no-track") + track="$arg" ;; "-f") force=1 @@@ -89,11 -85,6 +89,11 @@@ esac done +case "$new_branch,$track" in +,--*) + die "git checkout: --track and --no-track require -b" +esac + case "$force$merge" in 11) die "git checkout: -f and -m are incompatible" @@@ -205,7 -196,7 +205,7 @@@ els work=`git write-tree` && git read-tree --reset -u $new || exit - eval GITHEAD_$new=${new_name:-${branch:-$new}} && + eval GITHEAD_$new='${new_name:-${branch:-$new}}' && eval GITHEAD_$work=local && export GITHEAD_$new GITHEAD_$work && git merge-recursive $old -- $new $work @@@ -244,7 -235,11 +244,7 @@@ f # if [ "$?" -eq 0 ]; then if [ "$newbranch" ]; then - if [ "$newbranch_log" ]; then - mkdir -p $(dirname "$GIT_DIR/logs/refs/heads/$newbranch") - touch "$GIT_DIR/logs/refs/heads/$newbranch" - fi - git-update-ref -m "checkout: Created from $new_name" "refs/heads/$newbranch" $new || exit + git-branch $track $newbranch_log "$newbranch" "$new_name" || exit branch="$newbranch" fi if test -n "$branch"