diff --git a/MyFirstContribution.html b/MyFirstContribution.html index 9d3d963f0..5577d96b1 100644 --- a/MyFirstContribution.html +++ b/MyFirstContribution.html @@ -735,7 +735,7 @@
diff --git a/MyFirstObjectWalk.html b/MyFirstObjectWalk.html index 0709da55b..c0272f526 100644 --- a/MyFirstObjectWalk.html +++ b/MyFirstObjectWalk.html @@ -735,7 +735,7 @@
@@ -989,13 +989,14 @@

Configuring From .gitconfig ... -static int git_walken_config(const char *var, const char *value, void *cb) +static int git_walken_config(const char *var, const char *value, + const struct config_context *ctx, void *cb) { /* * For now, we don't have any custom configuration, so fall back to * the default config. */ - return git_default_config(var, value, cb); + return git_default_config(var, value, ctx, cb); }

Make sure to invoke git_config() with it in your cmd_walken():

@@ -1180,10 +1181,11 @@

Adding a Filter

First some setup. Add grep_config() to git_walken_config():

-
static int git_walken_config(const char *var, const char *value, void *cb)
+
static int git_walken_config(const char *var, const char *value,
+                             const struct config_context *ctx, void *cb)
 {
-        grep_config(var, value, cb);
-        return git_default_config(var, value, cb);
+        grep_config(var, value, ctx, cb);
+        return git_default_config(var, value, ctx, cb);
 }

Next, we can modify the grep_filter. This is done with convenience functions @@ -1317,7 +1319,7 @@

Basic Object Walk

about each one.

We can base our work on an example. git pack-objects prepares all kinds of objects for packing into a bitmap or packfile. The work we are interested in -resides in builtins/pack-objects.c:get_object_list(); examination of that +resides in builtin/pack-objects.c:get_object_list(); examination of that function shows that the all-object walk is being performed by traverse_commit_list() or traverse_commit_list_filtered(). Those two functions reside in list-objects.c; examining the source shows that, despite @@ -1549,8 +1551,8 @@

Adding a Filter

} else { trace_printf( _("Filtered object walk with filterspec 'tree:1'.\n")); - CALLOC_ARRAY(rev->filter, 1); - parse_list_objects_filter(rev->filter, "tree:1"); + + parse_list_objects_filter(&rev->filter, "tree:1"); } traverse_commit_list(rev, walken_show_commit, walken_show_object, NULL);
@@ -1567,10 +1569,12 @@

Adding a Filter

Counting Omitted Objects

We also have the capability to enumerate all objects which were omitted by a -filter, like with git log --filter=<spec> --filter-print-omitted. Asking -traverse_commit_list_filtered() to populate the omitted list means that our -object walk does not perform any better than an unfiltered object walk; all -reachable objects are walked in order to populate the list.

+filter, like with git log --filter=<spec> --filter-print-omitted. To do this, +change traverse_commit_list() to traverse_commit_list_filtered(), which is +able to populate an omitted list. Asking for this list of filtered objects +may cause performance degradations, however, because in this case, despite +filtering objects, the possibly much larger set of all reachable objects must +be processed in order to populate that list.

First, add the struct oidset and related items we will use to iterate it:

@@ -1589,8 +1593,9 @@

Counting Omitted Objects

...
-

Modify the call to traverse_commit_list_filtered() to include your omitted -object:

+

Replace the call to traverse_commit_list() with +traverse_commit_list_filtered() and pass a pointer to the omitted oidset +defined and initialized above:

        ...
@@ -1658,7 +1663,7 @@ 

Changing the Order

With only that change, run again (but save yourself some scrollback):

-
$ GIT_TRACE=1 ./bin-wrappers/git walken | head -n 10
+
$ GIT_TRACE=1 ./bin-wrappers/git walken 2>&1 | head -n 10

Take a look at the top commit with git show and the object ID you printed; it should be the same as the output of git show HEAD.

@@ -1683,7 +1688,7 @@

Changing the Order

$ make
-$ GIT_TRACE=1 ./bin-wrappers git walken | tail -n 10
+$ GIT_TRACE=1 ./bin-wrappers/git walken 2>&1 | tail -n 10

The last commit object given should have the same OID as the one we saw at the top before, and running git show <oid> with that OID should give you again @@ -1737,7 +1742,7 @@

Wrapping Up

diff --git a/MyFirstObjectWalk.txt b/MyFirstObjectWalk.txt index c68cdb11b..dec8afe5b 100644 --- a/MyFirstObjectWalk.txt +++ b/MyFirstObjectWalk.txt @@ -210,13 +210,14 @@ We'll also need to include the `config.h` header: ... -static int git_walken_config(const char *var, const char *value, void *cb) +static int git_walken_config(const char *var, const char *value, + const struct config_context *ctx, void *cb) { /* * For now, we don't have any custom configuration, so fall back to * the default config. */ - return git_default_config(var, value, cb); + return git_default_config(var, value, ctx, cb); } ---- @@ -389,10 +390,11 @@ modifying `rev_info.grep_filter`, which is a `struct grep_opt`. First some setup. Add `grep_config()` to `git_walken_config()`: ---- -static int git_walken_config(const char *var, const char *value, void *cb) +static int git_walken_config(const char *var, const char *value, + const struct config_context *ctx, void *cb) { - grep_config(var, value, cb); - return git_default_config(var, value, cb); + grep_config(var, value, ctx, cb); + return git_default_config(var, value, ctx, cb); } ---- @@ -523,7 +525,7 @@ about each one. We can base our work on an example. `git pack-objects` prepares all kinds of objects for packing into a bitmap or packfile. The work we are interested in -resides in `builtins/pack-objects.c:get_object_list()`; examination of that +resides in `builtin/pack-objects.c:get_object_list()`; examination of that function shows that the all-object walk is being performed by `traverse_commit_list()` or `traverse_commit_list_filtered()`. Those two functions reside in `list-objects.c`; examining the source shows that, despite @@ -732,8 +734,8 @@ walk we've just performed: } else { trace_printf( _("Filtered object walk with filterspec 'tree:1'.\n")); - CALLOC_ARRAY(rev->filter, 1); - parse_list_objects_filter(rev->filter, "tree:1"); + + parse_list_objects_filter(&rev->filter, "tree:1"); } traverse_commit_list(rev, walken_show_commit, walken_show_object, NULL); @@ -752,10 +754,12 @@ points to the same tree object as its grandparent.) === Counting Omitted Objects We also have the capability to enumerate all objects which were omitted by a -filter, like with `git log --filter= --filter-print-omitted`. Asking -`traverse_commit_list_filtered()` to populate the `omitted` list means that our -object walk does not perform any better than an unfiltered object walk; all -reachable objects are walked in order to populate the list. +filter, like with `git log --filter= --filter-print-omitted`. To do this, +change `traverse_commit_list()` to `traverse_commit_list_filtered()`, which is +able to populate an `omitted` list. Asking for this list of filtered objects +may cause performance degradations, however, because in this case, despite +filtering objects, the possibly much larger set of all reachable objects must +be processed in order to populate that list. First, add the `struct oidset` and related items we will use to iterate it: @@ -776,8 +780,9 @@ static void walken_object_walk( ... ---- -Modify the call to `traverse_commit_list_filtered()` to include your `omitted` -object: +Replace the call to `traverse_commit_list()` with +`traverse_commit_list_filtered()` and pass a pointer to the `omitted` oidset +defined and initialized above: ---- ... @@ -843,7 +848,7 @@ those lines without having to recompile. With only that change, run again (but save yourself some scrollback): ---- -$ GIT_TRACE=1 ./bin-wrappers/git walken | head -n 10 +$ GIT_TRACE=1 ./bin-wrappers/git walken 2>&1 | head -n 10 ---- Take a look at the top commit with `git show` and the object ID you printed; it @@ -871,7 +876,7 @@ of the first handful: ---- $ make -$ GIT_TRACE=1 ./bin-wrappers git walken | tail -n 10 +$ GIT_TRACE=1 ./bin-wrappers/git walken 2>&1 | tail -n 10 ---- The last commit object given should have the same OID as the one we saw at the diff --git a/RelNotes/2.45.0.txt b/RelNotes/2.45.0.txt index 5bca5a0c4..a65205cc9 100644 --- a/RelNotes/2.45.0.txt +++ b/RelNotes/2.45.0.txt @@ -73,6 +73,12 @@ UI, Workflows & Features * core.commentChar used to be limited to a single byte, but has been updated to allow an arbitrary multi-byte sequence. + * "git add -p" and other "interactive hunk selection" UI has learned to + skip showing the hunk immediately after it has already been shown, and + an additional action to explicitly ask to reshow the current hunk. + + * "git pack-refs" learned the "--auto" option, which is a useful + addition to be triggered from "git gc --auto". Performance, Internal Implementation, Development Support etc. @@ -140,6 +146,16 @@ Performance, Internal Implementation, Development Support etc. the "t/" directory with "make t-*.sh t-*.sh". (merge 8d383806fc pb/test-scripts-are-build-targets later to maint). + * The "hint:" messages given by the advice mechanism, when given a + message with a blank line, left a line with trailing whitespace, + which has been cleansed. + + * Documentation rules has been explicitly described how to mark-up + literal parts and a few manual pages have been updated as examples. + + * The .editorconfig file has been taught that a Makefile uses HT + indentation. + Fixes since v2.44 ----------------- @@ -302,6 +318,23 @@ Fixes since v2.44 corrected. (merge f999d5188b bl/pretty-shorthand-config-fix later to maint). + * "git apply" failed to extract the filename the patch applied to, + when the change was about an empty file created in or deleted from + a directory whose name ends with a SP, which has been corrected. + (merge 776ffd1a30 jc/apply-parse-diff-git-header-names-fix later to maint). + + * Update a more recent tutorial doc. + (merge 95ab557b4b dg/myfirstobjectwalk-updates later to maint). + + * The test script had an incomplete and ineffective attempt to avoid + clobbering the testing user's real crontab (and its equivalents), + which has been completed. + (merge 73cb87773b es/test-cron-safety later to maint). + + * Use advice_if_enabled() API to rewrite a simple pattern to + call advise() after checking advice_enabled(). + (merge 6412d01527 rj/use-adv-if-enabled later to maint). + * Other code cleanup, docfix, build fix, etc. (merge f0e578c69c rs/use-xstrncmpz later to maint). (merge 83e6eb7d7a ba/credential-test-clean-fix later to maint). diff --git a/ReviewingGuidelines.html b/ReviewingGuidelines.html index c0361e8ba..17da6d062 100644 --- a/ReviewingGuidelines.html +++ b/ReviewingGuidelines.html @@ -735,7 +735,7 @@
diff --git a/SubmittingPatches.html b/SubmittingPatches.html index 90f586998..61ac18b11 100644 --- a/SubmittingPatches.html +++ b/SubmittingPatches.html @@ -735,7 +735,7 @@
diff --git a/ToolsForGit.html b/ToolsForGit.html index 23f53a9a1..05a74d349 100644 --- a/ToolsForGit.html +++ b/ToolsForGit.html @@ -735,7 +735,7 @@
diff --git a/everyday.html b/everyday.html index 6f1023b06..819592108 100644 --- a/everyday.html +++ b/everyday.html @@ -735,7 +735,7 @@
diff --git a/git-add.html b/git-add.html index 153588488..67dfab283 100644 --- a/git-add.html +++ b/git-add.html @@ -1236,6 +1236,7 @@

