From: Junio C Hamano Date: Wed, 12 Aug 2015 21:09:56 +0000 (-0700) Subject: Merge branch 'es/worktree-add-cleanup' X-Git-Tag: v2.6.0-rc0~76 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/53860f03927fea9c46d64b556a06fffe4b46e41f Merge branch 'es/worktree-add-cleanup' The "new-worktree-mode" hack in "checkout" that was added in nd/multiple-work-trees topic has been removed by updating the implementation of new "worktree add". * es/worktree-add-cleanup: (25 commits) Documentation/git-worktree: fix duplicated 'from' Documentation/config: mention "now" and "never" for 'expire' settings Documentation/git-worktree: fix broken 'linkgit' invocation checkout: drop intimate knowledge of newly created worktree worktree: populate via "git reset --hard" rather than "git checkout" worktree: avoid resolving HEAD unnecessarily worktree: make setup of new HEAD distinct from worktree population worktree: detect branch-name/detached and error conditions locally worktree: add_worktree: construct worktree-population command locally worktree: elucidate environment variables intended for child processes worktree: make branch creation distinct from worktree population worktree: add: suppress auto-vivication with --detach and no worktree: make --detach mutually exclusive with -b/-B worktree: introduce options container worktree: simplify new branch (-b/-B) option checking worktree: improve worktree setup message branch: publish die_if_checked_out() checkout: teach check_linked_checkout() about symbolic link HEAD checkout: check_linked_checkout: simplify symref parsing checkout: check_linked_checkout: improve "already checked out" aesthetic ... --- 53860f03927fea9c46d64b556a06fffe4b46e41f diff --cc Documentation/config.txt index 1a8a399dd3,e09ee02df8..016f6e9f95 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@@ -1304,31 -1223,37 +1304,37 @@@ gc.packRefs: to enable it within all non-bare repos or it can be set to a boolean value. The default is `true`. -gc.pruneexpire:: +gc.pruneExpire:: When 'git gc' is run, it will call 'prune --expire 2.weeks.ago'. Override the grace period with this config variable. The value - "now" may be used to disable this grace period and always prune - unreachable objects immediately. + "now" may be used to disable this grace period and always prune + unreachable objects immediately, or "never" may be used to + suppress pruning. gc.worktreePruneExpire:: When 'git gc' is run, it calls 'git worktree prune --expire 3.months.ago'. This config variable can be used to set a different grace period. The value "now" may be used to disable the grace - period and prune $GIT_DIR/worktrees immediately. + period and prune $GIT_DIR/worktrees immediately, or "never" + may be used to suppress pruning. -gc.reflogexpire:: -gc..reflogexpire:: +gc.reflogExpire:: +gc..reflogExpire:: 'git reflog expire' removes reflog entries older than - this time; defaults to 90 days. With "" (e.g. + this time; defaults to 90 days. The value "now" expires all + entries immediately, and "never" suppresses expiration + altogether. With "" (e.g. "refs/stash") in the middle the setting applies only to the refs that match the . -gc.reflogexpireunreachable:: -gc..reflogexpireunreachable:: +gc.reflogExpireUnreachable:: +gc..reflogExpireUnreachable:: 'git reflog expire' removes reflog entries older than this time and are not reachable from the current tip; - defaults to 30 days. With "" (e.g. "refs/stash") + defaults to 30 days. The value "now" expires all entries + immediately, and "never" suppresses expiration altogether. + With "" (e.g. "refs/stash") in the middle, the setting applies only to the refs that match the . diff --cc builtin/worktree.c index 6a264ee749,5d9371cf95..430b51e7a7 --- a/builtin/worktree.c +++ b/builtin/worktree.c @@@ -3,9 -3,10 +3,11 @@@ #include "dir.h" #include "parse-options.h" #include "argv-array.h" + #include "branch.h" + #include "refs.h" #include "run-command.h" #include "sigchain.h" +#include "refs.h" static const char * const worktree_usage[] = { N_("git worktree add [] "),