commit b213cbf74334d2602c0d5f37f435603e368ff979 from: Stefan Sperling date: Mon Mar 23 09:36:46 2020 UTC sync man pages commit - d3eb287c08eeadd6574ded3b4690ee5616c048b0 commit + b213cbf74334d2602c0d5f37f435603e368ff979 blob - 96f3b3f98b9f01ad7580b70abb019d0dd9ffe8d7 blob + ec0861df041d7ad4bbd2252eac345c6cbbbe53bc --- git-repository.5.html +++ git-repository.5.html @@ -92,8 +92,7 @@ deflate(3).

Multiple objects can be bundled in a pack file for better disk space efficiency and increased run-time performance. The - pack file format knows two additional types of objects in addition to blobs, - trees, and commits:

+ pack file format introduces two additional types of objects:

Offset Delta Objects
This object is represented as a delta against another object in the same @@ -208,7 +207,7 @@ - +
March 6, 2020March 23, 2020 OpenBSD 6.6
blob - c8c400708aaa732a0a5afc0424f1a6e04d845bc2 blob + fae5989aebfc5450f3ad2038f1ac802bc0e78d4d --- got-worktree.5.html +++ got-worktree.5.html @@ -174,7 +174,7 @@ - +
March 6, 2020March 23, 2020 OpenBSD 6.6
blob - ce0e28f4eb2b098dc9fc321e224bdb7e5f4b4eea blob + 7669db78103979108cf1717ef3963fbc5ea5554e --- got.1.html +++ got.1.html @@ -140,6 +140,227 @@
Short alias for import.
+
+ [-a] [-b + branch] [-l] + [-m] [-q] + [-v] [-R + reference] repository-URL + [directory]
+
Clone a Git repository at the specified + repository-URL into the specified + directory. If no directory is + specified the directory name will be derived from the name of the cloned + repository. got clone will refuse to run if the + directory already exists. +

The repository-URL specifies a protocol + scheme, a server hostname, an optional port number separated from the + hostname by a colon, and a path to the repository on the server: + scheme://hostname:port/path/to/repository

+

The following protocol schemes are supported:

+
+
git
+
The Git protocol as implemented by the git-daemon(1) + server. Use of this protocol is discouraged since it supports neither + authentication nor encryption.
+
git+ssh
+
The Git protocol wrapped in an authenticated and encrypted + ssh(1) tunnel. With this protocol the hostname may + contain an embedded username for ssh(1) to use: + user@hostname
+
ssh
+
Short alias for git+ssh.
+
+

Objects in the cloned repository are stored in a pack file + which is downloaded from the server. This pack file will then be indexed + to facilitate access to the objects stored within. If any objects in the + pack file are stored in deltified form, all deltas will be fully + resolved in order to compute the ID of such objects. This can take some + time. More details about the pack file format are documented in + git-repository(5).

+

got clone creates a remote repository + entry in the config file of the cloned + repository to store the repository-url for future + use by got fetch or + git-fetch(1).

+

The options for got clone are as + follows:

+
+
+
Fetch all branches from the remote repository's + “refs/heads/” reference namespace. If this option is not + specified, a branch resolved via the remote repository's HEAD + reference will be fetched. Cannot be used together with the + -b option.
+
+ branch
+
Fetch the specified branch from the remote + repository's “refs/heads/” reference namespace. This + option may be specified multiple times to build a list of branches to + fetch. If the branch corresponding to the remote repository's HEAD + reference is not in this list, the cloned repository's HEAD reference + will be set to the first branch which was fetched. If this option is + not specified, a branch resolved via the remote repository's HEAD + reference will be fetched. Cannot be used together with the + -a option.
+
+
List branches and tags available for fetching from the remote + repository and exit immediately. Cannot be used together with any of + the other options except -v.
+
+
Create the cloned repository as a mirror of the original repository. + This is useful if the cloned repository will not be used to store + local changes as created by got commit. +

The repository's config file will + be set up with the “mirror” option enabled, such that + got fetch or git-fetch(1) + will write incoming changes directly to local branches in the + “refs/heads/” reference namespace, rather than to + branches in the “refs/remotes/” namespace. This avoids + the usual requirement of having to run got + rebase after got fetch in order to + make incoming changes appear on local branches. But maintaining + local changes in the cloned repository becomes difficult since local + changes will be at risk of being discarded whenever incoming changes + are fetched.

