This variable was added because the repo_set_gitdir() was created to
cover both submodule and main repos, but these two are initialized a
bit differently so ignore_env == 0 means main repo, while ignore_env
!= 0 is submodules.
Since the difference part (env variables) has been moved out of
getenv() is supposed to work on the main repository only. This delayed
getenv() code in sha1_file.c makes it more difficult to convert
sha1_file.c to a generic object store that could be used by both
submodule and main repositories.
Move the getenv() back in setup_git_env() where other env vars
Signed-off-by: Nguyễn Thái Ngọc Duy
---
repository.c | 45 -
1 file changed, 45 deletions(-)
diff --git a/repository.c b/repository.c
index 70dc8dc661..be86da82cc 100644
--- a/repository.c
+++ b/repository.c
@@ -16,51 +16,6 @@
It does not make sense that generic repository code contains handling
of environment variables, which are specific for the main repository
only. Refactor repo_set_gitdir() function to take $GIT_DIR and
optionally _all_ other customizable paths. These optional paths can be
NULL and will be
It turns out I don't need my other series [1] in order to delete this
field. This series moves getenv() calls from
repo_set_gitdir()/repo_setup_env() and prepare_alt_odb() back in
environment.c where they belong in my opinion.
The repo_set_gitdir() now takes $GIT_DIR and optionally all other
On Mon, Feb 26, 2018 at 10:53 AM, Jeff King wrote:
> On Mon, Feb 26, 2018 at 10:04:22AM +0100, Christian Couder wrote:
>
>> ==21455== Use of uninitialised value of size 8
>> ==21455==at 0x2D2A73: get_hex_char_from_oid (sha1_name.c:492)
>> ==21455==by 0x2D2AFE:
On Thu, Feb 22, 2018 at 7:31 AM, Junio C Hamano wrote:
> * nd/worktree-move (2018-02-12) 7 commits
> - worktree remove: allow it when $GIT_WORK_TREE is already gone
> - worktree remove: new command
> - worktree move: refuse to move worktrees with submodules
> - worktree
On Mon, Feb 26, 2018 at 10:04:22AM +0100, Christian Couder wrote:
> ==21455== Use of uninitialised value of size 8
> ==21455==at 0x2D2A73: get_hex_char_from_oid (sha1_name.c:492)
> ==21455==by 0x2D2AFE: extend_abbrev_len (sha1_name.c:502)
> ==21455==by 0x2D2C3D:
On Fri, Feb 23, 2018 at 04:47:28PM -0800, Stefan Beller wrote:
> /* The main repository */
> static struct repository the_repo = {
> - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, _index,
> _algos[GIT_HASH_SHA1], 0, 0
> + NULL, NULL,
> + RAW_OBJECT_STORE_INIT,
> + NULL,
Hi Derrick,
These days when running:
./t5616-partial-clone.sh --valgrind
on master, I get a bunch of:
==21455== Use of uninitialised value of size 8
==21455==at 0x2D2A73: get_hex_char_from_oid (sha1_name.c:492)
==21455==by 0x2D2AFE: extend_abbrev_len (sha1_name.c:502)
==21455==by
On Fri, Feb 23, 2018 at 10:00:24PM +0100, René Scharfe wrote:
> How about adding a stealthy close_no_errno(), or do something like the
> following to get shorter and more readable code? (We could also keep
> a single close() call, but would then set errno even on success.)
> [...]
> @@ -391,7
On Fri, Feb 23, 2018 at 02:22:14PM -0800, Stefan Beller wrote:
> >> + /*
> >> + * A fast, rough count of the number of objects in the repository.
> >> + * These two fields are not meant for direct access. Use
> >> + * approximate_object_count() instead.
> >> + */
> >> +
101 - 112 of 112 matches
Mail list logo