threads / patch / 36542

v2Document RUN_SETUP_GENTLY

Subject: [PATCH v2] Document RUN_SETUP_GENTLY

## tl;dr

2 messages between Apr 29, 2014 and Apr 30, 2014. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

David Turner· Apr 29, 2014, 19:21 UTC · lore

Sorry about that -- the documentation of RUN_SETUP confused me. So I have a new patch that edits that as well.

-- RUN_SETUP_GENTLY and improve RUN_SETUP docs

Signed-off-by: David Turner <dturner@twitter.com>
---
 Documentation/technical/api-builtin.txt | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
Show changes to Documentation/technical/api-builtin.txt +9 −4
diff --git a/Documentation/technical/api-builtin.txt
b/Documentation/technical/api-builtin.txt
index e3d6e7a..b250c1a 100644
--- a/Documentation/technical/api-builtin.txt
+++ b/Documentation/technical/api-builtin.txt
@@ -23,10 +23,15 @@ where options is the bitwise-or of:

 `RUN_SETUP`::

- Make sure there is a Git directory to work on, and if there is a
- work tree, chdir to the top of it if the command was invoked
- in a subdirectory.  If there is no work tree, no chdir() is
- done.
+ If there is not a Git directory to work on, abort.  If there
+ is a work tree, chdir to the top of it if the command was
+ invoked in a subdirectory.  If there is no work tree, no
+ chdir() is done.
+
+`RUN_SETUP_GENTLY`::
+
+ If there is a Git directory, chdir as per RUN_SETUP, otherwise,
+ don't chdir anywhere.

 `USE_PAGER`::
-- 
On Tue, Apr 29, 2014 at 2:25 PM, Junio C Hamano <gitster@pobox.com> wrote:
> David Turner <dturner@twopensource.com> writes:
>
>> Document RUN_SETUP_GENTLY
>>
>> Signed-off-by: David Turner <dturner@twitter.com>
>> ---
>>  Documentation/technical/api-builtin.txt | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/Documentation/technical/api-builtin.txt
>> b/Documentation/technical/api-builtin.txt
>> index e3d6e7a..1bbeda2 100644
>> --- a/Documentation/technical/api-builtin.txt
>> +++ b/Documentation/technical/api-builtin.txt
>> @@ -28,6 +28,11 @@ where options is the bitwise-or of:
>>   in a subdirectory.  If there is no work tree, no chdir() is
>>   done.
>>
>> +`RUN_SETUP_GENTLY`::
>> +
>> + If there is a Git directory, chdir as per RUN_SETUP, otherwise,
>> + don't create one and don't chdir.
>
> I can understand "don't chdir" part, but where does "don't create"
> come from?  Makes it sound as if non GENTLY version would create one
> if there isn't there, but I am guessing that that is not what you
> meant to say.
>
> Puzzled.
>
Junio C Hamano· Apr 30, 2014, 18:29 UTC · re: David Turner · lore

Re: [PATCH v2] Document RUN_SETUP_GENTLY

David Turner <dturner@twopensource.com> writes:
Show 8 quoted lines
> Sorry about that -- the documentation of RUN_SETUP confused me.  So I
> have a new patch that edits that as well.
>
> --
> RUN_SETUP_GENTLY and improve RUN_SETUP docs
>
> Signed-off-by: David Turner <dturner@twitter.com>
> ---

You do not want to have "Sorry about that..." in your final commit log message. Please do the above this way if you wanted to:

	Sorry about that ...
	-- >8 --
	Subject: docs: document RUN_SETUP_GENTLY and clarify RUN_SETUP
	We only said what happens when we find the Git directory under
	RUN_SETUP, without saying what happens otherwise.
	Signed-off-by: ...
	---
        $DIFFSTAT
        $PATCH
Show 14 quoted lines
>  Documentation/technical/api-builtin.txt | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/technical/api-builtin.txt
> b/Documentation/technical/api-builtin.txt
> index e3d6e7a..b250c1a 100644
> --- a/Documentation/technical/api-builtin.txt
> +++ b/Documentation/technical/api-builtin.txt
> @@ -23,10 +23,15 @@ where options is the bitwise-or of:
>
>  `RUN_SETUP`::
>
> - Make sure there is a Git directory to work on, and if there is a
> - work tree, chdir to the top of it if the command was invoked
Your mailer ate all the whitespaces and folded the lines, it seems.

I'll fix it up and queue the result on 'pu', so please eyeball it and holler if I made a silly mistake while doing the fixup.

Thanks.
Show 13 quoted lines
> - in a subdirectory.  If there is no work tree, no chdir() is
> - done.
> + If there is not a Git directory to work on, abort.  If there
> + is a work tree, chdir to the top of it if the command was
> + invoked in a subdirectory.  If there is no work tree, no
> + chdir() is done.
> +
> +`RUN_SETUP_GENTLY`::
> +
> + If there is a Git directory, chdir as per RUN_SETUP, otherwise,
> + don't chdir anywhere.
>
>  `USE_PAGER`::

← back to recent threads