From 5c942570fe2a48d8fde348e89392c2e9e23aa483 Mon Sep 17 00:00:00 2001 From: Eric Sunshine Date: Fri, 17 Jul 2015 19:00:09 -0400 Subject: worktree: add: suppress auto-vivication with --detach and no Fix oversight where branch auto-vivication incorrectly kicks in when --detach is specified and omitted. Instead, treat: git worktree add --detach as shorthand for: git worktree add --detach HEAD Signed-off-by: Eric Sunshine Signed-off-by: Junio C Hamano --- Documentation/git-worktree.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Documentation') diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt index 32344598c3..332dd7734d 100644 --- a/Documentation/git-worktree.txt +++ b/Documentation/git-worktree.txt @@ -51,9 +51,9 @@ Create `` and checkout `` into it. The new working directory is linked to the current repository, sharing everything except working directory specific files such as HEAD, index, etc. + -If `` is omitted and neither `-b` nor `-B` is used, then, as a -convenience, a new branch based at HEAD is created automatically, as if -`-b $(basename )` was specified. +If `` is omitted and neither `-b` nor `-B` nor `--detached` used, +then, as a convenience, a new branch based at HEAD is created automatically, +as if `-b $(basename )` was specified. prune:: -- cgit v1.2.3 From 5f5f553fd571732f6ff78107fb6223c5cf7b441f Mon Sep 17 00:00:00 2001 From: Eric Sunshine Date: Fri, 24 Jul 2015 00:00:52 -0400 Subject: Documentation/git-worktree: fix broken 'linkgit' invocation Signed-off-by: Eric Sunshine Signed-off-by: Junio C Hamano --- Documentation/git-worktree.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt index 332dd7734d..400b313538 100644 --- a/Documentation/git-worktree.txt +++ b/Documentation/git-worktree.txt @@ -27,7 +27,7 @@ bare repository) and zero or more linked working trees. When you are done with a linked working tree you can simply delete it. The working tree's administrative files in the repository (see "DETAILS" below) will eventually be removed automatically (see -`gc.worktreePruneExpire` in linkgit::git-config[1]), or you can run +`gc.worktreePruneExpire` in linkgit:git-config[1]), or you can run `git worktree prune` in the main or any linked working tree to clean up any stale administrative files. -- cgit v1.2.3 From 8cc88166c00e555f1bf5375017ed91b7e2cc904e Mon Sep 17 00:00:00 2001 From: Eric Sunshine Date: Tue, 28 Jul 2015 16:06:10 -0400 Subject: Documentation/config: mention "now" and "never" for 'expire' settings In addition to approxidate-style values ("2.months.ago", "yesterday"), consumers of 'gc.*expire*' configuration variables also accept and respect 'now' ("do it immediately") and 'never' ("suppress entirely"). Suggested-by: Michael Haggerty Signed-off-by: Eric Sunshine Signed-off-by: Junio C Hamano --- Documentation/config.txt | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'Documentation') diff --git a/Documentation/config.txt b/Documentation/config.txt index 583d24fda4..e09ee02df8 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -1226,20 +1226,24 @@ gc.packrefs:: 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:: '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 . @@ -1247,7 +1251,9 @@ 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 . -- cgit v1.2.3 From 65f9b75dfe34a67cf4c6a8507f999c5710d36ba9 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Tue, 4 Aug 2015 14:27:57 +0200 Subject: Documentation/git-worktree: fix duplicated 'from' Signed-off-by: Patrick Steinhardt Acked-by: Eric Sunshine Signed-off-by: Junio C Hamano --- Documentation/git-worktree.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt index 400b313538..fb68156cf8 100644 --- a/Documentation/git-worktree.txt +++ b/Documentation/git-worktree.txt @@ -124,7 +124,7 @@ thumb is do not make any assumption about whether a path belongs to $GIT_DIR or $GIT_COMMON_DIR when you need to directly access something inside $GIT_DIR. Use `git rev-parse --git-path` to get the final path. -To prevent a $GIT_DIR/worktrees entry from from being pruned (which +To prevent a $GIT_DIR/worktrees entry from being pruned (which can be useful in some situations, such as when the entry's working tree is stored on a portable device), add a file named 'locked' to the entry's directory. The file contains the reason in -- cgit v1.2.3