+
+
+
Suppress progress reporting output. The same option will be passed to + ssh(1) if applicable.
+
+
Verbose mode. Causes got clone to print + debugging messages to standard error output. This option will be + passed to ssh(1) if applicable. Multiple -v options + increase the verbosity. The maximum is 3.
+
+ reference
+
In addition to the branches and tags that will be fetched, fetch an + arbitrary reference from the remote repository's + “refs/” namespace. This option may be specified multiple + times to build a list of additional references to fetch. The specified + reference may either be a path to a specific + reference, or a reference namespace which will cause all references in + this namespace to be fetched. +

Each reference will be mapped into the cloned repository's + “refs/remotes/” namespace, unless the + -m option is used to mirror references + directly into the cloned repository's “refs/” + namespace.

+

got clone will refuse to fetch + references from the remote repository's + “refs/remotes/” or “refs/got/” + namespace.

+
+
+
+
+
Short alias for clone.
+
+ [-a] [-b + branch] [-d] + [-l] [-r + repository-path] [-t] + [-q] [-v] + [-R reference] + [remote-repository]
+
Fetch new changes from a remote repository. If no + remote-repository is specified, + “origin” will be used. The remote repository's URL is + obtained from the corresponding entry in the + config file of the local repository, as created by + got clone. +

New changes will be stored in a separate pack file downloaded + from the server. Optionally, separate pack files stored in the + repository can be combined with git-repack(1).

+

By default, branch references in the + “refs/remotes/” reference namespace will be updated to + point at the newly fetched commits. The got + rebase command can then be used to make new changes visible on + local branches in the “refs/heads/” namespace, merging + incoming changes with local changes as necessary.

+

If the repository was created as a mirror with + got clone -m then all branches in the + “refs/heads/” namespace will be updated directly to match + the corresponding branches in the remote repository. If those branches + contained local commits, these commits will no longer be reachable via a + reference and will therefore be at risk of being discarded by Git's + garbage collector. Maintaining local changes in a mirror repository is + therefore discouraged.

+

In any case, references in the “refs/tags/” + namespace will always be fetched and mapped directly to local references + in the same namespace.

+

The options for got fetch are as + follows:

+
+
+
Fetch all branches from the remote repository's + “refs/heads/” reference namespace. If this option is not + specified, a branch resolved via the remote repository's HEAD + reference will be fetched. Cannot be used together with the + -b option.
+
+ branch
+
Fetch the specified branch from the remote + repository's “refs/heads/” reference namespace. This + option may be specified multiple times to build a list of branches to + fetch. If this option is not specified, a branch resolved via the + remote repository's HEAD reference will be fetched. Cannot be used + together with the -a option.
+
+
Delete branches and tags from the local repository which are no longer + present in the remote repository. Only references are deleted. Any + commit, tree, tag, and blob objects belonging to deleted branches or + tags remain in the repository and may be removed separately with Git's + garbage collector.
+
+
List branches and tags available for fetching from the remote + repository and exit immediately. Cannot be used together with any of + the other options except -v and + -r.
+
+
Allow existing references in the “refs/tags” namespace + to be updated if they have changed on the server. If not specified, + only new tag references will be created.
+
+ repository-path
+
Use the repository at the specified path. If not specified, assume the + repository is located at or above the current working directory. If + this directory is a got work tree, use the + repository path associated with this work tree.
+
+
Suppress progress reporting output. The same option will be passed to + ssh(1) if applicable.
+
+
Verbose mode. Causes got fetch to print + debugging messages to standard error output. The same option will be + passed to ssh(1) if applicable. Multiple -v options + increase the verbosity. The maximum is 3.
+
+ reference
+
In addition to the branches and tags that will be fetched, fetch an + arbitrary reference from the remote repository's + “refs/” namespace. This option may be specified multiple + times to build a list of additional references to fetch. The specified + reference may either be a path to a specific + reference, or a reference namespace which will cause all references in + this namespace to be fetched. +

Each reference will be mapped into the local repository's + “refs/remotes/” namespace, unless the local repository + was created as a mirror with got clone -m in + which case references will be mapped directly into the local + repository's “refs/” namespace.

+

Once a reference has been fetched, a local branch based on + it can be created with got branch if + needed.

+

got fetch will refuse to fetch + references from the remote repository's + “refs/remotes/” or “refs/got/” + namespace.

