Re: [PATCH v6 07/14] commit-graph: implement 'git-commit-graph write'

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

 



On Mon, Mar 19 2018, Derrick Stolee jotted:

> On 3/19/2018 10:36 AM, Ævar Arnfjörð Bjarmason wrote:
>> On Mon, Mar 19 2018, Derrick Stolee jotted:
>>
>>> On 3/18/2018 9:25 AM, Ævar Arnfjörð Bjarmason wrote:
>>>> On Wed, Mar 14 2018, Derrick Stolee jotted:
>>>>
>>>>> +'git commit-graph write' <options> [--object-dir <dir>]
>>>>> +
>>>>> +
>>>>> +DESCRIPTION
>>>>> +-----------
>>>>> +
>>>>> +Manage the serialized commit graph file.
>>>>> +
>>>>> +
>>>>> +OPTIONS
>>>>> +-------
>>>>> +--object-dir::
>>>>> +	Use given directory for the location of packfiles and commit graph
>>>>> +	file. The commit graph file is expected to be at <dir>/info/commit-graph
>>>>> +	and the packfiles are expected to be in <dir>/pack.
>>>> Maybe this was covered in a previous round, this series is a little hard
>>>> to follow since each version isn't In-Reply-To the version before it,
>>>> but why is this option needed, i.e. why would you do:
>>>>
>>>>       git commit-graph write --object-dir=/some/path/.git/objects
>>>>
>>>> As opposed to just pigging-backing on what we already have with both of:
>>>>
>>>>       git --git-dir=/some/path/.git commit-graph write
>>>>       git -C /some/path commit-graph write
>>>>
>>>> Is there some use-case where you have *just* the objects dir and not the
>>>> rest of the .git folder?
>>> Yes, such as an alternate. If I remember correctly, alternates only
>>> need the objects directory.
>>>
>>> In the GVFS case, we place prefetch packfiles in an alternate so there
>>> is only one copy of the "remote objects" per drive. The commit graph
>>> will be stored in that alternate.
>> Makes sense, but we should really document this as being such an unusual
>> option, i.e. instead say something like.
>>
>>      Use given directory for the location of packfiles and commit graph
>>      file. Usually you'd use the `--git-dir` or `-C` arguments to `git`
>>      itself. This option is here to support obscure use-cases where we
>>      have a stand-alone object directory. The commit graph file is
>>      expected to be at <dir>/info/commit-graph and the packfiles are
>>      expected to be in <dir>/pack.
>
> A slight change to your recommendation:
>
>
> OPTIONS
> -------
> --object-dir::
>  Use given directory for the location of packfiles and commit graph
>  file. This parameter exists to specify the location of an alternate
>  that only has the objects directory, not a full .git directory. The
>  commit graph file is expected to be at <dir>/info/commit-graph and
>  the packfiles are expected to be in <dir>/pack.

Sounds good. Although I think we should add

    For full .git directories use the `--git-dir` or `-C` arguments to
    git itself.

I.e. for documenting an unusual option it makes sense to have docs in
the form "this is bit odd, usually you'd use XYZ", rather than just
"this is a bit odd"..



[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