From: Junio C Hamano Date: Mon, 2 Dec 2013 23:34:44 +0000 (-0800) Subject: Sync with 1.8.4.5 X-Git-Tag: v1.8.5.1~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/be38bee862d628e29043b3f680580ceb24a6ba1e?hp=-c Sync with 1.8.4.5 --- be38bee862d628e29043b3f680580ceb24a6ba1e diff --combined Documentation/git.txt index b73a24a3c7,8f7a4607be..4545afbd9e --- a/Documentation/git.txt +++ b/Documentation/git.txt @@@ -9,7 -9,7 +9,7 @@@ git - the stupid content tracke SYNOPSIS -------- [verse] -'git' [--version] [--help] [-c =] +'git' [--version] [--help] [-C ] [-c =] [--exec-path[=]] [--html-path] [--man-path] [--info-path] [-p|--paginate|--no-pager] [--no-replace-objects] [--bare] [--git-dir=] [--work-tree=] [--namespace=] @@@ -43,14 -43,10 +43,15 @@@ unreleased) version of Git, that is ava branch of the `git.git` repository. Documentation for older releases are available here: +* link:v1.8.5/git.html[documentation for release 1.8.5] + +* release notes for + link:RelNotes/1.8.5.txt[1.8.5]. + - * link:v1.8.4.4/git.html[documentation for release 1.8.4.4] + * link:v1.8.4.5/git.html[documentation for release 1.8.4.5] * release notes for + link:RelNotes/1.8.4.5.txt[1.8.4.5], link:RelNotes/1.8.4.4.txt[1.8.4.4], link:RelNotes/1.8.4.3.txt[1.8.4.3], link:RelNotes/1.8.4.2.txt[1.8.4.2], @@@ -404,20 -400,6 +405,20 @@@ displayed. See linkgit:git-help[1] for because `git --help ...` is converted internally into `git help ...`. +-C :: + Run as if git was started in '' instead of the current working + directory. When multiple `-C` options are given, each subsequent + non-absolute `-C ` is interpreted relative to the preceding `-C + `. ++ +This option affects options that expect path name like `--git-dir` and +`--work-tree` in that their interpretations of the path names would be +made relative to the working directory caused by the `-C` option. For +example the following invocations are equivalent: + + git --git-dir=a.git --work-tree=b -C c status + git --git-dir=c/a.git --work-tree=c/b status + -c =:: Pass a configuration parameter to the command. The value given will override values from configuration files. @@@ -480,25 -462,10 +481,25 @@@ linkgit:git-replace[1] for more information. --literal-pathspecs:: - Treat pathspecs literally, rather than as glob patterns. This is - equivalent to setting the `GIT_LITERAL_PATHSPECS` environment + Treat pathspecs literally (i.e. no globbing, no pathspec magic). + This is equivalent to setting the `GIT_LITERAL_PATHSPECS` environment variable to `1`. +--glob-pathspecs:: + Add "glob" magic to all pathspec. This is equivalent to setting + the `GIT_GLOB_PATHSPECS` environment variable to `1`. Disabling + globbing on individual pathspecs can be done using pathspec + magic ":(literal)" + +--noglob-pathspecs:: + Add "literal" magic to all pathspec. This is equivalent to setting + the `GIT_NOGLOB_PATHSPECS` environment variable to `1`. Enabling + globbing on individual pathspecs can be done using pathspec + magic ":(glob)" + +--icase-pathspecs:: + Add "icase" magic to all pathspec. This is equivalent to setting + the `GIT_ICASE_PATHSPECS` environment variable to `1`. GIT COMMANDS ------------ @@@ -861,7 -828,7 +862,7 @@@ for further details 'GIT_FLUSH':: If this environment variable is set to "1", then commands such as 'git blame' (in incremental mode), 'git rev-list', 'git log', - 'git check-attr', 'git check-ignore', and 'git whatchanged' will + 'git check-attr' and 'git check-ignore' will force a flush of the output stream after each record have been flushed. If this variable is set to "0", the output of these commands will be done @@@ -905,28 -872,6 +906,28 @@@ GIT_LITERAL_PATHSPECS: literal paths to Git (e.g., paths previously given to you by `git ls-tree`, `--raw` diff output, etc). +GIT_GLOB_PATHSPECS:: + Setting this variable to `1` will cause Git to treat all + pathspecs as glob patterns (aka "glob" magic). + +GIT_NOGLOB_PATHSPECS:: + Setting this variable to `1` will cause Git to treat all + pathspecs as literal (aka "literal" magic). + +GIT_ICASE_PATHSPECS:: + Setting this variable to `1` will cause Git to treat all + pathspecs as case-insensitive. + +'GIT_REFLOG_ACTION':: + When a ref is updated, reflog entries are created to keep + track of the reason why the ref was updated (which is + typically the name of the high-level command that updated + the ref), in addition to the old and new values of the ref. + A scripted Porcelain command can use set_reflog_action + helper function in `git-sh-setup` to set its name to this + variable when it is invoked as the top level command by the + end user, to be recorded in the body of the reflog. + Discussion[[Discussion]] ------------------------ diff --combined git-submodule.sh index 896f1c9b82,83917d8055..66f5f752c5 --- a/git-submodule.sh +++ b/git-submodule.sh @@@ -612,11 -612,21 +612,21 @@@ cmd_init( fi # Copy "update" setting when it is not set yet - upd="$(git config -f .gitmodules submodule."$name".update)" - test -z "$upd" || - test -n "$(git config submodule."$name".update)" || - git config submodule."$name".update "$upd" || - die "$(eval_gettext "Failed to register update mode for submodule path '\$displaypath'")" + if upd="$(git config -f .gitmodules submodule."$name".update)" && + test -n "$upd" && + test -z "$(git config submodule."$name".update)" + then + case "$upd" in + rebase | merge | none) + ;; # known modes of updating + *) + echo >&2 "warning: unknown update mode '$upd' suggested for submodule '$name'" + upd=none + ;; + esac + git config submodule."$name".update "$upd" || + die "$(eval_gettext "Failed to register update mode for submodule path '\$displaypath'")" + fi done } @@@ -1032,20 -1042,13 +1042,20 @@@ cmd_summary() # Get modified modules cared by user modules=$(git $diff_cmd $cached --ignore-submodules=dirty --raw $head -- "$@" | sane_egrep '^:([0-7]* )?160000' | - while read mod_src mod_dst sha1_src sha1_dst status name + while read mod_src mod_dst sha1_src sha1_dst status sm_path do # Always show modules deleted or type-changed (blob<->module) - test $status = D -o $status = T && echo "$name" && continue + test $status = D -o $status = T && echo "$sm_path" && continue + # Respect the ignore setting for --for-status. + if test -n "$for_status" + then + name=$(module_name "$sm_path") + ignore_config=$(get_submodule_config "$name" ignore none) + test $status != A -a $ignore_config = all && continue + fi # Also show added or modified modules which are checked out - GIT_DIR="$name/.git" git-rev-parse --git-dir >/dev/null 2>&1 && - echo "$name" + GIT_DIR="$sm_path/.git" git-rev-parse --git-dir >/dev/null 2>&1 && + echo "$sm_path" done ) @@@ -1156,7 -1159,18 +1166,7 @@@ echo fi echo - done | - if test -n "$for_status"; then - if [ -n "$files" ]; then - gettextln "Submodules changed but not updated:" | git stripspace -c - else - gettextln "Submodule changes to be committed:" | git stripspace -c - fi - printf "\n" | git stripspace -c - git stripspace -c - else - cat - fi + done } # # List all submodules, prefixed with: