threads / patch / 34986

v3, 2 partsdoc: command line interface (cli) dot-repository dwimmery

Subject: [PATCH V3 1/2] doc: command line interface (cli) dot-repository dwimmery

## tl;dr

5 messages between Sep 21, 2013 and Oct 16, 2013. Diffs are folded; open one to read it.

replies: 4people: 2as markdown or json

Philip Oakley· Sep 21, 2013, 15:11 UTC · lore

[PATCH V3 0/2] Extend dot repository documentation

This completes the patch series on adding short notes about the dot repository capability in git, which is a consequence of the relative path '.' being used as a repository URL.

The previous 2/3 was accepted and is not repeated here. Patch 3/3 is now an ammendment 1/2 Patch 1/3 is corrected and is now 2/2

The first patch is a minor update that give the dot repository note its own bullet, and updates the wording to imply repository discovery from the current directory.

The second patch updates the Git URLs section to include a specific note about relative paths and its use as a dot repository.

It should be noted that repository discovery is not well covered in the documentation but is distributed among a number sections. This could do with a small section somewhere..

Philip Oakley (2):
  doc: command line interface (cli) dot-repository dwimmery
  Doc URLs: relative paths imply the dot-respository
 Documentation/gitcli.txt | 8 ++++----
 Documentation/urls.txt   | 8 ++++++++
 2 files changed, 12 insertions(+), 4 deletions(-)
-- 
1.8.1.msysgit.1
Philip Oakley· Sep 21, 2013, 15:11 UTC · re: Philip Oakley · lore

The Git cli will accept dot '.' (period) as the relative path, and thus the current repository. Explain this action.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
This updates 431260cc8dd
 Documentation/gitcli.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Show changes to Documentation/gitcli.txt +4 −4
diff --git a/Documentation/gitcli.txt b/Documentation/gitcli.txt
index b065c0e..50e4ce0 100644
--- a/Documentation/gitcli.txt
+++ b/Documentation/gitcli.txt
@@ -58,10 +58,10 @@ the paths in the index that match the pattern to be checked out to your
 working tree.  After running `git add hello.c; rm hello.c`, you will _not_
 see `hello.c` in your working tree with the former, but with the latter
 you will.
-+
-Just as the filesystem '.' (period) refers to the current directory,
-using a '.' as a repository name in Git (a dot-repository) is a relative
-path for your current repository.
+
+ * Just as the filesystem '.' (period) refers to the current directory,
+   using a '.' as a repository name in Git (a dot-repository) is a relative
+   path and hence will be your current repository.
 
 Here are the rules regarding the "flags" that you should follow when you are
 scripting Git:
-- 
1.8.1.msysgit.1
Junio C Hamano· Oct 15, 2013, 21:57 UTC · re: Philip Oakley · lore

Re: [PATCH V3 1/2] doc: command line interface (cli) dot-repository dwimmery

Philip Oakley <philipoakley@iee.org> writes:
Show 7 quoted lines
> The Git cli will accept dot '.' (period) as the relative path,
> and thus the current repository. Explain this action.
>
> Signed-off-by: Philip Oakley <philipoakley@iee.org>
> ---
>
> This updates 431260cc8dd

It appears that the original has already been merged to 'next', so we need to make this incremental on top. I'll queue this on top.

-- >8 --
From: Philip Oakley <philipoakley@iee.org>
Subject: doc/cli: make "dot repository" an independent bullet point

The way to spell the current repository with a '.' dot is independent from how the pathspec allows globs expanded by Git.

Make them two separate bullet items in the enumeration.
Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 Documentation/gitcli.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Show changes to Documentation/gitcli.txt +4 −4
diff --git a/Documentation/gitcli.txt b/Documentation/gitcli.txt
index 1672842..24e1784 100644
--- a/Documentation/gitcli.txt
+++ b/Documentation/gitcli.txt
@@ -58,10 +58,10 @@ the paths in the index that match the pattern to be checked out to your
 working tree.  After running `git add hello.c; rm hello.c`, you will _not_
 see `hello.c` in your working tree with the former, but with the latter
 you will.
-+
-Just as the filesystem '.' (period) refers to the current directory,
-using a '.' as a repository name in Git (a dot-repository) is a relative
-path for your current repository.
+
+ * Just as the filesystem '.' (period) refers to the current directory,
+   using a '.' as a repository name in Git (a dot-repository) is a relative
+   path and means your current repository.
 
 Here are the rules regarding the "flags" that you should follow when you are
 scripting Git:
Philip Oakley· Oct 16, 2013, 06:53 UTC · re: Junio C Hamano · lore

Re: [PATCH V3 1/2] doc: command line interface (cli) dot-repository dwimmery

From: "Junio C Hamano" <gitster@pobox.com>
Show 12 quoted lines
> Philip Oakley <philipoakley@iee.org> writes:
>
>> The Git cli will accept dot '.' (period) as the relative path,
>> and thus the current repository. Explain this action.
>>
>> Signed-off-by: Philip Oakley <philipoakley@iee.org>
>> ---
>>
>> This updates 431260cc8dd
>
> It appears that the original has already been merged to 'next', so
> we need to make this incremental on top.  I'll queue this on top.
Thank you, that looks good.
Show 44 quoted lines
>
> -- >8 --
> From: Philip Oakley <philipoakley@iee.org>
> Subject: doc/cli: make "dot repository" an independent bullet point
>
> The way to spell the current repository with a '.' dot is
> independent from how the pathspec allows globs expanded by Git.
>
> Make them two separate bullet items in the enumeration.
>
> Signed-off-by: Philip Oakley <philipoakley@iee.org>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
> Documentation/gitcli.txt | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/gitcli.txt b/Documentation/gitcli.txt
> index 1672842..24e1784 100644
> --- a/Documentation/gitcli.txt
> +++ b/Documentation/gitcli.txt
> @@ -58,10 +58,10 @@ the paths in the index that match the pattern to 
> be checked out to your
> working tree.  After running `git add hello.c; rm hello.c`, you will 
> _not_
> see `hello.c` in your working tree with the former, but with the 
> latter
> you will.
> -+
> -Just as the filesystem '.' (period) refers to the current directory,
> -using a '.' as a repository name in Git (a dot-repository) is a 
> relative
> -path for your current repository.
> +
> + * Just as the filesystem '.' (period) refers to the current 
> directory,
> +   using a '.' as a repository name in Git (a dot-repository) is a 
> relative
> +   path and means your current repository.
>
> Here are the rules regarding the "flags" that you should follow when 
> you are
> scripting Git:
>
> --
Philip Oakley· Sep 21, 2013, 15:11 UTC · re: Philip Oakley · lore

[PATCH V3 2/2] Doc URLs: relative paths imply the dot-respository

Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
 Documentation/urls.txt | 8 ++++++++
 1 file changed, 8 insertions(+)
Show changes to Documentation/urls.txt +8 −0
diff --git a/Documentation/urls.txt b/Documentation/urls.txt
index 9ccb246..3469e8b 100644
--- a/Documentation/urls.txt
+++ b/Documentation/urls.txt
@@ -55,6 +55,14 @@ These two syntaxes are mostly equivalent, except the former implies
 --local option.
 endif::git-clone[]
 
+Relative paths are relative to the current directory. Hence while the
+path:
+
+- '.'
+
+is the current directory, it is also the current repository and acts
+as if it were a repository named `'.'`.
+
 When Git doesn't know how to handle a certain transport protocol, it
 attempts to use the 'remote-<transport>' remote helper, if one
 exists. To explicitly request a remote helper, the following syntax
-- 
1.8.1.msysgit.1

← back to recent threads