INTERACTIVE MODE

K - leave this hunk undecided, see previous hunk s - split the current hunk into smaller hunks e - manually edit the current hunk +p - print the current hunk ? - print help

After deciding the fate for all hunks, if there is any hunk @@ -1425,7 +1426,7 @@

GIT

diff --git a/git-add.txt b/git-add.txt index 14a371fff..aceaa025e 100644 --- a/git-add.txt +++ b/git-add.txt @@ -348,6 +348,7 @@ patch:: K - leave this hunk undecided, see previous hunk s - split the current hunk into smaller hunks e - manually edit the current hunk + p - print the current hunk ? - print help + After deciding the fate for all hunks, if there is any hunk diff --git a/git-clone.html b/git-clone.html index 8195bf02c..8a53789d5 100644 --- a/git-clone.html +++ b/git-clone.html @@ -749,15 +749,15 @@

NAME

SYNOPSIS

-
git clone [--template=<template-directory>]
-          [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror]
-          [-o <name>] [-b <name>] [-u <upload-pack>] [--reference <repository>]
-          [--dissociate] [--separate-git-dir <git-dir>]
-          [--depth <depth>] [--[no-]single-branch] [--no-tags]
-          [--recurse-submodules[=<pathspec>]] [--[no-]shallow-submodules]
-          [--[no-]remote-submodules] [--jobs <n>] [--sparse] [--[no-]reject-shallow]
-          [--filter=<filter> [--also-filter-submodules]] [--] <repository>
-          [<directory>]
+
git clone [--template=<template-directory>]
+          [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror]
+          [-o <name>] [-b <name>] [-u <upload-pack>] [--reference <repository>]
+          [--dissociate] [--separate-git-dir <git-dir>]
+          [--depth <depth>] [--[no-]single-branch] [--no-tags]
+          [--recurse-submodules[=<pathspec>]] [--[no-]shallow-submodules]
+          [--[no-]remote-submodules] [--jobs <n>] [--sparse] [--[no-]reject-shallow]
+          [--filter=<filter-spec>] [--also-filter-submodules]] [--] <repository>
+          [<directory>]
@@ -773,7 +773,7 @@

DESCRIPTION

After the clone, a plain git fetch without arguments will update all the remote-tracking branches, and a git pull without arguments will in addition merge the remote master branch into the -current master branch, if any (this is untrue when "--single-branch" +current master branch, if any (this is untrue when --single-branch is given; see below).

This default configuration is achieved by creating references to the remote branch heads under refs/remotes/origin and @@ -786,17 +786,17 @@

OPTIONS

--l +-l
---local +--local

When the repository to clone from is on a local machine, this flag bypasses the normal "Git aware" transport mechanism and clones the repository by making a copy of - HEAD and everything under objects and refs directories. + HEAD and everything under objects and refs directories. The files under .git/objects/ directory are hardlinked to save space when possible.

@@ -815,7 +815,7 @@

OPTIONS

src.

---no-hardlinks +--no-hardlinks

@@ -826,10 +826,10 @@

OPTIONS

--s +-s
---shared +--shared

@@ -858,7 +858,7 @@

OPTIONS

objects from the source repository into a pack in the cloned repository.

---reference[-if-able] <repository> +--reference[-if-able] <repository>

@@ -876,7 +876,7 @@

OPTIONS

--dissociate option.

---dissociate +--dissociate

@@ -892,10 +892,10 @@

OPTIONS

--q +-q
---quiet +--quiet

@@ -904,10 +904,10 @@

OPTIONS

--v +-v
---verbose +--verbose

@@ -916,7 +916,7 @@

OPTIONS

---progress +--progress

@@ -927,7 +927,7 @@

OPTIONS

---server-option=<option> +--server-option=<option>

@@ -935,15 +935,15 @@

OPTIONS

protocol version 2. The given string must not contain a NUL or LF character. The server’s handling of server options, including unknown ones, is server-specific. - When multiple --server-option=<option> are given, they are all + When multiple --server-option=<option> are given, they are all sent to the other side in the order listed on the command line.

--n +-n
---no-checkout +--no-checkout

@@ -951,7 +951,7 @@

OPTIONS

---[no-]reject-shallow +--[no-]reject-shallow

@@ -961,13 +961,13 @@

OPTIONS

---bare +--bare

Make a bare Git repository. That is, instead of creating <directory> and placing the administrative - files in <directory>/.git, make the <directory> + files in <directory>/.git, make the <directory> itself the $GIT_DIR. This obviously implies the --no-checkout because there is nowhere to check out the working tree. Also the branch heads at the remote are copied directly @@ -978,7 +978,7 @@

OPTIONS

---sparse +--sparse

@@ -989,7 +989,7 @@

OPTIONS

---filter=<filter-spec> +--filter=<filter-spec>

@@ -998,13 +998,13 @@

OPTIONS

When using --filter, the supplied <filter-spec> is used for the partial clone filter. For example, --filter=blob:none will filter out all blobs (file contents) until needed by Git. Also, - --filter=blob:limit=<size> will filter out all blobs of size + --filter=blob:limit=<size> will filter out all blobs of size at least <size>. For more details on filter specifications, see the --filter option in git-rev-list(1).

---also-filter-submodules +--also-filter-submodules

@@ -1014,7 +1014,7 @@

OPTIONS

---mirror +--mirror

@@ -1027,10 +1027,10 @@

OPTIONS

--o <name> +-o <name>
---origin <name> +--origin <name>

@@ -1040,10 +1040,10 @@

OPTIONS

--b <name> +-b <name>
---branch <name> +--branch <name>

@@ -1056,10 +1056,10 @@

OPTIONS

--u <upload-pack> +-u <upload-pack>
---upload-pack <upload-pack> +--upload-pack <upload-pack>

@@ -1069,7 +1069,7 @@

OPTIONS

---template=<template-directory> +--template=<template-directory>

@@ -1078,10 +1078,10 @@

OPTIONS

--c <key>=<value> +-c <key>=<value>
---config <key>=<value> +--config <key>=<value>

@@ -1097,11 +1097,11 @@

OPTIONS

Due to limitations of the current implementation, some configuration variables do not take effect until after the initial fetch and checkout. Configuration variables known to not take effect are: -remote.<name>.mirror and remote.<name>.tagOpt. Use the +remote.<name>.mirror and remote.<name>.tagOpt. Use the corresponding --mirror and --no-tags options instead.

---depth <depth> +--depth <depth>

@@ -1113,7 +1113,7 @@

OPTIONS

---shallow-since=<date> +--shallow-since=<date>

@@ -1121,7 +1121,7 @@

OPTIONS

---shallow-exclude=<revision> +--shallow-exclude=<revision>

@@ -1131,7 +1131,7 @@

OPTIONS

---[no-]single-branch +--[no-]single-branch

@@ -1146,7 +1146,7 @@

OPTIONS

---no-tags +--no-tags

@@ -1162,7 +1162,7 @@

OPTIONS

branch of some repository for search indexing.

---recurse-submodules[=<pathspec>] +--recurse-submodules[=<pathspec>]

@@ -1182,7 +1182,7 @@

OPTIONS

or --mirror is given)

