diff mbox series

[v3] Doc: Bundle file usage

Message ID 20191018151555.2277-1-philipoakley@iee.email (mailing list archive)
State New, archived
Headers show
Series [v3] Doc: Bundle file usage | expand

Commit Message

Philip Oakley Oct. 18, 2019, 3:15 p.m. UTC
From: Philip Oakley <philipoakley@iee.org>

Improve the command description, including paragraph spacing.

Git URLs can accept bundle files for fetch, pull and clone, include
in that section. Include git clone in the bundle usage description.
Correct the quoting of <git-rev-list-args>.

Detail the <git-rev-list-args> options for cloning a complete repo.

Signed-off-by: Philip Oakley <philipoakley@iee.email>
---
The new paragraph uses the more modern back-ticks while elsewhere
the quote style is matched locally.

Includes peff's suggestions.
---
 Documentation/git-bundle.txt | 23 +++++++++++++++++------
 Documentation/urls.txt       |  3 +++
 2 files changed, 20 insertions(+), 6 deletions(-)

Comments

Pratyush Yadav Oct. 18, 2019, 6:15 p.m. UTC | #1
On 18/10/19 04:15PM, Philip Oakley wrote:
> From: Philip Oakley <philipoakley@iee.org>
> 
> Improve the command description, including paragraph spacing.
> 
> Git URLs can accept bundle files for fetch, pull and clone, include
> in that section. Include git clone in the bundle usage description.
> Correct the quoting of <git-rev-list-args>.
> 
> Detail the <git-rev-list-args> options for cloning a complete repo.
> 
> Signed-off-by: Philip Oakley <philipoakley@iee.email>

Reminder: The email in your signoff and From are different [0].

[0] https://public-inbox.org/git/59958c50-cbcb-ae9b-614f-ba28221f41ed@iee.email/
Philip Oakley Oct. 18, 2019, 7:58 p.m. UTC | #2
On 18/10/2019 19:15, Pratyush Yadav wrote:
> On 18/10/19 04:15PM, Philip Oakley wrote:
>> From: Philip Oakley <philipoakley@iee.org>
>>
>> Improve the command description, including paragraph spacing.
>>
>> Git URLs can accept bundle files for fetch, pull and clone, include
>> in that section. Include git clone in the bundle usage description.
>> Correct the quoting of <git-rev-list-args>.
>>
>> Detail the <git-rev-list-args> options for cloning a complete repo.
>>
>> Signed-off-by: Philip Oakley <philipoakley@iee.email>
> Reminder: The email in your signoff and From are different [0].
>
> [0] https://public-inbox.org/git/59958c50-cbcb-ae9b-614f-ba28221f41ed@iee.email/
>
Yes, sigh.
I was going to complain it was all the git-gui's fault ;-) because it 
doesn't show the current author, but then `git log` and `git show` don't 
either.

I just need to revisit the man page for --amend with some form of 
--reset-author to my new email.

Philip
[1] note to self: add a 'todo' to get git gui to show (somewhere) the 
author/committer that is in use for a commit or amend
diff mbox series

Patch

diff --git a/Documentation/git-bundle.txt b/Documentation/git-bundle.txt
index 7d6c9dcd17..a441a13d58 100644
--- a/Documentation/git-bundle.txt
+++ b/Documentation/git-bundle.txt
@@ -20,11 +20,14 @@  DESCRIPTION
 Some workflows require that one or more branches of development on one
 machine be replicated on another machine, but the two machines cannot
 be directly connected, and therefore the interactive Git protocols (git,
-ssh, http) cannot be used.  This command provides support for
-'git fetch' and 'git pull' to operate by packaging objects and references
-in an archive at the originating machine, then importing those into
-another repository using 'git fetch' and 'git pull'
-after moving the archive by some means (e.g., by sneakernet).  As no
+ssh, http) cannot be used.
+
+The 'git bundle' command packages objects and references in an archive
+at the originating machine, which can then be imported into another
+repository using 'git fetch', 'git pull', or 'git clone',
+after moving the archive by some means (e.g., by sneakernet).
+
+As no
 direct connection between the repositories exists, the user must specify a
 basis for the bundle that is held by the destination repository: the
 bundle assumes that all objects in the basis are already in the
@@ -35,7 +38,7 @@  OPTIONS
 
 create <file>::
 	Used to create a bundle named 'file'.  This requires the
-	'git-rev-list-args' arguments to define the bundle contents.
+	'<git-rev-list-args>' arguments to define the bundle contents.
 
 verify <file>::
 	Used to check that a bundle file is valid and will apply
@@ -92,6 +95,14 @@  It is okay to err on the side of caution, causing the bundle file
 to contain objects already in the destination, as these are ignored
 when unpacking at the destination.
 
+`git clone` can use any bundle created without negative refspecs
+(e.g., `new`, but not `old..new`).
+If you want to match `git clone --mirror`, which would clone other
+refs such as `refs/remotes/*`, use `--all`.
+If you want to provide the same set of refs that a clone directly
+from the source repository would get, use `--branches --tags` for
+the `<git-rev-list-args>`.
+
 EXAMPLES
 --------
 
diff --git a/Documentation/urls.txt b/Documentation/urls.txt
index bc354fe2dc..1c229d7581 100644
--- a/Documentation/urls.txt
+++ b/Documentation/urls.txt
@@ -53,6 +53,9 @@  These two syntaxes are mostly equivalent, except the former implies
 --local option.
 endif::git-clone[]
 
+'git clone', 'git fetch' and 'git pull', but not 'git push', will also
+accept a suitable bundle file. See linkgit:git-bundle[1].
+
 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