+
+
+
+
+
Short alias for fetch.
[-E] [-b branch] [-c @@ -169,7 +390,7 @@
Proceed with the checkout operation even if the directory at work-tree-path is not empty. Existing files will be left intact.
-
+
branch
Check out files from a commit on the specified branch. If this option is not specified, a @@ -255,7 +476,7 @@

The options for got update are as follows:

-
+
branch
Switch the work tree's branch reference to the specified branch before updating the work tree. This @@ -383,7 +604,7 @@

The options for got log are as follows:

-
+
Display individual commits which were merged into the current branch from other branches. By default, got log shows the linear history of the current branch only.
@@ -402,7 +623,7 @@
Set the number of context lines shown in diffs with -p. By default, 3 lines of context are shown.
-
+
N
Limit history traversal to a given number of commits. If this option is not specified, a default limit value of zero is used, which is @@ -419,7 +640,7 @@ extended regular expression search-pattern. Regular expression syntax is documented in re_format(7).
-
+
repository-path
Use the repository at the specified path. If not specified, assume the repository is located at or above the current working directory. If @@ -449,7 +670,7 @@ number
Set the number of context lines shown in the diff. By default, 3 lines of context are shown.
-
+
repository-path
Use the repository at the specified path. If not specified, assume the repository is located at or above the current working directory. If @@ -481,7 +702,7 @@ to a commit ID. An abbreviated hash argument will be expanded to a full SHA1 hash automatically, provided the abbreviation is unique.
-
+
repository-path
Use the repository at the specified path. If not specified, assume the repository is located at or above the current working directory. If @@ -531,7 +752,7 @@ to a commit ID. An abbreviated hash argument will be expanded to a full SHA1 hash automatically, provided the abbreviation is unique.
-
+
repository-path
Use the repository at the specified path. If not specified, assume the repository is located at or above the current working directory. If @@ -540,7 +761,7 @@
Show object IDs of files (blob objects) and directories (tree objects).
-
+
Recurse into sub-directories in the repository.
@@ -548,37 +769,54 @@
Short alias for tree.
[-r repository-path] - [-l] [-d - name] [-s] - [name target]
+ [-l] [-c + object] [-s + reference] [-d] + [name]
Manage references in a repository. -

If no options are passed, expect two arguments and attempt to - create, or update, the reference with the given - name, and make it point at the given - target. The name must be an absolute reference - name, i.e. it must begin with “refs/”. The target may be - an object ID SHA1 hash or an existing reference which will be resolved - to an object ID. An abbreviated hash argument will be expanded to a full - SHA1 hash automatically, provided the abbreviation is unique.

+

References may be listed, created, deleted, and changed. When + creating, deleting, or changing a reference the specified + name must be an absolute reference name, i.e. it + must begin with “refs/”.

The options for got ref are as follows:

-
+
repository-path
Use the repository at the specified path. If not specified, assume the repository is located at or above the current working directory. If this directory is a got work tree, use the repository path associated with this work tree.
-
-
List all existing references in the repository.
-
- name
-
Delete the reference with the specified name from the repository.
-
-
Create a symbolic reference pointing at the specified - target, which must be an existing reference. - Care should be taken not to create loops between references when this - option is used.
+
+
List references in the repository. If no name is + specified, list all existing references in the repository. If + name is a reference namespace, list all + references in this namespace. Otherwise, show only the reference with + the given name. Cannot be used together with any + other options except -r.
+
+ object
+
Create a reference or change an existing reference. The reference with + the specified name will point at the specified + object. The expected + object argument is a ID SHA1 hash or an existing + reference or tag name which will be resolved to the ID of a + corresponding commit, tree, tag, or blob object. Cannot be used + together with any other options except + -r.
+
+ reference
+
Create a symbolic reference, or change an existing symbolic reference. + The symbolic reference with the specified name + will point at the specified reference which must + already exist in the repository. Care should be taken not to create + loops between references when this option is used. Cannot be used + together with any other options except + -r.
+
+
Delete the reference with the specified name + from the repository. Cannot be used together with any other options + except -r.
@@ -638,20 +876,20 @@

The options for got branch are as follows:

-
+
commit
Make a newly created branch reference point at the specified commit. The expected commit argument is a commit ID SHA1 hash or an existing reference or tag name which will be resolved to a commit ID.
-
+
repository-path
Use the repository at the specified path. If not specified, assume the repository is located at or above the current working directory. If this directory is a got work tree, use the repository path associated with this work tree.
-
+
List all existing branches in the repository. If invoked in a work tree, the work tree's current branch is shown with one the following annotations: @@ -666,7 +904,7 @@
-
+
name
Delete the branch with the specified name from the repository. Only the branch reference is deleted. Any commit, tree, and blob objects @@ -700,7 +938,7 @@

The options for got tag are as follows:

-
+
commit
Make the newly created tag reference point at the specified commit. The expected @@ -708,19 +946,19 @@ existing reference or tag name which will be resolved to a commit ID. An abbreviated hash argument will be expanded to a full SHA1 hash automatically, provided the abbreviation is unique.
-
+
message
Use the specified tag message when creating the new tag. Without the -m option, got tag opens a temporary file in an editor where a tag message can be written.
-
+
repository-path
Use the repository at the specified path. If not specified, assume the repository is located at or above the current working directory. If this directory is a got work tree, use the repository path associated with this work tree.
-
+
List all existing tags in the repository instead of creating a new tag. If this option is used, no other command-line arguments are allowed.
@@ -739,7 +977,7 @@

The options for got add are as follows:

-
+
Permit recursion into directories. If this option is not specified, got add will refuse to run if a specified path is a directory.
@@ -761,7 +999,7 @@ modifications.
Keep affected files on disk.
-
+
Permit recursion into directories. If this option is not specified, got remove will refuse to run if a specified path is a directory.
@@ -797,7 +1035,7 @@ “n”, and “q” responses line-by-line from the specified response-script file instead of prompting interactively.
-
+
Permit recursion into directories. If this option is not specified, got revert will refuse to run if a specified path is a directory.
@@ -851,7 +1089,7 @@

The options for got commit are as follows:

-
+
message
Use the specified log message when creating the new commit. Without the -m option, got @@ -1061,10 +1299,10 @@

The options for got rebase are as follows:

-
+
Abort an interrupted rebase operation. If this option is used, no other command-line arguments are allowed.
-
+
Continue an interrupted rebase operation. If this option is used, no other command-line arguments are allowed.
@@ -1195,10 +1433,10 @@

The options for got histedit are as follows:

-
+
Abort an interrupted histedit operation. If this option is used, no other command-line arguments are allowed.
-
+
Continue an interrupted histedit operation. If this option is used, no other command-line arguments are allowed.
@@ -1206,7 +1444,7 @@
Use the specified histedit-script instead of opening a temporary file in an editor where a histedit script can be written.
-
+
Edit log messages only. This option is a quick equivalent to a histedit script which edits only log messages but otherwise leaves every picked commit as-is. The -m option can @@ -1312,7 +1550,7 @@

The options for got stage are as follows:

-
+
Instead of staging new changes, list paths which are already staged, along with the IDs of staged blob objects and stage status codes. If paths were provided in the command line show the staged paths among @@ -1425,7 +1663,7 @@

The options for got cat are as follows:

-
+
commit
Look up paths in the specified commit. If this option is not used, paths are looked up in the commit resolved via the @@ -1433,7 +1671,7 @@ hash or an existing reference or tag name which will be resolved to a commit ID. An abbreviated hash argument will be expanded to a full SHA1 hash automatically, provided the abbreviation is unique.
-
+
repository-path
Use the repository at the specified path. If not specified, assume the repository is located at or above the current working directory. If @@ -1490,10 +1728,14 @@

Clone an existing Git repository for use with - got. This step currently requires - git(1):

+ got.

$ cd /var/git/
+
$ got clone + ssh://git@github.com/openbsd/src.git
+

Use of HTTP URLs currently requires git(1):

+

+
$ cd /var/git/
$ git clone --bare https://github.com/openbsd/src.git

Alternatively, for quick and dirty local testing of @@ -1587,12 +1829,26 @@ :-)

