From: Junio C Hamano Date: Mon, 31 Jan 2011 03:03:19 +0000 (-0800) Subject: Merge branch 'cb/ignored-paths-are-precious' into pu X-Git-Tag: ko-pu~11 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ce30a02f5b414741d19c9b7680671feba1c94a73;p=git.git Merge branch 'cb/ignored-paths-are-precious' into pu * cb/ignored-paths-are-precious: checkout/merge: optionally fail operation when ignored files need to be overwritten Conflicts: Documentation/config.txt builtin/checkout.c --- ce30a02f5b414741d19c9b7680671feba1c94a73 diff --cc Documentation/config.txt index c5e183516,fdaa586f0..312293799 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@@ -461,21 -450,13 +461,28 @@@ core.excludesfile: to the value of `$HOME` and "{tilde}user/" to the specified user's home directory. See linkgit:gitignore[5]. +core.askpass:: + Some commands (e.g. svn and http interfaces) that interactively + ask for a password can be told to use an external program given + via the value of this variable. Can be overridden by the 'GIT_ASKPASS' + environment variable. If not set, fall back to the value of the + 'SSH_ASKPASS' environment variable or, failing that, a simple password + prompt. The external program shall be given a suitable prompt as + command line argument and write the password on its STDOUT. + +core.attributesfile:: + In addition to '.gitattributes' (per-directory) and + '.git/info/attributes', git looks into this file for attributes + (see linkgit:gitattributes[5]). Path expansions are made the same + way as for `core.excludesfile`. + + core.ignoredareprecious:: + By default ignored (i.e. trashable) untracked files are + automatically removed from the working tree when they get in + the way of merge or switching between branches. This option + declares that such files are precious instead, and prevents + merges and checkouts from succeeding. + core.editor:: Commands such as `commit` and `tag` that lets you edit messages by launching an editor uses the value of this diff --cc builtin/checkout.c index d3cfaf0f4,cb83e6a63..0ca8f6a20 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@@ -691,16 -670,18 +693,18 @@@ int cmd_checkout(int argc, const char * "create and checkout a new branch"), OPT_STRING('B', NULL, &opts.new_branch_force, "branch", "create/reset and checkout a branch"), - OPT_BOOLEAN('l', NULL, &opts.new_branch_log, "log for new branch"), - OPT_SET_INT('t', "track", &opts.track, "track", + OPT_BOOLEAN('l', NULL, &opts.new_branch_log, "create reflog for new branch"), + OPT_SET_INT('t', "track", &opts.track, "set upstream info for new branch", BRANCH_TRACK_EXPLICIT), OPT_STRING(0, "orphan", &opts.new_orphan_branch, "new branch", "new unparented branch"), - OPT_SET_INT('2', "ours", &opts.writeout_stage, "stage", + OPT_SET_INT('2', "ours", &opts.writeout_stage, "checkout our version for unmerged files", 2), - OPT_SET_INT('3', "theirs", &opts.writeout_stage, "stage", + OPT_SET_INT('3', "theirs", &opts.writeout_stage, "checkout their version for unmerged files", 3), - OPT_BOOLEAN('f', "force", &opts.force, "force"), + OPT__FORCE(&opts.force, "force checkout (throw away local modifications)"), + OPT_BOOLEAN('i', "ignored-are-precious", &ignored_are_precious, + "fail when an ignored file needs to be overwritten"), - OPT_BOOLEAN('m', "merge", &opts.merge, "merge"), + OPT_BOOLEAN('m', "merge", &opts.merge, "perform a 3-way merge with the new branch"), OPT_STRING(0, "conflict", &conflict_style, "style", "conflict style (merge or diff3)"), OPT_BOOLEAN('p', "patch", &patch_mode, "select hunks interactively"),