---[no-]shallow-submodules +--[no-]shallow-submodules

@@ -1190,7 +1190,7 @@

OPTIONS

---[no-]remote-submodules +--[no-]remote-submodules

@@ -1201,7 +1201,7 @@

OPTIONS

---separate-git-dir=<git-dir> +--separate-git-dir=<git-dir>

@@ -1213,7 +1213,7 @@

OPTIONS

---ref-format=<ref-format> +--ref-format=<ref-format>

@@ -1234,10 +1234,10 @@

OPTIONS

--j <n> +-j <n>
---jobs <n> +--jobs <n>

@@ -1246,7 +1246,7 @@

OPTIONS

-<repository> +<repository>

@@ -1256,7 +1256,7 @@

OPTIONS

-<directory> +<directory>

@@ -1268,7 +1268,7 @@

OPTIONS

---bundle-uri=<uri> +--bundle-uri=<uri>

@@ -1298,22 +1298,22 @@

GIT URLS

  • -ssh://[user@]host.xz[:port]/path/to/repo.git/ +ssh://[<user>@]<host>[:<port>]/<path-to-git-repo>

  • -git://host.xz[:port]/path/to/repo.git/ +git://<host>[:<port>]/<path-to-git-repo>

  • -http[s]://host.xz[:port]/path/to/repo.git/ +http[s]://<host>[:<port>]/<path-to-git-repo>

  • -ftp[s]://host.xz[:port]/path/to/repo.git/ +ftp[s]://<host>[:<port>]/<path-to-git-repo>

@@ -1321,7 +1321,7 @@

GIT URLS

  • -[user@]host.xz:path/to/repo.git/ +[<user>@]<host>:/<path-to-git-repo>

@@ -1330,21 +1330,21 @@

GIT URLS

colon. For example the local path foo:bar could be specified as an absolute path or ./foo:bar to avoid being misinterpreted as an ssh url.

-

The ssh and git protocols additionally support ~username expansion:

+

The ssh and git protocols additionally support ~<username> expansion:

  • -ssh://[user@]host.xz[:port]/~[user]/path/to/repo.git/ +ssh://[<user>@]<host>[:<port>]/~<user>/<path-to-git-repo>

  • -git://host.xz[:port]/~[user]/path/to/repo.git/ +git://<host>[:<port>]/~<user>/<path-to-git-repo>

  • -[user@]host.xz:/~[user]/path/to/repo.git/ +[<user>@]<host>:~<user>/<path-to-git-repo>

@@ -1353,12 +1353,12 @@

GIT URLS

  • -/path/to/repo.git/ +/path/to/repo.git/

  • -file:///path/to/repo.git/ +file:///path/to/repo.git/

@@ -1367,13 +1367,13 @@

GIT URLS

git clone, git fetch and git pull, but not git push, will also accept a suitable bundle file. See 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 +attempts to use the remote-<transport> remote helper, if one exists. To explicitly request a remote helper, the following syntax may be used:

  • -<transport>::_<address>_ +<transport>::<address>

@@ -1384,10 +1384,10 @@

GIT URLS

you want to use a different format for them (such that the URLs you use will be rewritten into URLs that work), you can create a configuration section of the form:

-
-
-
        [url "<actual-url-base>"]
-                insteadOf = <other-url-base>
+
+
        [url "<actual-url-base>"]
+                insteadOf = <other-url-base>
+

For example, with this:

@@ -1400,10 +1400,10 @@

GIT URLS

rewritten in any context that takes a URL to be "git://git.host.xz/repo.git".

If you want to rewrite URLs for push only, you can create a configuration section of the form:

-
-
-
        [url "<actual-url-base>"]
-                pushInsteadOf = <other-url-base>
+
+
        [url "<actual-url-base>"]
+                pushInsteadOf = <other-url-base>
+

For example, with this:

@@ -1474,7 +1474,7 @@

CONFIGURATION

as what’s found there:

-init.templateDir +init.templateDir

@@ -1482,7 +1482,7 @@

CONFIGURATION

-init.defaultBranch +init.defaultBranch

@@ -1491,26 +1491,27 @@

CONFIGURATION

-clone.defaultRemoteName +clone.defaultRemoteName

The name of the remote to create when cloning a repository. Defaults to - origin, and can be overridden by passing the --origin command-line - option to git-clone(1). + origin. + It can be overridden by passing the --origin command-line + option.

-clone.rejectShallow +clone.rejectShallow

Reject cloning a repository if it is a shallow one; this can be overridden by - passing the --reject-shallow option on the command line. See git-clone(1) + passing the --reject-shallow option on the command line.

-clone.filterSubmodules +clone.filterSubmodules

@@ -1533,7 +1534,7 @@

GIT