$ got backout unified-buffer-cache
-

Fetch new upstream commits into the local repository's master - branch. This step currently requires git(1):

+

Fetch new upstream commits into the local repository's + “origin/master” branch:

+
$ cd /usr/src
+
$ got fetch
+

In a repository created with a HTTP URL and git + clone --bare the git-fetch(1) command must be used + instead:

+

$ cd /var/git/src.git
$ git fetch origin - master:master
+ master:refs/remotes/origin/master
+

Rebase the local “master” branch to merge the new + changes that are now visible on the “origin/master” + branch:

+

+
$ cd /usr/src
+
$ got update -b + origin/master
+
$ got rebase master

Rebase the “unified-buffer-cache” branch on top of the new head commit of the “master” branch.

@@ -1612,21 +1868,47 @@ unified-buffer-cache
$ got update -c master
$ got histedit
-

Additional steps are necessary if local changes need to be pushed - back to the remote repository, which currently requires git - fetch and git push. Before working against - existing branches in a repository cloned with “git clone - --bare”, a Git “refspec” must be configured to map all - references in the remote repository into the “refs/remotes” - namespace of the local repository. This can achieved by setting Git's - remote.origin.fetch configuration variable to the - value “+refs/heads/*:refs/remotes/origin/*” with the +

In order to merge changes committed to the + “unified-buffer-cache” branch back into the + “master” branch, the “unified-buffer-cache” + branch must first be rebased onto the “master” branch:

