Support multiple checkouts
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v7 Latest31 patches 12 repliesIn review
- v632 patches 6 repliesSuperseded
- v528 patches 12 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v4 | 27 patches | 21 replies | Superseded | |
| v3 | 25 patches | 52 replies | Superseded |
Patches in v7 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/31 | path.c: make get_pathname() return strbuf instead of static bufferpath.c | +51 | 0 replies | |
| 2/31 | path.c: make get_pathname() call sites return const char *builtin/ builtin/ builtin/ +12 more | +36 | 0 replies | |
| 3/31 | git_snpath(): retire and replace with strbuf_git_path()builtin/ cache.h path.c +2 more | +61 | 0 replies | |
| 4/31 | path.c: rename vsnpath() to do_git_path()path.c | +4 | 0 replies | |
| 5/31 | path.c: group git_path(), git_pathdup() and strbuf_git_path() togetherpath.c | +10 | 0 replies | |
| 6/31 | git_path(): be aware of file relocation in $GIT_DIRDocumentation/ builtin/ cache.h +3 more | +95 | 0 replies | |
| 7/31 | *.sh: respect $GIT_INDEX_FILEgit-pull.sh git-stash.sh | +2 | 0 replies | |
| 8/31 | reflog: avoid constructing .lock path with git_pathbuiltin/ | +1 | 0 replies | |
| 9/31 | fast-import: use git_path() for accessing .git dir instead of get_git_dir()fast-import.c | +1 | 0 replies | |
| 10/31 | commit: use SEQ_DIR instead of hardcoding "sequencer"builtin/ | +1 | 0 replies | |
| 11/31 | $GIT_COMMON_DIR: a new environment variableDocumentation/ Documentation/ cache.h +3 more | +114 | 1 reply | |
| 12/31 | git-sh-setup.sh: use rev-parse --git-path to get $GIT_DIR/objectsgit-sh-setup.sh | +1 | 0 replies | |
| 13/31 | *.sh: avoid hardcoding $GIT_DIR/hooks/...git-am.sh git-rebase--interactive.sh git-rebase--merge.sh +3 more | +22 | 0 replies | |
| 14/31 | git-stash: avoid hardcoding $GIT_DIR/logs/....git-stash.sh | +2 | 0 replies | |
| 15/31 | setup.c: convert is_git_directory() to use strbufsetup.c | +21 | 0 replies | |
| 16/31 | setup.c: detect $GIT_COMMON_DIR in is_git_directory()Documentation/ setup.c | +44 | 0 replies | |
| 17/31 | setup.c: convert check_repository_format_gently to use strbufsetup.c | +8 | 0 replies | |
| 18/31 | setup.c: detect $GIT_COMMON_DIR check_repository_format_gently()setup.c | +4 | 0 replies | |
| 19/31 | setup.c: support multi-checkout repo setupDocumentation/ Documentation/ builtin/ +6 more | +115 | 0 replies | |
| 20/31 | wrapper.c: wrapper to open a file, fprintf then closecache.h wrapper.c | +33 | 0 replies | |
| 21/31 | use new wrapper write_file() for simple file writingbuiltin/ builtin/ daemon.c +2 more | +8 | 0 replies | |
| 22/31 | checkout: support checking out into a new working directoryDocumentation/ Documentation/ Documentation/ +3 more | +183 | 3 replies | |
| 23/31 | checkout: clean up half-prepared directories in --to modebuiltin/ | +47 | 3 replies | |
| 24/31 | checkout: detach if the branch is already checked out elsewherebuiltin/ t/ | +104 | 0 replies | |
| 25/31 | prune: strategies for linked checkoutsDocumentation/ Documentation/ builtin/ +3 more | +232 | 2 replies | |
| 26/31 | gc: style change -- no SP before closing bracketbuiltin/ | +1 | 0 replies | |
| 27/31 | gc: factor out gc.pruneexpire parsing codebuiltin/ | +13 | 0 replies | |
| 28/31 | gc: support prune --reposDocumentation/ builtin/ | +18 | 0 replies | |
| 29/31 | count-objects: report unused files in $GIT_DIR/repos/...builtin/ cache.h path.c | +31 | 0 replies | |
| 30/31 | git_path(): keep "info/sparse-checkout" per work-treepath.c t/ | +3 | 0 replies | |
| 31/31 | checkout: don't require a work tree when checking out into a new onebuiltin/ git.c t/ | +19 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v7 yet.
Cover letter [PATCH v7 00/31] Support multiple checkouts
v7 fixes all comments from Eric and Max. Jeff's two patches are dropped because they have landed in latest master now. Diff against v6:
Documentation/config.txt +1 -1
@@ -1215,7 +1215,7 @@ gc.prunereposexpire:: When 'git gc' is run, it will call 'prune --repos --expire 3.months.ago'. Override the grace period with this config variable. The value - "now" may be used to disable the grace period and always prune + "now" may be used to disable the grace period and prune $GIT_DIR/repos immediately. gc.reflogexpire::
builtin/checkout.c +11 -7
@@ -1010,15 +1010,13 @@ static int check_linked_checkout(struct branch_info *new, const char *name, const char *path) { struct strbuf sb = STRBUF_INIT; -char *start, *end; -if (strbuf_read_file (&sb, path,0 ) <0 ) -return 0 ; -if (!starts_with (sb.buf,"ref:" )) { +const char *start, *end; +if (strbuf_read_file (&sb, path,0 ) <0 || + !skip_prefix (sb.buf,"ref:" , &start)) {strbuf_release (&sb);return 0 ; } - start = sb.buf +4 ;while (isspace (*start)) start++; end = start;
@@ -1200,8 +1198,14 @@ static int parse_branchname_arg(int argc, const char **argv,else new->path =NULL ;/* not an existing branch */ -if (new->path) -check_linked_checkouts (new); +if (new->path) { +unsigned char sha1[20 ]; +int flag; +char *head_ref =resolve_refdup ("HEAD" , sha1,0 , &flag); +if (!(flag &REF_ISSYMREF ) ||strcmp (head_ref, new->path)) +check_linked_checkouts (new); +free (head_ref); + } new->commit =lookup_commit_reference_gently (rev,1 );if (!new->commit) {
builtin/gc.c +16 -17
@@ -57,6 +57,17 @@ static void remove_pidfile_on_signal(int signo)raise (signo); } +static int git_config_date_string (const char **output, +const char *var,const char *value) +{ +if (value &&strcmp (value,"now" )) { +unsigned long now =approxidate ("now" ); +if (approxidate (value) >= now) +return error (_ ("Invalid %s: '%s'" ), var, value); + } +return git_config_string (output, var, value); +} +static int gc_config (const char *var,const char *value,void *cb) {if (!strcmp (var,"gc.packrefs" )) {
@@ -86,22 +97,10 @@ static int gc_config(const char *var, const char *value, void *cb) detach_auto =git_config_bool (var, value);return 0 ; } -if (!strcmp (var,"gc.pruneexpire" )) { -if (value &&strcmp (value,"now" )) { -unsigned long now =approxidate ("now" ); -if (approxidate (value) >= now) -return error (_ ("Invalid %s: '%s'" ), var, value); - } -return git_config_string (&prune_expire, var, value); - } -if (!strcmp (var,"gc.prunereposexpire" )) { -if (value &&strcmp (value,"now" )) { -unsigned long now =approxidate ("now" ); -if (approxidate (value) >= now) -return error (_ ("Invalid %s: '%s'" ), var, value); - } -return git_config_string (&prune_repos_expire, var, value); - } +if (!strcmp (var,"gc.pruneexpire" )) +return git_config_date_string (&prune_expire, var, value); +if (!strcmp (var,"gc.prunereposexpire" )) +return git_config_date_string (&prune_repos_expire, var, value);return git_default_config (var, value, cb); }
@@ -295,7 +294,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix)OPT__QUIET (&quiet,N_ ("suppress progress reporting" )), { OPTION_STRING, 0, "prune", &prune_expire, N_("date"),N_ ("prune unreferenced objects" ), - PARSE_OPT_OPTARG, NULL, (intptr_t)prune_expire}, + PARSE_OPT_OPTARG, NULL, (intptr_t)prune_expire },OPT_BOOL (0 ,"aggressive" , &aggressive,N_ ("be more thorough (increased runtime)" )),OPT_BOOL (0 ,"auto" , &auto_gc,N_ ("enable auto-gc mode" )), OPT_BOOL(0, "force", &force, N_("force running gc even if there may be another gc running")),
builtin/prune.c +47 -22
111 lines not on this page · raw message
t/t2025-checkout-to.sh +8 -0
@@ -54,6 +54,14 @@ test_expect_success 'detach if the same branch is already checked out' ' ) ' +test_expect_success 'not detach on re-checking out current branch' ' + ( + cd there && + git checkout newmaster && + git symbolic-ref HEAD + ) +' + test_expect_success 'checkout --to from a bare repo' ' ( git clone --bare . bare &&
t/t2026-prune-linked-checkouts.sh new file +84 -0
84 lines not on this page · raw message
Signature · 1 line
1.9.1.346.ga2b5940