Skip to content

Commit

Permalink
Sync with 1.7.6.3
Browse files Browse the repository at this point in the history
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Sep 12, 2011
2 parents e494503 + 740a8fc commit 81a5bdd
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
4 changes: 4 additions & 0 deletions Documentation/RelNotes/1.7.6.3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ Fixes since v1.7.6.2
* "git -c var=value subcmd" misparsed the custom configuration when
value contained an equal sign.

* "git fetch" had a major performance regression, wasting many
needless cycles in a repository where there is no submodules
present. This was especially bad, when there were many refs.

* "git reflog $refname" did not default to the "show" subcommand as
the documentation advertised the command to do.

Expand Down
3 changes: 2 additions & 1 deletion Documentation/git.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ unreleased) version of git, that is available from 'master'
branch of the `git.git` repository.
Documentation for older releases are available here:

* link:v1.7.6.2/git.html[documentation for release 1.7.6.2]
* link:v1.7.6.3/git.html[documentation for release 1.7.6.3]

* release notes for
link:RelNotes/1.7.6.3.txt[1.7.6.3],
link:RelNotes/1.7.6.2.txt[1.7.6.2],
link:RelNotes/1.7.6.1.txt[1.7.6.1],
link:RelNotes/1.7.6.txt[1.7.6].
Expand Down
15 changes: 9 additions & 6 deletions builtin/fetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,15 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
argc = parse_options(argc, argv, prefix,
builtin_fetch_options, builtin_fetch_usage, 0);

if (recurse_submodules != RECURSE_SUBMODULES_OFF) {
if (recurse_submodules_default) {
int arg = parse_fetch_recurse_submodules_arg("--recurse-submodules-default", recurse_submodules_default);
set_config_fetch_recurse_submodules(arg);
}
gitmodules_config();
git_config(submodule_config, NULL);
}

if (all) {
if (argc == 1)
die(_("fetch --all does not take a repository argument"));
Expand Down Expand Up @@ -976,12 +985,6 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
if (!result && (recurse_submodules != RECURSE_SUBMODULES_OFF)) {
const char *options[10];
int num_options = 0;
if (recurse_submodules_default) {
int arg = parse_fetch_recurse_submodules_arg("--recurse-submodules-default", recurse_submodules_default);
set_config_fetch_recurse_submodules(arg);
}
gitmodules_config();
git_config(submodule_config, NULL);
add_options_to_argv(&num_options, options);
result = fetch_populated_submodules(num_options, options,
submodule_prefix,
Expand Down
4 changes: 4 additions & 0 deletions submodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,10 @@ void check_for_new_submodule_commits(unsigned char new_sha1[20])
const char *argv[] = {NULL, NULL, "--not", "--all", NULL};
int argc = ARRAY_SIZE(argv) - 1;

/* No need to check if there are no submodules configured */
if (!config_name_for_path.nr)
return;

init_revisions(&rev, NULL);
argv[1] = xstrdup(sha1_to_hex(new_sha1));
setup_revisions(argc, argv, &rev, NULL);
Expand Down

0 comments on commit 81a5bdd

Please sign in to comment.