+

+
$ got update -b master
+
$ got rebase + unified-buffer-cache
+

Changes on the “unified-buffer-cache” branch can now + be made visible on the “master” branch with + got integrate. Because the rebase operation switched + the work tree to the “unified-buffer-cache” branch, the work + tree must be switched back to the “master” branch before the + “unified-buffer-cache” branch can be integrated into + “master”:

+

+
$ got update -b master
+
$ got integrate + unified-buffer-cache
+

Additional steps may be necessary if local changes need to be + pushed back to the remote repository, which currently requires + git push. Before working against existing branches + in a repository cloned with git clone --bare instead + of got clone, a Git “refspec” must be + configured to map all references in the remote repository into the + “refs/remotes” namespace of the local repository. This can + achieved by setting Git's remote.origin.fetch + configuration variable to the value + “+refs/heads/*:refs/remotes/origin/*” with the git config command:

$ cd /var/git/repo
$ git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'
-

Alternatively, the following fetch +

Additionally, the “mirror” option must be + disabled:

+

+
$ cd /var/git/repo
+
$ git config remote.origin.mirror + false
+

Alternatively, the following git-fetch(1) configuration item can be added manually to the Git repository's config file:

@@ -1634,13 +1916,15 @@
url = ...
fetch = +refs/heads/*:refs/remotes/origin/*
+
mirror = false

This configuration leaves the local repository's “refs/heads” namespace free for use by local branches checked out with got checkout and, if needed, created with got branch.

-

Branches in the “remotes/origin” namespace can be - updated with incoming changes from the remote repository with - git fetch:

+

Branches in the “remotes/origin” namespace can now + be updated with incoming changes from the remote repository with + got fetch or git-fetch(1) without + extra command line arguments:

$ cd /var/git/repo
$ git fetch
@@ -1664,25 +1948,6 @@

$ cd /var/git/repo
$ git push origin master
-

In order to merge changes committed to the - “unified-buffer-cache” branch back into the - “master” branch, the “unified-buffer-cache” - branch must first be rebased onto the “master” branch:

-

-
$ got update -b master
-
$ got rebase - unified-buffer-cache
-

Changes on the “unified-buffer-cache” branch can now - be made visible on the “master” branch with - got integrate. Because the rebase operation switched - the work tree to the “unified-buffer-cache” branch, the work - tree must be switched back to the “master” branch before the - “unified-buffer-cache” branch can be integrated into - “master”:

-

-
$ got update -b master
-
$ got integrate - unified-buffer-cache

mpi@openbsd.org>
Joshua Stein - <jcs@openbsd.org>

+ <jcs@openbsd.org> +
+ Ori Bernstein + <ori@openbsd.org>

@@ -1712,7 +1980,7 @@ - +
March 6, 2020March 23, 2020 OpenBSD 6.6
blob - cffd0d4c80da4b17b91cbe85b70b9562018e0761 blob + 7ac78c671f256ce8ed9237aa5879e7137892824c --- gotweb.8.html +++ gotweb.8.html @@ -89,8 +89,9 @@ published by gotweb is /var/www/got/public.
  • Git repositories served by gotweb should be kept - up-to-date with a mechanism such as git-fetch(1) or - rsync(1), scheduled by cron(8).
  • + up-to-date with a mechanism such as got fetch, + git-fetch(1), or rsync(1), scheduled + by cron(8).
    @@ -156,7 +157,7 @@ - +
    March 6, 2020March 23, 2020 OpenBSD 6.6
    blob - 99bc2fce7216b74d4231b5314576bb8187276fb0 blob + 025fe59e9a052b1f7cd7f2ff2aa8bbeb39682081 --- tog.1.html +++ tog.1.html @@ -460,7 +460,7 @@ - +
    March 6, 2020March 23, 2020 OpenBSD 6.6