From: Junio C Hamano Date: Sun, 31 Dec 2006 06:42:43 +0000 (-0800) Subject: Merge branch 'master' into sp/mmap X-Git-Tag: v1.5.0-rc1~64^2~3 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/76d4e079adba461c127641a1104772a62e38cd81?ds=inline;hp=-c Merge branch 'master' into sp/mmap * master: Documentation/config.txt (and repo-config manpage): mark-up fix. Teach Git how to parse standard power of 2 suffixes. Use /dev/null for update hook stdin. Redirect update hook stdout to stderr. Remove unnecessary argc parameter from run_command_v. Automatically detect a bare git repository. Replace "GIT_DIR" with GIT_DIR_ENVIRONMENT. Use PATH_MAX constant for --bare. Force core.filemode to false on Cygwin. Fix formatting for urls section of fetch, pull, and push manpages Fix yet another subtle xdl_merge() bug i18n: drop "encoding" header in the output after re-coding. commit-tree: cope with different ways "utf-8" can be spelled. Move commit reencoding parameter parsing to revision.c Documentation: minor rewording for git-log and git-show pages. Documentation: i18n commit log message notes. t3900: test log --encoding=none commit re-encoding: fix confusion between no and default conversion. --- 76d4e079adba461c127641a1104772a62e38cd81 diff --combined Documentation/config.txt index d71653dc65,2f4fc25258..744484b982 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@@ -82,13 -82,13 +82,13 @@@ core.logAllRefUpdates: only when the file exists. If this configuration variable is set to true, missing "$GIT_DIR/logs/" file is automatically created for branch heads. - - This information can be used to determine what commit - was the tip of a branch "2 days ago". - - This value is true by default in a repository that has - a working directory associated with it, and false by - default in a bare repository. + + + This information can be used to determine what commit + was the tip of a branch "2 days ago". + + + This value is true by default in a repository that has + a working directory associated with it, and false by + default in a bare repository. core.repositoryFormatVersion:: Internal variable identifying the repository format and layout @@@ -118,26 -118,6 +118,26 @@@ core.legacyheaders: database directly (where the "http://" and "rsync://" protocols count as direct access). +core.packedGitWindowSize:: + Number of bytes of a pack file to map into memory in a + single mapping operation. Larger window sizes may allow + your system to process a smaller number of large pack files + more quickly. Smaller window sizes will negatively affect + performance due to increased calls to the opreating system's + memory manager, but may improve performance when accessing + a large number of large pack files. Default is 32 MiB, + which should be reasonable for all users/operating systems. + You probably do not need to adjust this value. + +core.packedGitLimit:: + Maximum number of bytes to map simultaneously into memory + from pack files. If Git needs to access more than this many + bytes at once to complete an operation it will unmap existing + regions to reclaim virtual address space within the process. + Default is 256 MiB, which should be reasonable for all + users/operating systems, except on largest Git projects. + You probably do not need to adjust this value. + alias.*:: Command aliases for the gitlink:git[1] command wrapper - e.g. after defining "alias.last = cat-file commit HEAD", the invocation diff --combined config.c index 2e0d5a8681,458ae512f3..5cbd130be2 --- a/config.c +++ b/config.c @@@ -238,6 -238,12 +238,12 @@@ int git_config_int(const char *name, co int val = strtol(value, &end, 0); if (!*end) return val; + if (!strcasecmp(end, "k")) + return val * 1024; + if (!strcasecmp(end, "m")) + return val * 1024 * 1024; + if (!strcasecmp(end, "g")) + return val * 1024 * 1024 * 1024; } die("bad config value for '%s' in %s", name, config_file_name); } @@@ -298,21 -304,6 +304,21 @@@ int git_default_config(const char *var return 0; } + if (!strcmp(var, "core.packedgitwindowsize")) { + int pgsz = getpagesize(); + packed_git_window_size = git_config_int(var, value); + packed_git_window_size /= pgsz; + if (packed_git_window_size < 2) + packed_git_window_size = 2; + packed_git_window_size *= pgsz; + return 0; + } + + if (!strcmp(var, "core.packedgitlimit")) { + packed_git_limit = git_config_int(var, value); + return 0; + } + if (!strcmp(var, "user.name")) { strlcpy(git_default_name, value, sizeof(git_default_name)); return 0; @@@ -704,7 -695,7 +710,7 @@@ int git_config_set_multivar(const char } fstat(in_fd, &st); - contents = mmap(NULL, st.st_size, PROT_READ, + contents = xmmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, in_fd, 0); close(in_fd);