Skip to content

Commit d4c5400

Browse files
committed
Merge branch 'ab/no-more-git-global-super-prefix'
Stop using "git --super-prefix" and narrow the scope of its use to the submodule--helper. * ab/no-more-git-global-super-prefix: read-tree: add "--super-prefix" option, eliminate global submodule--helper: convert "{update,clone}" to their own "--super-prefix" submodule--helper: convert "status" to its own "--super-prefix" submodule--helper: convert "sync" to its own "--super-prefix" submodule--helper: convert "foreach" to its own "--super-prefix" submodule--helper: don't use global --super-prefix in "absorbgitdirs" submodule.c & submodule--helper: pass along "super_prefix" param read-tree + fetch tests: test failing "--super-prefix" interaction submodule absorbgitdirs tests: add missing "Migrating git..." tests
2 parents bc58ebf + 4002ec3 commit d4c5400

20 files changed

+230
-180
lines changed

Documentation/git.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ SYNOPSIS
1313
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
1414
[-p|--paginate|-P|--no-pager] [--no-replace-objects] [--bare]
1515
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
16-
[--super-prefix=<path>] [--config-env=<name>=<envvar>]
17-
<command> [<args>]
16+
[--config-env=<name>=<envvar>] <command> [<args>]
1817

1918
DESCRIPTION
2019
-----------
@@ -169,11 +168,6 @@ If you just want to run git as if it was started in `<path>` then use
169168
details. Equivalent to setting the `GIT_NAMESPACE` environment
170169
variable.
171170

172-
--super-prefix=<path>::
173-
Currently for internal use only. Set a prefix which gives a path from
174-
above a repository down to its root. One use is to give submodules
175-
context about the superproject that invoked it.
176-
177171
--bare::
178172
Treat the repository as a bare repository. If GIT_DIR
179173
environment is not set, it is set to the current working

builtin.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@
5151
* on bare repositories.
5252
* This only makes sense when `RUN_SETUP` is also set.
5353
*
54-
* `SUPPORT_SUPER_PREFIX`:
55-
*
56-
* The built-in supports `--super-prefix`.
57-
*
5854
* `DELAY_PAGER_CONFIG`:
5955
*
6056
* If RUN_SETUP or RUN_SETUP_GENTLY is set, git.c normally handles

builtin/checkout.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ static int checkout_stage(int stage, const struct cache_entry *ce, int pos,
232232
pos++;
233233
}
234234
if (!overlay_mode) {
235-
unlink_entry(ce);
235+
unlink_entry(ce, NULL);
236236
return 0;
237237
}
238238
if (stage == 2)

builtin/read-tree.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ int cmd_read_tree(int argc, const char **argv, const char *cmd_prefix)
114114
int prefix_set = 0;
115115
struct lock_file lock_file = LOCK_INIT;
116116
const struct option read_tree_options[] = {
117+
OPT__SUPER_PREFIX(&opts.super_prefix),
117118
OPT_CALLBACK_F(0, "index-output", NULL, N_("file"),
118119
N_("write resulting index to <file>"),
119120
PARSE_OPT_NONEG, index_output_cb),

builtin/rm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ static void submodules_absorb_gitdir_if_needed(void)
8686
continue;
8787

8888
if (!submodule_uses_gitfile(name))
89-
absorb_git_dir_into_superproject(name);
89+
absorb_git_dir_into_superproject(name, NULL);
9090
}
9191
}
9292

0 commit comments

Comments
 (0)