diff --git a/git-clone.txt b/git-clone.txt index f90977a85..5de18de2a 100644 --- a/git-clone.txt +++ b/git-clone.txt @@ -9,15 +9,15 @@ git-clone - Clone a repository into a new directory SYNOPSIS -------- [verse] -'git clone' [--template=] - [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror] - [-o ] [-b ] [-u ] [--reference ] - [--dissociate] [--separate-git-dir ] - [--depth ] [--[no-]single-branch] [--no-tags] - [--recurse-submodules[=]] [--[no-]shallow-submodules] - [--[no-]remote-submodules] [--jobs ] [--sparse] [--[no-]reject-shallow] - [--filter= [--also-filter-submodules]] [--] - [] +`git clone` [++--template=++____] + [`-l`] [`-s`] [`--no-hardlinks`] [`-q`] [`-n`] [`--bare`] [`--mirror`] + [`-o` __] [`-b` __] [`-u` __] [`--reference` __] + [`--dissociate`] [`--separate-git-dir` __] + [`--depth` __] [`--`[`no-`]`single-branch`] [`--no-tags`] + [++--recurse-submodules++[++=++____]] [`--`[`no-`]`shallow-submodules`] + [`--`[`no-`]`remote-submodules`] [`--jobs` __] [`--sparse`] [`--`[`no-`]`reject-shallow`] + [++--filter=++____] [`--also-filter-submodules`]] [`--`] __ + [__] DESCRIPTION ----------- @@ -31,7 +31,7 @@ currently active branch. After the clone, a plain `git fetch` without arguments will update all the remote-tracking branches, and a `git pull` without arguments will in addition merge the remote master branch into the -current master branch, if any (this is untrue when "--single-branch" +current master branch, if any (this is untrue when `--single-branch` is given; see below). This default configuration is achieved by creating references to @@ -42,12 +42,12 @@ configuration variables. OPTIONS ------- --l:: ---local:: +`-l`:: +`--local`:: When the repository to clone from is on a local machine, this flag bypasses the normal "Git aware" transport mechanism and clones the repository by making a copy of - HEAD and everything under objects and refs directories. + `HEAD` and everything under objects and refs directories. The files under `.git/objects/` directory are hardlinked to save space when possible. + @@ -67,14 +67,14 @@ links. source repository, similar to running `cp -r src dst` while modifying `src`. ---no-hardlinks:: +`--no-hardlinks`:: Force the cloning process from a repository on a local filesystem to copy the files under the `.git/objects` directory instead of using hardlinks. This may be desirable if you are trying to make a back-up of your repository. --s:: ---shared:: +`-s`:: +`--shared`:: When the repository to clone is on the local machine, instead of using hard links, automatically setup `.git/objects/info/alternates` to share the objects @@ -101,7 +101,7 @@ If you want to break the dependency of a repository cloned with `--shared` on its source repository, you can simply run `git repack -a` to copy all objects from the source repository into a pack in the cloned repository. ---reference[-if-able] :: +`--reference`[`-if-able`] __:: If the reference __ is on the local machine, automatically setup `.git/objects/info/alternates` to obtain objects from the reference __. Using @@ -115,7 +115,7 @@ objects from the source repository into a pack in the cloned repository. *NOTE*: see the NOTE for the `--shared` option, and also the `--dissociate` option. ---dissociate:: +`--dissociate`:: Borrow the objects from reference repositories specified with the `--reference` options only to reduce network transfer, and stop borrowing from them after a clone is made @@ -126,43 +126,43 @@ objects from the source repository into a pack in the cloned repository. same repository, and this option can be used to stop the borrowing. --q:: ---quiet:: +`-q`:: +`--quiet`:: Operate quietly. Progress is not reported to the standard error stream. --v:: ---verbose:: +`-v`:: +`--verbose`:: Run verbosely. Does not affect the reporting of progress status to the standard error stream. ---progress:: +`--progress`:: Progress status is reported on the standard error stream by default when it is attached to a terminal, unless `--quiet` is specified. This flag forces progress status even if the standard error stream is not directed to a terminal. ---server-option=
-clone.defaultRemoteName +clone.defaultRemoteName

The name of the remote to create when cloning a repository. Defaults to - origin, and can be overridden by passing the --origin command-line + origin. + It can be overridden by passing the --origin command-line option to git-clone(1).

-clone.rejectShallow +clone.rejectShallow

Reject cloning a repository if it is a shallow one; this can be overridden by - passing the --reject-shallow option on the command line. See git-clone(1) + passing the --reject-shallow option on the command line. + See git-clone(1).

-clone.filterSubmodules +clone.filterSubmodules

@@ -7948,7 +7950,7 @@

Variables

-init.templateDir +init.templateDir

@@ -7956,7 +7958,7 @@

Variables

-init.defaultBranch +init.defaultBranch

diff --git a/git-fetch.html b/git-fetch.html index 2b00cedd3..6ee6a26e7 100644 --- a/git-fetch.html +++ b/git-fetch.html @@ -1446,22 +1446,22 @@

GIT URLS

  • -ssh://[user@]host.xz[:port]/path/to/repo.git/ +ssh://[<user>@]<host>[:<port>]/<path-to-git-repo>

  • -git://host.xz[:port]/path/to/repo.git/ +git://<host>[:<port>]/<path-to-git-repo>

  • -http[s]://host.xz[:port]/path/to/repo.git/ +http[s]://<host>[:<port>]/<path-to-git-repo>

  • -ftp[s]://host.xz[:port]/path/to/repo.git/ +ftp[s]://<host>[:<port>]/<path-to-git-repo>

@@ -1469,7 +1469,7 @@

GIT URLS

  • -[user@]host.xz:path/to/repo.git/ +[<user>@]<host>:/<path-to-git-repo>

@@ -1478,21 +1478,21 @@

GIT URLS

colon. For example the local path foo:bar could be specified as an absolute path or ./foo:bar to avoid being misinterpreted as an ssh url.

-

The ssh and git protocols additionally support ~username expansion:

+

The ssh and git protocols additionally support ~<username> expansion:

  • -ssh://[user@]host.xz[:port]/~[user]/path/to/repo.git/ +ssh://[<user>@]<host>[:<port>]/~<user>/<path-to-git-repo>

  • -git://host.xz[:port]/~[user]/path/to/repo.git/ +git://<host>[:<port>]/~<user>/<path-to-git-repo>

  • -[user@]host.xz:/~[user]/path/to/repo.git/ +[<user>@]<host>:~<user>/<path-to-git-repo>

@@ -1501,12 +1501,12 @@

GIT URLS

  • -/path/to/repo.git/ +/path/to/repo.git/

  • -file:///path/to/repo.git/ +file:///path/to/repo.git/

@@ -1516,13 +1516,13 @@

GIT URLS

git clone, git fetch and git pull, but not git push, will also accept a suitable bundle file. See 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 +attempts to use the remote-<transport> remote helper, if one exists. To explicitly request a remote helper, the following syntax may be used:

  • -<transport>::_<address>_ +<transport>::<address>

@@ -1533,10 +1533,10 @@

GIT URLS

you want to use a different format for them (such that the URLs you use will be rewritten into URLs that work), you can create a configuration section of the form:

-
-
-
        [url "<actual-url-base>"]
-                insteadOf = <other-url-base>
+
+
        [url "<actual-url-base>"]
+                insteadOf = <other-url-base>
+

For example, with this:

@@ -1549,10 +1549,10 @@

GIT URLS

rewritten in any context that takes a URL to be "git://git.host.xz/repo.git".

If you want to rewrite URLs for push only, you can create a configuration section of the form:

-
-
-
        [url "<actual-url-base>"]
-                pushInsteadOf = <other-url-base>
+
+
        [url "<actual-url-base>"]
+                pushInsteadOf = <other-url-base>
+

For example, with this:

diff --git a/git-init.html b/git-init.html index 51c139e95..8a329281c 100644 --- a/git-init.html +++ b/git-init.html @@ -749,11 +749,11 @@

NAME

SYNOPSIS

-
git init [-q | --quiet] [--bare] [--template=<template-directory>]
-          [--separate-git-dir <git-dir>] [--object-format=<format>]
-          [--ref-format=<format>]
-          [-b <branch-name> | --initial-branch=<branch-name>]
-          [--shared[=<permissions>]] [<directory>]
+
git init [-q | --quiet] [--bare] [--template=<template-directory>]
+          [--separate-git-dir <git-dir>] [--object-format=<format>]
+          [--ref-format=<format>]
+          [-b <branch-name> | --initial-branch=<branch-name>]
+          [--shared[=<permissions>]] [<directory>]
@@ -783,10 +783,10 @@

OPTIONS

--q +-q
---quiet +--quiet

@@ -794,7 +794,7 @@

OPTIONS

---bare +--bare

@@ -803,7 +803,7 @@

OPTIONS

---object-format=<format> +--object-format=<format>

@@ -822,7 +822,7 @@

OPTIONS

without data loss.

---ref-format=<format> +--ref-format=<format>

@@ -843,7 +843,7 @@

OPTIONS

---template=<template-directory> +--template=<template-directory>

@@ -852,7 +852,7 @@

OPTIONS

---separate-git-dir=<git-dir> +--separate-git-dir=<git-dir>

@@ -864,10 +864,10 @@

OPTIONS

If this is a reinitialization, the repository will be moved to the specified path.

--b <branch-name> +-b <branch-name>
---initial-branch=<branch-name> +--initial-branch=<branch-name>

@@ -878,7 +878,7 @@

OPTIONS

---shared[=(false|true|umask|group|all|world|everybody|<perm>)] +--shared[=(false|true|umask|group|all|world|everybody|<perm>)]

@@ -887,7 +887,7 @@

OPTIONS

repository. When specified, the config variable core.sharedRepository is set so that files and directories under $GIT_DIR are created with the requested permissions. When not specified, Git will use permissions reported -by umask(2). +by umask(2).

The option can have the following values, defaulting to group if no value is given:

@@ -895,41 +895,41 @@

OPTIONS

-umask +umask
-false +false

-Use permissions reported by umask(2). The default, when --shared is not +Use permissions reported by umask(2). The default, when --shared is not specified.

-group +group
-true +true

-Make the repository group-writable, (and g+sx, since the git group may not be +Make the repository group-writable, (and g+sx, since the git group may not be the primary group of all users). This is used to loosen the permissions of an -otherwise safe umask(2) value. Note that the umask still applies to the other +otherwise safe umask(2) value. Note that the umask still applies to the other permission bits (e.g. if umask is 0022, using group will not remove read privileges from other (non-group) users). See 0xxx for how to exactly specify the repository permissions.

-all +all
-world +world
-everybody +everybody

@@ -937,12 +937,12 @@

OPTIONS

-<perm> +<perm>

<perm> is a 3-digit octal number prefixed with ‘0` and each file -will have mode <perm>. <perm> will override users’umask(2) +will have mode <perm>. <perm> will override users’ umask(2) value (and not only loosen permissions as group and all do). 0640 will create a repository which is group-readable, but not group-writable or accessible to others. 0660 will create a repo @@ -1041,7 +1041,7 @@

CONFIGURATION

as what’s found there:

-init.templateDir +init.templateDir

@@ -1049,7 +1049,7 @@

CONFIGURATION

-init.defaultBranch +init.defaultBranch

@@ -1071,7 +1071,7 @@

GIT

diff --git a/git-init.txt b/git-init.txt index 2f864e11e..daff93bd1 100644 --- a/git-init.txt +++ b/git-init.txt @@ -9,11 +9,11 @@ git-init - Create an empty Git repository or reinitialize an existing one SYNOPSIS -------- [verse] -'git init' [-q | --quiet] [--bare] [--template=] - [--separate-git-dir ] [--object-format=] - [--ref-format=] - [-b | --initial-branch=] - [--shared[=]] [] +`git init` [`-q` | `--quiet`] [`--bare`] [++--template=++____] + [`--separate-git-dir` __] [++--object-format=++____] + [++--ref-format=++____] + [`-b` __ | ++--initial-branch=++____] + [++--shared++[++=++____]] [__] DESCRIPTION @@ -41,35 +41,35 @@ the repository to another place if `--separate-git-dir` is given). OPTIONS ------- --q:: ---quiet:: +`-q`:: +`--quiet`:: Only print error and warning messages; all other output will be suppressed. ---bare:: +`--bare`:: Create a bare repository. If `GIT_DIR` environment is not set, it is set to the current working directory. ---object-format=:: +++--object-format=++____:: Specify the given object __ (hash algorithm) for the repository. The valid values are `sha1` and (if enabled) `sha256`. `sha1` is the default. + include::object-format-disclaimer.txt[] ---ref-format=:: +++--ref-format=++____:: Specify the given ref storage __ for the repository. The valid values are: + include::ref-storage-format.txt[] ---template=:: +++--template=++____:: Specify the directory from which templates will be used. (See the "TEMPLATE DIRECTORY" section below.) ---separate-git-dir=:: +++--separate-git-dir=++____:: Instead of initializing the repository as a directory to either `$GIT_DIR` or `./.git/`, create a text file there containing the path to the actual @@ -78,53 +78,53 @@ repository. + If this is a reinitialization, the repository will be moved to the specified path. --b :: ---initial-branch=:: +`-b` __:: +++--initial-branch=++____:: Use __ for the initial branch in the newly created repository. If not specified, fall back to the default name (currently `master`, but this is subject to change in the future; the name can be customized via the `init.defaultBranch` configuration variable). ---shared[=(false|true|umask|group|all|world|everybody|)]:: +++--shared++[++=++(`false`|`true`|`umask`|`group`|`all`|`world`|`everybody`|__)]:: Specify that the Git repository is to be shared amongst several users. This allows users belonging to the same group to push into that repository. When specified, the config variable `core.sharedRepository` is set so that files and directories under `$GIT_DIR` are created with the requested permissions. When not specified, Git will use permissions reported -by `umask(2)`. +by `umask`(2). + The option can have the following values, defaulting to `group` if no value is given: + -- -umask:: -false:: +`umask`:: +`false`:: -Use permissions reported by umask(2). The default, when `--shared` is not +Use permissions reported by `umask`(2). The default, when `--shared` is not specified. -group:: -true:: +`group`:: +`true`:: -Make the repository group-writable, (and g+sx, since the git group may not be +Make the repository group-writable, (and `g+sx`, since the git group may not be the primary group of all users). This is used to loosen the permissions of an -otherwise safe umask(2) value. Note that the umask still applies to the other +otherwise safe `umask`(2) value. Note that the umask still applies to the other permission bits (e.g. if umask is `0022`, using `group` will not remove read privileges from other (non-group) users). See `0xxx` for how to exactly specify the repository permissions. -all:: -world:: -everybody:: +`all`:: +`world`:: +`everybody`:: Same as `group`, but make the repository readable by all users. -:: +__:: __ is a 3-digit octal number prefixed with `0` and each file -will have mode __. __ will override users'`umask(2)` +will have mode __. __ will override users' `umask`(2) value (and not only loosen permissions as `group` and `all` do). `0640` will create a repository which is group-readable, but not group-writable or accessible to others. `0660` will create a repo diff --git a/git-pack-refs.html b/git-pack-refs.html index 851b6de27..e8b0c54c1 100644 --- a/git-pack-refs.html +++ b/git-pack-refs.html @@ -749,7 +749,7 @@

NAME

SYNOPSIS

-
git pack-refs [--all] [--no-prune] [--include <pattern>] [--exclude <pattern>]
+
git pack-refs [--all] [--no-prune] [--auto] [--include <pattern>] [--exclude <pattern>]
@@ -811,6 +811,31 @@

OPTIONS

+--auto +
+
+

+Pack refs as needed depending on the current state of the ref database. The +behavior depends on the ref format used by the repository and may change in the +future. +

+
    +
  • +

    +"files": No special handling for --auto has been implemented. +

    +
  • +
  • +

    +"reftable": Tables are compacted such that they form a geometric + sequence. For two tables N and N+1, where N+1 is newer, this + maintains the property that N is at least twice as big as N+1. Only + tables that violate this property are compacted. +

    +
  • +
+
+
--include <pattern>
@@ -860,7 +885,7 @@

GIT

diff --git a/git-pack-refs.txt b/git-pack-refs.txt index 284956acb..2dcabaf74 100644 --- a/git-pack-refs.txt +++ b/git-pack-refs.txt @@ -8,7 +8,7 @@ git-pack-refs - Pack heads and tags for efficient repository access SYNOPSIS -------- [verse] -'git pack-refs' [--all] [--no-prune] [--include ] [--exclude ] +'git pack-refs' [--all] [--no-prune] [--auto] [--include ] [--exclude ] DESCRIPTION ----------- @@ -60,6 +60,19 @@ with many branches of historical interests. The command usually removes loose refs under `$GIT_DIR/refs` hierarchy after packing them. This option tells it not to. +--auto:: + +Pack refs as needed depending on the current state of the ref database. The +behavior depends on the ref format used by the repository and may change in the +future. ++ + - "files": No special handling for `--auto` has been implemented. ++ + - "reftable": Tables are compacted such that they form a geometric + sequence. For two tables N and N+1, where N+1 is newer, this + maintains the property that N is at least twice as big as N+1. Only + tables that violate this property are compacted. + --include :: Pack refs based on a `glob(7)` pattern. Repetitions of this option diff --git a/git-pull.html b/git-pull.html index a987c942a..346c0ec60 100644 --- a/git-pull.html +++ b/git-pull.html @@ -1674,22 +1674,22 @@

GIT URLS

  • -ssh://[user@]host.xz[:port]/path/to/repo.git/ +ssh://[<user>@]<host>[:<port>]/<path-to-git-repo>

  • -git://host.xz[:port]/path/to/repo.git/ +git://<host>[:<port>]/<path-to-git-repo>

  • -http[s]://host.xz[:port]/path/to/repo.git/ +http[s]://<host>[:<port>]/<path-to-git-repo>

  • -ftp[s]://host.xz[:port]/path/to/repo.git/ +ftp[s]://<host>[:<port>]/<path-to-git-repo>

@@ -1697,7 +1697,7 @@

GIT URLS

  • -[user@]host.xz:path/to/repo.git/ +[<user>@]<host>:/<path-to-git-repo>

@@ -1706,21 +1706,21 @@

GIT URLS

colon. For example the local path foo:bar could be specified as an absolute path or ./foo:bar to avoid being misinterpreted as an ssh url.

-

The ssh and git protocols additionally support ~username expansion:

+

The ssh and git protocols additionally support ~<username> expansion:

  • -ssh://[user@]host.xz[:port]/~[user]/path/to/repo.git/ +ssh://[<user>@]<host>[:<port>]/~<user>/<path-to-git-repo>

  • -git://host.xz[:port]/~[user]/path/to/repo.git/ +git://<host>[:<port>]/~<user>/<path-to-git-repo>

  • -[user@]host.xz:/~[user]/path/to/repo.git/ +[<user>@]<host>:~<user>/<path-to-git-repo>

@@ -1729,12 +1729,12 @@

GIT URLS

  • -/path/to/repo.git/ +/path/to/repo.git/

  • -file:///path/to/repo.git/ +file:///path/to/repo.git/

@@ -1744,13 +1744,13 @@

GIT URLS

git clone, git fetch and git pull, but not git push, will also accept a suitable bundle file. See 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 +attempts to use the remote-<transport> remote helper, if one exists. To explicitly request a remote helper, the following syntax may be used:

  • -<transport>::_<address>_ +<transport>::<address>

@@ -1761,10 +1761,10 @@

GIT URLS

you want to use a different format for them (such that the URLs you use will be rewritten into URLs that work), you can create a configuration section of the form:

-
-
-
        [url "<actual-url-base>"]
-                insteadOf = <other-url-base>
+
+
        [url "<actual-url-base>"]
+                insteadOf = <other-url-base>
+

For example, with this:

@@ -1777,10 +1777,10 @@

GIT URLS

rewritten in any context that takes a URL to be "git://git.host.xz/repo.git".

If you want to rewrite URLs for push only, you can create a configuration section of the form:

-
-
-
        [url "<actual-url-base>"]
-                pushInsteadOf = <other-url-base>
+
+
        [url "<actual-url-base>"]
+                pushInsteadOf = <other-url-base>
+

For example, with this:

diff --git a/git-push.html b/git-push.html index fef78f778..85d874d1f 100644 --- a/git-push.html +++ b/git-push.html @@ -1340,22 +1340,22 @@

GIT URLS

  • -ssh://[user@]host.xz[:port]/path/to/repo.git/ +ssh://[<user>@]<host>[:<port>]/<path-to-git-repo>

  • -git://host.xz[:port]/path/to/repo.git/ +git://<host>[:<port>]/<path-to-git-repo>

  • -http[s]://host.xz[:port]/path/to/repo.git/ +http[s]://<host>[:<port>]/<path-to-git-repo>

  • -ftp[s]://host.xz[:port]/path/to/repo.git/ +ftp[s]://<host>[:<port>]/<path-to-git-repo>

@@ -1363,7 +1363,7 @@

GIT URLS

  • -[user@]host.xz:path/to/repo.git/ +[<user>@]<host>:/<path-to-git-repo>

@@ -1372,21 +1372,21 @@

GIT URLS

colon. For example the local path foo:bar could be specified as an absolute path or ./foo:bar to avoid being misinterpreted as an ssh url.

-

The ssh and git protocols additionally support ~username expansion:

+

The ssh and git protocols additionally support ~<username> expansion:

  • -ssh://[user@]host.xz[:port]/~[user]/path/to/repo.git/ +ssh://[<user>@]<host>[:<port>]/~<user>/<path-to-git-repo>

  • -git://host.xz[:port]/~[user]/path/to/repo.git/ +git://<host>[:<port>]/~<user>/<path-to-git-repo>

  • -[user@]host.xz:/~[user]/path/to/repo.git/ +[<user>@]<host>:~<user>/<path-to-git-repo>

@@ -1395,12 +1395,12 @@

GIT URLS

  • -/path/to/repo.git/ +/path/to/repo.git/

  • -file:///path/to/repo.git/ +file:///path/to/repo.git/

@@ -1410,13 +1410,13 @@

GIT URLS

git clone, git fetch and git pull, but not git push, will also accept a suitable bundle file. See 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 +attempts to use the remote-<transport> remote helper, if one exists. To explicitly request a remote helper, the following syntax may be used:

  • -<transport>::_<address>_ +<transport>::<address>

@@ -1427,10 +1427,10 @@

GIT URLS

you want to use a different format for them (such that the URLs you use will be rewritten into URLs that work), you can create a configuration section of the form:

-
-
-
        [url "<actual-url-base>"]
-                insteadOf = <other-url-base>
+
+
        [url "<actual-url-base>"]
+                insteadOf = <other-url-base>
+

For example, with this:

@@ -1443,10 +1443,10 @@

GIT URLS

rewritten in any context that takes a URL to be "git://git.host.xz/repo.git".

If you want to rewrite URLs for push only, you can create a configuration section of the form:

-
-
-
        [url "<actual-url-base>"]
-                pushInsteadOf = <other-url-base>
+
+
        [url "<actual-url-base>"]
+                pushInsteadOf = <other-url-base>
+

For example, with this:

diff --git a/git-remote-helpers.html b/git-remote-helpers.html index 3b57d1418..799f341b3 100644 --- a/git-remote-helpers.html +++ b/git-remote-helpers.html @@ -735,7 +735,7 @@
diff --git a/howto/coordinate-embargoed-releases.html b/howto/coordinate-embargoed-releases.html index 2753a7dac..00dee46d2 100644 --- a/howto/coordinate-embargoed-releases.html +++ b/howto/coordinate-embargoed-releases.html @@ -1038,7 +1038,7 @@

diff --git a/howto/keep-canonical-history-correct.html b/howto/keep-canonical-history-correct.html index 067a37f43..7e72e5619 100644 --- a/howto/keep-canonical-history-correct.html +++ b/howto/keep-canonical-history-correct.html @@ -735,7 +735,7 @@
@@ -939,7 +939,7 @@

Keep authoritative canonical history correct with git pull

diff --git a/howto/maintain-git.html b/howto/maintain-git.html index a692a3da3..6625c2bf2 100644 --- a/howto/maintain-git.html +++ b/howto/maintain-git.html @@ -735,7 +735,7 @@
@@ -1479,7 +1479,7 @@

Preparing a "merge-fix"

diff --git a/howto/new-command.html b/howto/new-command.html index 12f8c0b96..0e1e1fcaf 100644 --- a/howto/new-command.html +++ b/howto/new-command.html @@ -735,7 +735,7 @@
@@ -864,7 +864,7 @@

Integrating a command

diff --git a/howto/rebase-from-internal-branch.html b/howto/rebase-from-internal-branch.html index a0dd2381c..f8cdeba51 100644 --- a/howto/rebase-from-internal-branch.html +++ b/howto/rebase-from-internal-branch.html @@ -735,7 +735,7 @@
@@ -896,7 +896,7 @@

How to rebase from an internal branch

diff --git a/howto/rebuild-from-update-hook.html b/howto/rebuild-from-update-hook.html index de4d33d0f..6caac9444 100644 --- a/howto/rebuild-from-update-hook.html +++ b/howto/rebuild-from-update-hook.html @@ -735,7 +735,7 @@
@@ -848,7 +848,7 @@

How to rebuild from update hook

diff --git a/howto/recover-corrupted-blob-object.html b/howto/recover-corrupted-blob-object.html index b99817375..33d5e6e3a 100644 --- a/howto/recover-corrupted-blob-object.html +++ b/howto/recover-corrupted-blob-object.html @@ -735,7 +735,7 @@
@@ -881,7 +881,7 @@

How to recover a corrupted blob object

diff --git a/howto/recover-corrupted-object-harder.html b/howto/recover-corrupted-object-harder.html index 6dda781dc..98b8406f7 100644 --- a/howto/recover-corrupted-object-harder.html +++ b/howto/recover-corrupted-object-harder.html @@ -735,7 +735,7 @@
@@ -1190,7 +1190,7 @@

The adventure continues…

diff --git a/howto/revert-a-faulty-merge.html b/howto/revert-a-faulty-merge.html index 4fd3a0074..303bf26b6 100644 --- a/howto/revert-a-faulty-merge.html +++ b/howto/revert-a-faulty-merge.html @@ -735,7 +735,7 @@
@@ -1026,7 +1026,7 @@

How to revert a faulty merge

diff --git a/howto/revert-branch-rebase.html b/howto/revert-branch-rebase.html index 1d1b67087..bce06e406 100644 --- a/howto/revert-branch-rebase.html +++ b/howto/revert-branch-rebase.html @@ -735,7 +735,7 @@
@@ -908,7 +908,7 @@

How to revert an existing commit

diff --git a/howto/separating-topic-branches.html b/howto/separating-topic-branches.html index ad0cfcd36..57db206d2 100644 --- a/howto/separating-topic-branches.html +++ b/howto/separating-topic-branches.html @@ -735,7 +735,7 @@
@@ -842,7 +842,7 @@

How to separate topic branches

diff --git a/howto/setup-git-server-over-http.html b/howto/setup-git-server-over-http.html index c73599b25..66a48832e 100644 --- a/howto/setup-git-server-over-http.html +++ b/howto/setup-git-server-over-http.html @@ -735,7 +735,7 @@
@@ -1072,7 +1072,7 @@

Troubleshooting:

diff --git a/howto/update-hook-example.html b/howto/update-hook-example.html index c0f4b88b6..a00c78e7b 100644 --- a/howto/update-hook-example.html +++ b/howto/update-hook-example.html @@ -735,7 +735,7 @@
@@ -931,7 +931,7 @@

How to use the update hook

diff --git a/howto/use-git-daemon.html b/howto/use-git-daemon.html index 6189bdf76..5b0502c64 100644 --- a/howto/use-git-daemon.html +++ b/howto/use-git-daemon.html @@ -735,7 +735,7 @@
@@ -792,7 +792,7 @@

How to use git-daemon

diff --git a/howto/using-merge-subtree.html b/howto/using-merge-subtree.html index 7770ee2d1..09684bfa1 100644 --- a/howto/using-merge-subtree.html +++ b/howto/using-merge-subtree.html @@ -735,7 +735,7 @@
@@ -849,7 +849,7 @@

Additional tips

diff --git a/howto/using-signed-tag-in-pull-request.html b/howto/using-signed-tag-in-pull-request.html index e28889633..cdc76c2a8 100644 --- a/howto/using-signed-tag-in-pull-request.html +++ b/howto/using-signed-tag-in-pull-request.html @@ -735,7 +735,7 @@
@@ -953,7 +953,7 @@

Auditors

diff --git a/technical/api-error-handling.html b/technical/api-error-handling.html index f31e8ac45..aa6dac175 100644 --- a/technical/api-error-handling.html +++ b/technical/api-error-handling.html @@ -735,7 +735,7 @@
diff --git a/technical/api-index.html b/technical/api-index.html index c50ee981f..c294959a3 100644 --- a/technical/api-index.html +++ b/technical/api-index.html @@ -735,7 +735,7 @@
diff --git a/technical/api-merge.html b/technical/api-merge.html index 464308a97..ecc7d6a7a 100644 --- a/technical/api-merge.html +++ b/technical/api-merge.html @@ -735,7 +735,7 @@
diff --git a/technical/api-parse-options.html b/technical/api-parse-options.html index c5b1495ce..e2afd748f 100644 --- a/technical/api-parse-options.html +++ b/technical/api-parse-options.html @@ -735,7 +735,7 @@
diff --git a/technical/api-simple-ipc.html b/technical/api-simple-ipc.html index d3f2f917e..97e1990ce 100644 --- a/technical/api-simple-ipc.html +++ b/technical/api-simple-ipc.html @@ -735,7 +735,7 @@
diff --git a/technical/api-trace2.html b/technical/api-trace2.html index 99ec2a880..d76350cba 100644 --- a/technical/api-trace2.html +++ b/technical/api-trace2.html @@ -735,7 +735,7 @@
diff --git a/technical/bitmap-format.html b/technical/bitmap-format.html index 2f39acfe9..1b37da1cf 100644 --- a/technical/bitmap-format.html +++ b/technical/bitmap-format.html @@ -735,7 +735,7 @@
diff --git a/technical/bundle-uri.html b/technical/bundle-uri.html index ab41f9083..f970b7ad4 100644 --- a/technical/bundle-uri.html +++ b/technical/bundle-uri.html @@ -735,7 +735,7 @@
diff --git a/technical/hash-function-transition.html b/technical/hash-function-transition.html index d3de2f025..e917450ac 100644 --- a/technical/hash-function-transition.html +++ b/technical/hash-function-transition.html @@ -735,7 +735,7 @@
diff --git a/technical/long-running-process-protocol.html b/technical/long-running-process-protocol.html index 123df80da..1e53d32e9 100644 --- a/technical/long-running-process-protocol.html +++ b/technical/long-running-process-protocol.html @@ -735,7 +735,7 @@
diff --git a/technical/multi-pack-index.html b/technical/multi-pack-index.html index 989610ac9..3f6bf4c1c 100644 --- a/technical/multi-pack-index.html +++ b/technical/multi-pack-index.html @@ -735,7 +735,7 @@
diff --git a/technical/pack-heuristics.html b/technical/pack-heuristics.html index 206d9322c..c99bdc5f1 100644 --- a/technical/pack-heuristics.html +++ b/technical/pack-heuristics.html @@ -735,7 +735,7 @@
diff --git a/technical/parallel-checkout.html b/technical/parallel-checkout.html index 4f27aff4a..f2b4770f6 100644 --- a/technical/parallel-checkout.html +++ b/technical/parallel-checkout.html @@ -735,7 +735,7 @@
diff --git a/technical/partial-clone.html b/technical/partial-clone.html index 147b4adc7..d5872b526 100644 --- a/technical/partial-clone.html +++ b/technical/partial-clone.html @@ -735,7 +735,7 @@
diff --git a/technical/racy-git.html b/technical/racy-git.html index bffc22415..4c43b988e 100644 --- a/technical/racy-git.html +++ b/technical/racy-git.html @@ -735,7 +735,7 @@
diff --git a/technical/scalar.html b/technical/scalar.html index f063171ae..99169de5b 100644 --- a/technical/scalar.html +++ b/technical/scalar.html @@ -735,7 +735,7 @@
diff --git a/technical/send-pack-pipeline.html b/technical/send-pack-pipeline.html index e8806c298..00952881c 100644 --- a/technical/send-pack-pipeline.html +++ b/technical/send-pack-pipeline.html @@ -735,7 +735,7 @@
diff --git a/technical/shallow.html b/technical/shallow.html index 917e0493a..ddc8952ac 100644 --- a/technical/shallow.html +++ b/technical/shallow.html @@ -735,7 +735,7 @@
diff --git a/technical/trivial-merge.html b/technical/trivial-merge.html index f6f972981..e63d9a5b8 100644 --- a/technical/trivial-merge.html +++ b/technical/trivial-merge.html @@ -735,7 +735,7 @@
diff --git a/technical/unit-tests.html b/technical/unit-tests.html index b75a6cb4d..6b9914d30 100644 --- a/technical/unit-tests.html +++ b/technical/unit-tests.html @@ -735,7 +735,7 @@
diff --git a/urls.txt b/urls.txt index 0b9e0c430..7cec85aef 100644 --- a/urls.txt +++ b/urls.txt @@ -15,14 +15,14 @@ should be used with caution on unsecured networks. The following syntaxes may be used with them: -- ssh://{startsb}user@{endsb}host.xz{startsb}:port{endsb}/path/to/repo.git/ -- git://host.xz{startsb}:port{endsb}/path/to/repo.git/ -- http{startsb}s{endsb}://host.xz{startsb}:port{endsb}/path/to/repo.git/ -- ftp{startsb}s{endsb}://host.xz{startsb}:port{endsb}/path/to/repo.git/ +- ++ssh://++{startsb}____++@++{endsb}____{startsb}++:++____{endsb}++/++____ +- ++git://++____{startsb}:____{endsb}++/++____ +- ++http++{startsb}++s++{endsb}++://++____{startsb}++:++____{endsb}++/++____ +- ++ftp++{startsb}++s++{endsb}++://++____{startsb}++:++____{endsb}++/++____ An alternative scp-like syntax may also be used with the ssh protocol: -- {startsb}user@{endsb}host.xz:path/to/repo.git/ +- {startsb}____++@++{endsb}____++:/++____ This syntax is only recognized if there are no slashes before the first colon. This helps differentiate a local path that contains a @@ -30,17 +30,17 @@ colon. For example the local path `foo:bar` could be specified as an absolute path or `./foo:bar` to avoid being misinterpreted as an ssh url. -The ssh and git protocols additionally support ~username expansion: +The ssh and git protocols additionally support ++~++____ expansion: -- ssh://{startsb}user@{endsb}host.xz{startsb}:port{endsb}/~{startsb}user{endsb}/path/to/repo.git/ -- git://host.xz{startsb}:port{endsb}/~{startsb}user{endsb}/path/to/repo.git/ -- {startsb}user@{endsb}host.xz:/~{startsb}user{endsb}/path/to/repo.git/ +- ++ssh://++{startsb}____++@++{endsb}____{startsb}++:++____{endsb}++/~++____++/++____ +- ++git://++____{startsb}++:++____{endsb}++/~++____++/++____ +- {startsb}____++@++{endsb}____++:~++____++/++____ For local repositories, also supported by Git natively, the following syntaxes may be used: -- /path/to/repo.git/ -- \file:///path/to/repo.git/ +- `/path/to/repo.git/` +- ++file:///path/to/repo.git/++ ifndef::git-clone[] These two syntaxes are mostly equivalent, except when cloning, when @@ -57,11 +57,11 @@ endif::git-clone[] 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-` remote helper, if one +attempts to use the `remote-`{empty}____ remote helper, if one exists. To explicitly request a remote helper, the following syntax may be used: -- __::_
_ +- __::__
__ where _
_ may be a path, a server and path, or an arbitrary URL-like string recognized by the specific remote helper being @@ -72,10 +72,11 @@ you want to use a different format for them (such that the URLs you use will be rewritten into URLs that work), you can create a configuration section of the form: ------------- - [url ""] - insteadOf = ------------- +[verse] +-- + [url "____"] + insteadOf = __ +-- For example, with this: @@ -91,10 +92,11 @@ rewritten in any context that takes a URL to be "git://git.host.xz/repo.git". If you want to rewrite URLs for push only, you can create a configuration section of the form: ------------- - [url ""] - pushInsteadOf = ------------- +[verse] +-- + [url "____"] + pushInsteadOf = __ +-- For example, with this: diff --git a/user-manual.html b/user-manual.html index f68f2a4dc..819e3f37c 100644 --- a/user-manual.html +++ b/user-manual.html @@ -1,5 +1,5 @@ -Git User Manual

Git User Manual

Revision History
2024-04-05

Table of Contents

Introduction
1. Repositories and Branches
How to get a Git repository
How to check out a different version of a project
Understanding History: Commits
Understanding history: commits, parents, and reachability
Understanding history: History diagrams
Understanding history: What is a branch?
Manipulating branches
Examining an old version without creating a new branch
Examining branches from a remote repository
Naming branches, tags, and other references
Updating a repository with git fetch
Fetching branches from other repositories
2. Exploring Git history
How to use bisect to find a regression
Naming commits
Creating tags
Browsing revisions
Generating diffs
Viewing old file versions
Examples
Counting the number of commits on a branch
Check whether two branches point at the same history
Find first tagged version including a given fix
Showing commits unique to a given branch
Creating a changelog and tarball for a software release
Finding commits referencing a file with given content
3. Developing with Git
Telling Git your name
Creating a new repository
How to make a commit
Creating good commit messages
Ignoring files
How to merge
Resolving a merge
Getting conflict-resolution help during a merge
Undoing a merge
Fast-forward merges
Fixing mistakes
Fixing a mistake with a new commit
Fixing a mistake by rewriting history
Checking out an old version of a file
Temporarily setting aside work in progress
Ensuring good performance
Ensuring reliability
Checking the repository for corruption
Recovering lost changes
4. Sharing development with others
Getting updates with git pull
Submitting patches to a project
Importing patches to a project
Public Git repositories
Setting up a public repository
Exporting a Git repository via the Git protocol
Exporting a git repository via HTTP
Pushing changes to a public repository
What to do when a push fails
Setting up a shared repository
Allowing web browsing of a repository
How to get a Git repository with minimal history
Examples
Maintaining topic branches for a Linux subsystem maintainer
5. Rewriting history and maintaining patch series
Creating the perfect patch series
Keeping a patch series up to date using git rebase
Rewriting a single commit
Reordering or selecting from a patch series
Using interactive rebases
Other tools
Problems with rewriting history
Why bisecting merge commits can be harder than bisecting linear history
6. Advanced branch management
Fetching individual branches
git fetch and fast-forwards
Forcing git fetch to do non-fast-forward updates
Configuring remote-tracking branches
7. Git concepts
The Object Database
Commit Object
Tree Object
Blob Object
Trust
Tag Object
How Git stores objects efficiently: pack files
Dangling objects
Recovering from repository corruption
The index
8. Submodules
Pitfalls with submodules
9. Low-level Git operations
Object access and manipulation
The Workflow
working directory → index
index → object database
object database → index
index → working directory
Tying it all together
Examining the data
Merging multiple trees
Merging multiple trees, continued
10. Hacking Git
Object storage format
A birds-eye view of Git’s source code
11. Git Glossary
Git explained
A. Git Quick Reference
Creating a new repository
Managing branches
Exploring history
Making changes
Merging
Sharing your changes
Repository maintenance
B. Notes and todo list for this manual
Todo list

Introduction

Git is a fast distributed revision control system.

This manual is designed to be readable by someone with basic UNIX +Git User Manual

Git User Manual

Revision History
2024-04-09

Table of Contents

Introduction
1. Repositories and Branches
How to get a Git repository
How to check out a different version of a project
Understanding History: Commits
Understanding history: commits, parents, and reachability
Understanding history: History diagrams
Understanding history: What is a branch?
Manipulating branches
Examining an old version without creating a new branch
Examining branches from a remote repository
Naming branches, tags, and other references
Updating a repository with git fetch
Fetching branches from other repositories
2. Exploring Git history
How to use bisect to find a regression
Naming commits
Creating tags
Browsing revisions
Generating diffs
Viewing old file versions
Examples
Counting the number of commits on a branch
Check whether two branches point at the same history
Find first tagged version including a given fix
Showing commits unique to a given branch
Creating a changelog and tarball for a software release
Finding commits referencing a file with given content
3. Developing with Git
Telling Git your name
Creating a new repository
How to make a commit
Creating good commit messages
Ignoring files
How to merge
Resolving a merge
Getting conflict-resolution help during a merge
Undoing a merge
Fast-forward merges
Fixing mistakes
Fixing a mistake with a new commit
Fixing a mistake by rewriting history
Checking out an old version of a file
Temporarily setting aside work in progress
Ensuring good performance
Ensuring reliability
Checking the repository for corruption
Recovering lost changes
4. Sharing development with others
Getting updates with git pull
Submitting patches to a project
Importing patches to a project
Public Git repositories
Setting up a public repository
Exporting a Git repository via the Git protocol
Exporting a git repository via HTTP
Pushing changes to a public repository
What to do when a push fails
Setting up a shared repository
Allowing web browsing of a repository
How to get a Git repository with minimal history
Examples
Maintaining topic branches for a Linux subsystem maintainer
5. Rewriting history and maintaining patch series
Creating the perfect patch series
Keeping a patch series up to date using git rebase
Rewriting a single commit
Reordering or selecting from a patch series
Using interactive rebases
Other tools
Problems with rewriting history
Why bisecting merge commits can be harder than bisecting linear history
6. Advanced branch management
Fetching individual branches
git fetch and fast-forwards
Forcing git fetch to do non-fast-forward updates
Configuring remote-tracking branches
7. Git concepts
The Object Database
Commit Object
Tree Object
Blob Object
Trust
Tag Object
How Git stores objects efficiently: pack files
Dangling objects
Recovering from repository corruption
The index
8. Submodules
Pitfalls with submodules
9. Low-level Git operations
Object access and manipulation
The Workflow
working directory → index
index → object database
object database → index
index → working directory
Tying it all together
Examining the data
Merging multiple trees
Merging multiple trees, continued
10. Hacking Git
Object storage format
A birds-eye view of Git’s source code
11. Git Glossary
Git explained
A. Git Quick Reference
Creating a new repository
Managing branches
Exploring history
Making changes
Merging
Sharing your changes
Repository maintenance
B. Notes and todo list for this manual
Todo list

Introduction

Git is a fast distributed revision control system.

This manual is designed to be readable by someone with basic UNIX command-line skills, but no previous knowledge of Git.

Chapter 1, Repositories and Branches and Chapter 2, Exploring Git history explain how to fetch and study a project using git—read these chapters to learn how to build and test a particular version of a software project, search for