Re: [PATCH v2 1/3] builtin: add a repository parameter for builtin functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> "John Cai via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:
>
>>  git.c                              |  12 +-
>>  help.c                             |   3 +-
>>  stkOs5Qh                           | Bin 0 -> 10485768 bytes
>
> WTH is this file?

It turns out to be an "ar" archive full of *.o files.  Perhaps
creation of libgit.a was interrupted, then later somebody said
"git add .", and the file somehow ended up as a part of Git.

I've applied the series after removing the cruft.

The overall thrust to pass the repository found by the setup step to
builtins as a parameter is a very good one, as most of the Git
commands are designed to work in a repository.

With this, can commands that are marked with RUN_SETUP_GENTLY rely
on the NULL-ness of repo parameter to decide if they are in a
repository or running outside a repository?

The "nongit?" status returned from setup_git_directory_gently() call
made by git.c:run_builtin() is thrown away and not passed to the
builtin functions at all, so some of them currently may be doing
another discovery themselves, and if we can replace such a wasteful
setup_git_directory_gently() call, it would be nice, and passing the
discovered repository instance to builtin commands is a good first
step to go there.

Thanks.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux