Compare commits
No commits in common. "master" and "v2.50.0-rc0" have entirely different histories.
master
...
v2.50.0-rc
|
@ -5,13 +5,11 @@ freebsd_task:
|
|||
env:
|
||||
GIT_PROVE_OPTS: "--timer --jobs 10"
|
||||
GIT_TEST_OPTS: "--no-chain-lint --no-bin-wrappers"
|
||||
GIT_SKIP_TESTS: t7815.12
|
||||
MAKEFLAGS: -j4
|
||||
MAKEFLAGS: "-j4"
|
||||
DEFAULT_TEST_TARGET: prove
|
||||
DEFAULT_UNIT_TEST_TARGET: unit-tests-prove
|
||||
DEVELOPER: 1
|
||||
freebsd_instance:
|
||||
image_family: freebsd-14-3
|
||||
image_family: freebsd-13-4
|
||||
memory: 2G
|
||||
install_script:
|
||||
pkg install -y gettext gmake perl5
|
||||
|
@ -21,4 +19,4 @@ freebsd_task:
|
|||
build_script:
|
||||
- su git -c gmake
|
||||
test_script:
|
||||
- su git -c 'gmake test unit-tests'
|
||||
- su git -c 'gmake DEFAULT_UNIT_TEST_TARGET=unit-tests-prove test unit-tests'
|
||||
|
|
|
@ -12,15 +12,7 @@ UseTab: Always
|
|||
TabWidth: 8
|
||||
IndentWidth: 8
|
||||
ContinuationIndentWidth: 8
|
||||
|
||||
# While we do want to enforce a character limit of 80 characters, we often
|
||||
# allow lines to overflow that limit to prioritize readability. Setting a
|
||||
# character limit here with penalties has been finicky and creates too many
|
||||
# false positives.
|
||||
#
|
||||
# NEEDSWORK: It would be nice if we can find optimal settings to ensure we
|
||||
# can re-enable the limit here.
|
||||
ColumnLimit: 0
|
||||
ColumnLimit: 80
|
||||
|
||||
# C Language specifics
|
||||
Language: Cpp
|
||||
|
@ -218,11 +210,16 @@ MaxEmptyLinesToKeep: 1
|
|||
# No empty line at the start of a block.
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
|
||||
# Penalties
|
||||
# This decides what order things should be done if a line is too long
|
||||
PenaltyBreakAssignment: 5
|
||||
PenaltyBreakBeforeFirstCallParameter: 5
|
||||
PenaltyBreakComment: 5
|
||||
PenaltyBreakFirstLessLess: 0
|
||||
PenaltyBreakOpenParenthesis: 300
|
||||
PenaltyBreakString: 5
|
||||
PenaltyExcessCharacter: 10
|
||||
PenaltyReturnTypeOnItsOwnLine: 300
|
||||
|
||||
# Don't sort #include's
|
||||
SortIncludes: false
|
||||
|
||||
# Remove optional braces of control statements (if, else, for, and while)
|
||||
# according to the LLVM coding style. This avoids braces on simple
|
||||
# single-statement bodies of statements but keeps braces if one side of
|
||||
# if/else if/.../else cascade has multi-statement body.
|
||||
RemoveBracesLLVM: true
|
||||
|
|
|
@ -147,13 +147,9 @@ jobs:
|
|||
key: cov-build-${{ env.COVERITY_LANGUAGE }}-${{ env.COVERITY_PLATFORM }}-${{ steps.lookup.outputs.hash }}
|
||||
- name: build with cov-build
|
||||
run: |
|
||||
export PATH="$PATH:$RUNNER_TEMP/cov-analysis/bin" &&
|
||||
export PATH="$RUNNER_TEMP/cov-analysis/bin:$PATH" &&
|
||||
cov-configure --gcc &&
|
||||
if ! cov-build --dir cov-int make
|
||||
then
|
||||
cat cov-int/build-log.txt
|
||||
exit 1
|
||||
fi
|
||||
cov-build --dir cov-int make
|
||||
- name: package the build
|
||||
run: tar -czvf cov-int.tgz cov-int
|
||||
- name: submit the build to Coverity Scan
|
||||
|
|
|
@ -298,7 +298,7 @@ jobs:
|
|||
path: build
|
||||
- name: Test
|
||||
shell: pwsh
|
||||
run: meson test -C build --no-rebuild --print-errorlogs --slice "$(1+${{ matrix.nr }})/10"
|
||||
run: meson test -C build --list | Select-Object -Skip 1 | Select-String .* | Group-Object -Property { $_.LineNumber % 10 } | Where-Object Name -EQ ${{ matrix.nr }} | ForEach-Object { meson test -C build --no-rebuild --print-errorlogs $_.Group }
|
||||
|
||||
regular:
|
||||
name: ${{matrix.vector.jobname}} (${{matrix.vector.pool}})
|
||||
|
|
|
@ -178,7 +178,7 @@ test:msvc-meson:
|
|||
- job: "build:msvc-meson"
|
||||
artifacts: true
|
||||
script:
|
||||
- meson test -C build --no-rebuild --print-errorlogs --slice $Env:CI_NODE_INDEX/$Env:CI_NODE_TOTAL
|
||||
- meson test -C build --list | Select-Object -Skip 1 | Select-String .* | Group-Object -Property { $_.LineNumber % $Env:CI_NODE_TOTAL + 1 } | Where-Object Name -EQ $Env:CI_NODE_INDEX | ForEach-Object { meson test -C build --no-rebuild --print-errorlogs $_.Group; if (!$?) { exit $LASTEXITCODE } }
|
||||
parallel: 10
|
||||
|
||||
test:fuzz-smoke-tests:
|
||||
|
|
|
@ -118,53 +118,6 @@ Cf. <2f5de416-04ba-c23d-1e0b-83bb655829a7@zombino.com>,
|
|||
<20170223155046.e7nxivfwqqoprsqj@LykOS.localdomain>,
|
||||
<CA+EOSBncr=4a4d8n9xS4FNehyebpmX8JiUwCsXD47EQDE+DiUQ@mail.gmail.com>.
|
||||
|
||||
* The default storage format for references in newly created repositories will
|
||||
be changed from "files" to "reftable". The "reftable" format provides
|
||||
multiple advantages over the "files" format:
|
||||
+
|
||||
** It is impossible to store two references that only differ in casing on
|
||||
case-insensitive filesystems with the "files" format. This issue is common
|
||||
on Windows and macOS platforms. As the "reftable" backend does not use
|
||||
filesystem paths to encode reference names this problem goes away.
|
||||
** Similarly, macOS normalizes path names that contain unicode characters,
|
||||
which has the consequence that you cannot store two names with unicode
|
||||
characters that are encoded differently with the "files" backend. Again,
|
||||
this is not an issue with the "reftable" backend.
|
||||
** Deleting references with the "files" backend requires Git to rewrite the
|
||||
complete "packed-refs" file. In large repositories with many references
|
||||
this file can easily be dozens of megabytes in size, in extreme cases it
|
||||
may be gigabytes. The "reftable" backend uses tombstone markers for
|
||||
deleted references and thus does not have to rewrite all of its data.
|
||||
** Repository housekeeping with the "files" backend typically performs
|
||||
all-into-one repacks of references. This can be quite expensive, and
|
||||
consequently housekeeping is a tradeoff between the number of loose
|
||||
references that accumulate and slow down operations that read references,
|
||||
and compressing those loose references into the "packed-refs" file. The
|
||||
"reftable" backend uses geometric compaction after every write, which
|
||||
amortizes costs and ensures that the backend is always in a
|
||||
well-maintained state.
|
||||
** Operations that write multiple references at once are not atomic with the
|
||||
"files" backend. Consequently, Git may see in-between states when it reads
|
||||
references while a reference transaction is in the process of being
|
||||
committed to disk.
|
||||
** Writing many references at once is slow with the "files" backend because
|
||||
every reference is created as a separate file. The "reftable" backend
|
||||
significantly outperforms the "files" backend by multiple orders of
|
||||
magnitude.
|
||||
** The reftable backend uses a binary format with prefix compression for
|
||||
reference names. As a result, the format uses less space compared to the
|
||||
"packed-refs" file.
|
||||
+
|
||||
Users that get immediate benefit from the "reftable" backend could continue to
|
||||
opt-in to the "reftable" format manually by setting the "init.defaultRefFormat"
|
||||
config. But defaults matter, and we think that overall users will have a better
|
||||
experience with less platform-specific quirks when they use the new backend by
|
||||
default.
|
||||
+
|
||||
A prerequisite for this change is that the ecosystem is ready to support the
|
||||
"reftable" format. Most importantly, alternative implementations of Git like
|
||||
JGit, libgit2 and Gitoxide need to support it.
|
||||
|
||||
=== Removals
|
||||
|
||||
* Support for grafting commits has long been superseded by git-replace(1).
|
||||
|
@ -230,14 +183,6 @@ These features will be removed.
|
|||
timeframe, in preference to its synonym "--annotate-stdin". Git 3.0
|
||||
removes the support for "--stdin" altogether.
|
||||
|
||||
* The git-whatchanged(1) command has outlived its usefulness more than
|
||||
10 years ago, and takes more keystrokes to type than its rough
|
||||
equivalent `git log --raw`. We have nominated the command for
|
||||
removal, have changed the command to refuse to work unless the
|
||||
`--i-still-use-this` option is given, and asked the users to report
|
||||
when they do so. So far there hasn't been a single complaint.
|
||||
+
|
||||
The command will be removed.
|
||||
|
||||
== Superseded features that will not be deprecated
|
||||
|
||||
|
|
|
@ -315,9 +315,6 @@ For C programs:
|
|||
encouraged to have a blank line between the end of the declarations
|
||||
and the first statement in the block.
|
||||
|
||||
- Do not explicitly initialize global variables to 0 or NULL;
|
||||
instead, let BSS take care of the zero initialization.
|
||||
|
||||
- NULL pointers shall be written as NULL, not as 0.
|
||||
|
||||
- When declaring pointers, the star sides with the variable
|
||||
|
@ -880,17 +877,6 @@ Characters are also surrounded by underscores:
|
|||
As a side effect, backquoted placeholders are correctly typeset, but
|
||||
this style is not recommended.
|
||||
|
||||
When documenting multiple related `git config` variables, place them on
|
||||
a separate line instead of separating them by commas. For example, do
|
||||
not write this:
|
||||
`core.var1`, `core.var2`::
|
||||
Description common to `core.var1` and `core.var2`.
|
||||
|
||||
Instead write this:
|
||||
`core.var1`::
|
||||
`core.var2`::
|
||||
Description common to `core.var1` and `core.var2`.
|
||||
|
||||
Synopsis Syntax
|
||||
|
||||
The synopsis (a paragraph with [synopsis] attribute) is automatically
|
||||
|
|
|
@ -510,12 +510,7 @@ lint-docs-meson:
|
|||
awk "/^manpages = {$$/ {flag=1 ; next } /^}$$/ { flag=0 } flag { gsub(/^ \047/, \"\"); gsub(/\047 : [157],\$$/, \"\"); print }" meson.build | \
|
||||
grep -v -e '#' -e '^$$' | \
|
||||
sort >tmp-meson-diff/meson.adoc && \
|
||||
ls git*.adoc scalar.adoc | \
|
||||
grep -v -e git-bisect-lk2009.adoc \
|
||||
-e git-pack-redundant.adoc \
|
||||
-e git-tools.adoc \
|
||||
-e git-whatchanged.adoc \
|
||||
>tmp-meson-diff/actual.adoc && \
|
||||
ls git*.adoc scalar.adoc | grep -v -e git-bisect-lk2009.adoc -e git-pack-redundant.adoc -e git-tools.adoc >tmp-meson-diff/actual.adoc && \
|
||||
if ! cmp tmp-meson-diff/meson.adoc tmp-meson-diff/actual.adoc; then \
|
||||
echo "Meson man pages differ from actual man pages:"; \
|
||||
diff -u tmp-meson-diff/meson.adoc tmp-meson-diff/actual.adoc; \
|
||||
|
|
|
@ -43,7 +43,7 @@ Open up a new file `builtin/walken.c` and set up the command handler:
|
|||
#include "builtin.h"
|
||||
#include "trace.h"
|
||||
|
||||
int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)
|
||||
int cmd_walken(int argc, const char **argv, const char *prefix)
|
||||
{
|
||||
trace_printf(_("cmd_walken incoming...\n"));
|
||||
return 0;
|
||||
|
@ -83,36 +83,23 @@ int cmd_walken(int argc, const char **argv, const char *prefix)
|
|||
}
|
||||
----
|
||||
|
||||
Also add the relevant line in `builtin.h` near `cmd_version()`:
|
||||
Also add the relevant line in `builtin.h` near `cmd_whatchanged()`:
|
||||
|
||||
----
|
||||
int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo);
|
||||
int cmd_walken(int argc, const char **argv, const char *prefix);
|
||||
----
|
||||
|
||||
Include the command in `git.c` in `commands[]` near the entry for `version`,
|
||||
Include the command in `git.c` in `commands[]` near the entry for `whatchanged`,
|
||||
maintaining alphabetical ordering:
|
||||
|
||||
----
|
||||
{ "walken", cmd_walken, RUN_SETUP },
|
||||
----
|
||||
|
||||
Add an entry for the new command in the both the Make and Meson build system,
|
||||
before the entry for `worktree`:
|
||||
Add it to the `Makefile` near the line for `builtin/worktree.o`:
|
||||
|
||||
- In the `Makefile`:
|
||||
----
|
||||
...
|
||||
BUILTIN_OBJS += builtin/walken.o
|
||||
...
|
||||
----
|
||||
|
||||
- In the `meson.build` file:
|
||||
----
|
||||
builtin_sources = [
|
||||
...
|
||||
'builtin/walken.c',
|
||||
...
|
||||
]
|
||||
----
|
||||
|
||||
Build and test out your command, without forgetting to ensure the `DEVELOPER`
|
||||
|
@ -206,7 +193,7 @@ initialization functions.
|
|||
|
||||
Next, we should have a look at any relevant configuration settings (i.e.,
|
||||
settings readable and settable from `git config`). This is done by providing a
|
||||
callback to `repo_config()`; within that callback, you can also invoke methods
|
||||
callback to `git_config()`; within that callback, you can also invoke methods
|
||||
from other components you may need that need to intercept these options. Your
|
||||
callback will be invoked once per each configuration value which Git knows about
|
||||
(global, local, worktree, etc.).
|
||||
|
@ -234,14 +221,14 @@ static int git_walken_config(const char *var, const char *value,
|
|||
}
|
||||
----
|
||||
|
||||
Make sure to invoke `repo_config()` with it in your `cmd_walken()`:
|
||||
Make sure to invoke `git_config()` with it in your `cmd_walken()`:
|
||||
|
||||
----
|
||||
int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)
|
||||
int cmd_walken(int argc, const char **argv, const char *prefix)
|
||||
{
|
||||
...
|
||||
|
||||
repo_config(repo, git_walken_config, NULL);
|
||||
git_config(git_walken_config, NULL);
|
||||
|
||||
...
|
||||
}
|
||||
|
@ -263,14 +250,14 @@ We'll also need to include the `revision.h` header:
|
|||
|
||||
...
|
||||
|
||||
int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)
|
||||
int cmd_walken(int argc, const char **argv, const char *prefix)
|
||||
{
|
||||
/* This can go wherever you like in your declarations.*/
|
||||
struct rev_info rev;
|
||||
...
|
||||
|
||||
/* This should go after the repo_config() call. */
|
||||
repo_init_revisions(repo, &rev, prefix);
|
||||
/* This should go after the git_config() call. */
|
||||
repo_init_revisions(the_repository, &rev, prefix);
|
||||
|
||||
...
|
||||
}
|
||||
|
@ -318,7 +305,7 @@ Then let's invoke `final_rev_info_setup()` after the call to
|
|||
`repo_init_revisions()`:
|
||||
|
||||
----
|
||||
int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo)
|
||||
int cmd_walken(int argc, const char **argv, const char *prefix)
|
||||
{
|
||||
...
|
||||
|
||||
|
|
|
@ -1,73 +0,0 @@
|
|||
Git v2.43.7 Release Notes
|
||||
=========================
|
||||
|
||||
This release includes fixes for CVE-2025-27613, CVE-2025-27614,
|
||||
CVE-2025-46334, CVE-2025-46835, CVE-2025-48384, CVE-2025-48385, and
|
||||
CVE-2025-48386.
|
||||
|
||||
Fixes since v2.43.6
|
||||
-------------------
|
||||
|
||||
* CVE-2025-27613, Gitk:
|
||||
|
||||
When a user clones an untrusted repository and runs Gitk without
|
||||
additional command arguments, any writable file can be created and
|
||||
truncated. The option "Support per-file encoding" must have been
|
||||
enabled. The operation "Show origin of this line" is affected as
|
||||
well, regardless of the option being enabled or not.
|
||||
|
||||
* CVE-2025-27614, Gitk:
|
||||
|
||||
A Git repository can be crafted in such a way that a user who has
|
||||
cloned the repository can be tricked into running any script
|
||||
supplied by the attacker by invoking `gitk filename`, where
|
||||
`filename` has a particular structure.
|
||||
|
||||
* CVE-2025-46334, Git GUI (Windows only):
|
||||
|
||||
A malicious repository can ship versions of sh.exe or typical
|
||||
textconv filter programs such as astextplain. On Windows, path
|
||||
lookup can find such executables in the worktree. These programs
|
||||
are invoked when the user selects "Git Bash" or "Browse Files" from
|
||||
the menu.
|
||||
|
||||
* CVE-2025-46835, Git GUI:
|
||||
|
||||
When a user clones an untrusted repository and is tricked into
|
||||
editing a file located in a maliciously named directory in the
|
||||
repository, then Git GUI can create and overwrite any writable
|
||||
file.
|
||||
|
||||
* CVE-2025-48384, Git:
|
||||
|
||||
When reading a config value, Git strips any trailing carriage
|
||||
return and line feed (CRLF). When writing a config entry, values
|
||||
with a trailing CR are not quoted, causing the CR to be lost when
|
||||
the config is later read. When initializing a submodule, if the
|
||||
submodule path contains a trailing CR, the altered path is read
|
||||
resulting in the submodule being checked out to an incorrect
|
||||
location. If a symlink exists that points the altered path to the
|
||||
submodule hooks directory, and the submodule contains an executable
|
||||
post-checkout hook, the script may be unintentionally executed
|
||||
after checkout.
|
||||
|
||||
* CVE-2025-48385, Git:
|
||||
|
||||
When cloning a repository Git knows to optionally fetch a bundle
|
||||
advertised by the remote server, which allows the server-side to
|
||||
offload parts of the clone to a CDN. The Git client does not
|
||||
perform sufficient validation of the advertised bundles, which
|
||||
allows the remote side to perform protocol injection.
|
||||
|
||||
This protocol injection can cause the client to write the fetched
|
||||
bundle to a location controlled by the adversary. The fetched
|
||||
content is fully controlled by the server, which can in the worst
|
||||
case lead to arbitrary code execution.
|
||||
|
||||
* CVE-2025-48386, Git:
|
||||
|
||||
The wincred credential helper uses a static buffer (`target`) as a
|
||||
unique key for storing and comparing against internal storage. This
|
||||
credential helper does not properly bounds check the available
|
||||
space remaining in the buffer before appending to it with
|
||||
`wcsncat()`, leading to potential buffer overflows.
|
|
@ -1,7 +0,0 @@
|
|||
Git v2.44.4 Release Notes
|
||||
=========================
|
||||
|
||||
This release merges up the fixes that appears in v2.43.7 to address
|
||||
the following CVEs: CVE-2025-27613, CVE-2025-27614, CVE-2025-46334,
|
||||
CVE-2025-46835, CVE-2025-48384, CVE-2025-48385, and CVE-2025-48386.
|
||||
See the release notes for v2.43.7 for details.
|
|
@ -1,7 +0,0 @@
|
|||
Git v2.45.4 Release Notes
|
||||
=========================
|
||||
|
||||
This release merges up the fixes that appears in v2.43.7, and v2.44.4
|
||||
to address the following CVEs: CVE-2025-27613, CVE-2025-27614,
|
||||
CVE-2025-46334, CVE-2025-46835, CVE-2025-48384, CVE-2025-48385, and
|
||||
CVE-2025-48386. See the release notes for v2.43.7 for details.
|
|
@ -1,7 +0,0 @@
|
|||
Git v2.46.4 Release Notes
|
||||
=========================
|
||||
|
||||
This release merges up the fixes that appears in v2.43.7, v2.44.4, and
|
||||
v2.45.4 to address the following CVEs: CVE-2025-27613, CVE-2025-27614,
|
||||
CVE-2025-46334, CVE-2025-46835, CVE-2025-48384, CVE-2025-48385, and
|
||||
CVE-2025-48386. See the release notes for v2.43.7 for details.
|
|
@ -1,8 +0,0 @@
|
|||
Git v2.47.3 Release Notes
|
||||
=========================
|
||||
|
||||
This release merges up the fixes that appears in v2.43.7, v2.44.4,
|
||||
v2.45.4, and v2.46.4 to address the following CVEs: CVE-2025-27613,
|
||||
CVE-2025-27614, CVE-2025-46334, CVE-2025-46835, CVE-2025-48384,
|
||||
CVE-2025-48385, and CVE-2025-48386. See the release notes for v2.43.7
|
||||
for details.
|
|
@ -1,8 +0,0 @@
|
|||
Git v2.48.2 Release Notes
|
||||
=========================
|
||||
|
||||
This release merges up the fixes that appears in v2.43.7, v2.44.4,
|
||||
v2.45.4, v2.46.4, and v2.47.3 to address the following CVEs:
|
||||
CVE-2025-27613, CVE-2025-27614, CVE-2025-46334, CVE-2025-46835,
|
||||
CVE-2025-48384, CVE-2025-48385, and CVE-2025-48386. See the release
|
||||
notes for v2.43.7 for details.
|
|
@ -1,12 +0,0 @@
|
|||
Git v2.49.1 Release Notes
|
||||
=========================
|
||||
|
||||
This release merges up the fixes that appear in v2.43.7, v2.44.4,
|
||||
v2.45.4, v2.46.4, v2.47.3, and v2.48.2 to address the following CVEs:
|
||||
CVE-2025-27613, CVE-2025-27614, CVE-2025-46334, CVE-2025-46835,
|
||||
CVE-2025-48384, CVE-2025-48385, and CVE-2025-48386. See the release
|
||||
notes for v2.43.7 for details.
|
||||
|
||||
It also contains some updates to various CI bits to work around
|
||||
and/or to adjust to the deprecation of use of Ubuntu 20.04 GitHub
|
||||
Actions CI, updates to to Fedora base image.
|
|
@ -36,7 +36,7 @@ UI, Workflows & Features
|
|||
* Auth-related (and unrelated) error handling in send-email has been
|
||||
made more robust.
|
||||
|
||||
* Updating multiple references have only been possible in an all-or-nothing
|
||||
* Updating multiple references have only been possible in all-or-none
|
||||
fashion with transactions, but it can be more efficient to batch
|
||||
multiple updates even when some of them are allowed to fail in a
|
||||
best-effort manner. A new "best effort batches of updates" mode
|
||||
|
@ -53,7 +53,7 @@ UI, Workflows & Features
|
|||
|
||||
* The build procedure installs bash (but not zsh) completion script.
|
||||
|
||||
* send-email has been updated to work better with Outlook's SMTP server.
|
||||
* send-email has been updated to work better with Outlook's smtp server.
|
||||
|
||||
* "git diff --minimal" used to give non-minimal output when its
|
||||
optimization kicked in, which has been disabled.
|
||||
|
@ -62,7 +62,7 @@ UI, Workflows & Features
|
|||
delta chains from forming in a corner case even when there is no
|
||||
such cycle.
|
||||
|
||||
* Make repository clean-up tasks that "gc" can do available to "git
|
||||
* Make repository clean-up tasks "gc" can do available to "git
|
||||
maintenance" front-end.
|
||||
|
||||
* Bundle-URI feature did not use refs recorded in the bundle other
|
||||
|
@ -89,8 +89,6 @@ UI, Workflows & Features
|
|||
check, which can be useful when the repository arranges to ensure
|
||||
connectivity by some other means.
|
||||
|
||||
* "git notes --help" documentation updates.
|
||||
|
||||
|
||||
Performance, Internal Implementation, Development Support etc.
|
||||
--------------------------------------------------------------
|
||||
|
@ -102,9 +100,7 @@ Performance, Internal Implementation, Development Support etc.
|
|||
* "git fsck" becomes more careful when checking the refs.
|
||||
|
||||
* "git fast-export | git fast-import" learns to deal with commit and
|
||||
tag objects with embedded signatures a bit better. This is highly
|
||||
experimental and the format of the data stream may change in the
|
||||
future without compatibility guarantees.
|
||||
tag objects with embedded signatures a bit better.
|
||||
|
||||
* The code paths to check whether a refname X is available (by seeing
|
||||
if another ref X/Y exists, etc.) have been optimized.
|
||||
|
@ -188,7 +184,7 @@ Performance, Internal Implementation, Development Support etc.
|
|||
been dropped.
|
||||
|
||||
* The code path to access the "packed-refs" file while "fsck" is
|
||||
taught to mmap the file, instead of reading the whole file into
|
||||
taught to mmap the file, instead of reading the whole file in the
|
||||
memory.
|
||||
|
||||
* Assorted fixes for issues found with CodeQL.
|
||||
|
@ -197,21 +193,6 @@ Performance, Internal Implementation, Development Support etc.
|
|||
do not pass the leak checker tests, as they should no longer be
|
||||
needed.
|
||||
|
||||
* When a stale .midx file refers to .pack files that no longer exist,
|
||||
we ended up checking for these non-existent files repeatedly, which
|
||||
has been optimized by memoizing the non-existence.
|
||||
|
||||
* Build settings have been improved for BSD based systems.
|
||||
|
||||
* Newer version of libcURL detected curl_easy_setopt() calls we made
|
||||
with platform-natural "int" when we should have used "long", which
|
||||
all have been corrected.
|
||||
|
||||
* Tests that compare $HOME and $(pwd), which should be the same
|
||||
directory unless the tests chdir's around, would fail when the user
|
||||
enters the test directory via symbolic links, which has been
|
||||
corrected.
|
||||
|
||||
|
||||
Fixes since v2.49
|
||||
-----------------
|
||||
|
@ -311,7 +292,7 @@ Fixes since v2.49
|
|||
(merge e7ef4be7c2 mh/left-right-limited later to maint).
|
||||
|
||||
* Document the convention to disable hooks altogether by setting the
|
||||
hooksPath configuration variable to /dev/null.
|
||||
hooksPath configuration variable to /dev/nulll
|
||||
(merge 1b2eee94f1 ds/doc-disable-hooks later to maint).
|
||||
|
||||
* Make sure outage of third-party sites that supply P4, Git-LFS, and
|
||||
|
@ -327,10 +308,8 @@ Fixes since v2.49
|
|||
* Fix for scheduled maintenance tasks on platforms using launchctl.
|
||||
(merge eb2d7beb0e jh/gc-launchctl-schedule-fix later to maint).
|
||||
|
||||
* Update to arm64 Windows port (part of which had been reverted as it
|
||||
broke builds for existing platforms, which may need to be redone in
|
||||
future releases).
|
||||
|
||||
* Update to arm64 Windows port.
|
||||
(merge 436a42215e js/windows-arm64 later to maint).
|
||||
* hashmap API clean-up to ensure hashmap_clear() leaves a cleared map
|
||||
in a reusable state.
|
||||
(merge 9481877de3 en/hashmap-clear-fix later to maint).
|
||||
|
@ -364,7 +343,7 @@ Fixes since v2.49
|
|||
(merge 5dbaec628d pw/sequencer-reflog-use-after-free later to maint).
|
||||
|
||||
* win+Meson CI pipeline, unlike other pipelines for Windows,
|
||||
used to build artifacts in developer mode, which has been changed to
|
||||
used to build artifacts in develper mode, which has been changed to
|
||||
build them in release mode for consistency.
|
||||
(merge 184abdcf05 js/ci-build-win-in-release-mode later to maint).
|
||||
|
||||
|
@ -376,36 +355,6 @@ Fixes since v2.49
|
|||
expand sparse-index while working.
|
||||
(merge ecf9ba20e3 ds/sparse-apply-add-p later to maint).
|
||||
|
||||
* Avoid adding directory path to a sparse-index tree entries to the
|
||||
name-hash, since they would bloat the hashtable without anybody
|
||||
querying for them. This was done already for a single threaded
|
||||
part of the code, but now the multi-threaded code also does the
|
||||
same.
|
||||
(merge 2e60aabc75 am/sparse-index-name-hash-fix later to maint).
|
||||
|
||||
* Recent versions of Perl started warning against "! A =~ /pattern/"
|
||||
which does not negate the result of the matching. As it turns out
|
||||
that the problematic function is not even called, it was removed.
|
||||
(merge 67cae845d2 op/cvsserver-perl-warning later to maint).
|
||||
|
||||
* "git apply --index/--cached" when applying a deletion patch in
|
||||
reverse failed to give the mode bits of the path "removed" by the
|
||||
patch to the file it creates, which has been corrected.
|
||||
|
||||
* "git verify-refs" errored out in a repository in which
|
||||
linked worktrees were prepared with Git 2.43 or lower.
|
||||
(merge d5b3c38b8a sj/ref-contents-check-fix later to maint).
|
||||
|
||||
* Update total_ram() function on BSD variants.
|
||||
|
||||
* Update online_cpus() function on BSD variants.
|
||||
|
||||
* Revert a botched bswap.h change that broke ntohll() functions on
|
||||
big-endian systems with __builtin_bswap32/64().
|
||||
|
||||
* Fixes for GitHub Actions Coverity job.
|
||||
(merge 3cc4fc1ebd js/github-ci-win-coverity-fix later to maint).
|
||||
|
||||
* Other code cleanup, docfix, build fix, etc.
|
||||
(merge 227c4f33a0 ja/doc-block-delimiter-markup-fix later to maint).
|
||||
(merge 2bfd3b3685 ab/decorate-code-cleanup later to maint).
|
||||
|
@ -438,4 +387,3 @@ Fixes since v2.49
|
|||
(merge 91db6c735d ly/reftable-writer-leakfix later to maint).
|
||||
(merge 20e4e9ad0b jc/doc-synopsis-option-markup later to maint).
|
||||
(merge cddcee7f64 es/meson-configure-build-options-fix later to maint).
|
||||
(merge cea9f55f00 wk/sparse-checkout-doc-fix later to maint).
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
Git v2.50.1 Release Notes
|
||||
=========================
|
||||
|
||||
This release merges up the fixes that appear in v2.43.7, v2.44.4,
|
||||
v2.45.4, v2.46.4, v2.47.3, v2.48.2, and v2.49.1 to address the
|
||||
following CVEs: CVE-2025-27613, CVE-2025-27614, CVE-2025-46334,
|
||||
CVE-2025-46835, CVE-2025-48384, CVE-2025-48385, and
|
||||
CVE-2025-48386. See the release notes for v2.43.7 for details.
|
|
@ -1,222 +0,0 @@
|
|||
Git v2.51 Release Notes
|
||||
=======================
|
||||
|
||||
UI, Workflows & Features
|
||||
------------------------
|
||||
|
||||
* Userdiff patterns for the R language have been added.
|
||||
|
||||
* Documentation for "git send-email" has been updated with a bit more
|
||||
credential helper and OAuth information.
|
||||
|
||||
* "git cat-file --batch" learns to understand %(objectmode) atom to
|
||||
allow the caller to tell missing objects (due to repository
|
||||
corruption) and submodules (whose commit objects are OK to be
|
||||
missing) apart.
|
||||
|
||||
* "git diff --no-index dirA dirB" can limit the comparison with
|
||||
pathspec at the end of the command line, just like normal "git
|
||||
diff".
|
||||
|
||||
* "git subtree" (in contrib/) learned to grok GPG signing its commits.
|
||||
|
||||
* "git whatchanged" that is longer to type than "git log --raw"
|
||||
which is its modern rough equivalent has outlived its usefulness
|
||||
more than 10 years ago. Plan to deprecate and remove it.
|
||||
|
||||
* An interchange format for stash entries is defined, and subcommand
|
||||
of "git stash" to import/export has been added.
|
||||
|
||||
* "git merge/pull" has been taught the "--compact-summary" option to
|
||||
use the compact-summary format, intead of diffstat, when showing
|
||||
the summary of the incoming changes.
|
||||
|
||||
* "git imap-send" has been broken for a long time, which has been
|
||||
resurrected and then taught to talk OAuth2.0 etc.
|
||||
|
||||
* Some error messages from "git imap-send" has been updated.
|
||||
|
||||
* When "git daemon" sees a signal while attempting to accept() a new
|
||||
client, instead of retrying, it skipped it by mistake, which has
|
||||
been corrected.
|
||||
|
||||
* The reftable ref backend has matured enough; Git 3.0 will make it
|
||||
the default format in a newly created repositories by default.
|
||||
|
||||
* "netrc" credential helper has been improved to understand textual
|
||||
service names (like smtp) in addition to the numeric port numbers
|
||||
(like 25).
|
||||
|
||||
|
||||
Performance, Internal Implementation, Development Support etc.
|
||||
--------------------------------------------------------------
|
||||
|
||||
* "git pack-objects" learned to find delta bases from blobs at the
|
||||
same path, using the --path-walk API.
|
||||
|
||||
* CodingGuidelines update.
|
||||
|
||||
* Add settings for Solaris 10 & 11.
|
||||
|
||||
* Meson-based build/test framework now understands TAP output
|
||||
generated by our tests.
|
||||
|
||||
* "Do not explicitly initialize to zero" rule has been clarified in
|
||||
the CodingGuidelines document.
|
||||
|
||||
* A test helper "test_seq" function learned the "-f <fmt>" option,
|
||||
which allowed us to simplify a lot of test scripts.
|
||||
|
||||
* A lot of stale stuff has been removed from the contrib/ hierarchy.
|
||||
|
||||
* "git push" and "git fetch" are taught to update refs in batches to
|
||||
gain performance.
|
||||
|
||||
* Some code paths in the "git prune" used to ignore passed in
|
||||
repository object and used the_repository singleton instance
|
||||
instead, which has been corrected.
|
||||
|
||||
* Update ".clang-format" and ".editorconfig" to match our style guide
|
||||
a bit better.
|
||||
|
||||
* "make coccicheck" succeeds even when spatch made suggestions, which
|
||||
has been updated to fail in such a case.
|
||||
|
||||
* Code clean-up around object access API.
|
||||
|
||||
* Define .precision to more canned parse-options type to avoid bugs
|
||||
coming from using a variable with a wrong type to capture the
|
||||
parsed values.
|
||||
|
||||
* Flipping the default hash function to SHA-256 at Git 3.0 boundary
|
||||
is planned.
|
||||
|
||||
|
||||
Fixes since v2.50
|
||||
-----------------
|
||||
|
||||
Unless otherwise noted, all the changes in 2.50.X maintenance track,
|
||||
including security updates, are included in this release.
|
||||
|
||||
* A memory-leak in an error code path has been plugged.
|
||||
(merge 7082da85cb ly/commit-graph-graph-write-leakfix later to maint).
|
||||
|
||||
* A memory-leak in an error code path has been plugged.
|
||||
(merge aedebdb6b9 ly/fetch-pack-leakfix later to maint).
|
||||
|
||||
* Some leftover references to documentation source files that no
|
||||
longer exist, due to recent ".txt" -> ".adoc" renaming, have been
|
||||
corrected.
|
||||
(merge 3717a5775a jw/doc-txt-to-adoc-refs later to maint).
|
||||
|
||||
* "git stash -p <pathspec>" improvements.
|
||||
(merge 468817bab2 pw/stash-p-pathspec-fixes later to maint).
|
||||
|
||||
* "git send-email" incremented its internal message counter when a
|
||||
message was edited, which made logic that treats the first message
|
||||
specially misbehave, which has been corrected.
|
||||
(merge 2cc27b3501 ag/send-email-edit-threading-fix later to maint).
|
||||
|
||||
* "git stash" recorded a wrong branch name when submodules are
|
||||
present in the current checkout, which has been corrected.
|
||||
(merge ffb36c64f2 kj/stash-onbranch-submodule-fix later to maint).
|
||||
|
||||
* When asking to apply mailmap to both author and committer field
|
||||
while showing a commit object, the field that appears later was not
|
||||
correctly parsed and replaced, which has been corrected.
|
||||
(merge abf94a283f sa/multi-mailmap-fix later to maint).
|
||||
|
||||
* "git maintenance" lacked the care "git gc" had to avoid holding
|
||||
onto the repository lock for too long during packing refs, which
|
||||
has been remedied.
|
||||
(merge 1b5074e614 ps/maintenance-ref-lock later to maint).
|
||||
|
||||
* Avoid regexp_constraint and instead use comparison_constraint when
|
||||
listing functions to exclude from application of coccinelle rules,
|
||||
as spatch can be built with different regexp engine X-<.
|
||||
(merge f2ad545813 jc/cocci-avoid-regexp-constraint later to maint).
|
||||
|
||||
* Updating submodules from the upstream did not work well when
|
||||
submodule's HEAD is detached, which has been improved.
|
||||
(merge ca62f524c1 jk/submodule-remote-lookup-cleanup later to maint).
|
||||
|
||||
* Remove unnecessary check from "git daemon" code.
|
||||
(merge 0c856224d2 cb/daemon-fd-check-fix later to maint).
|
||||
|
||||
* Use of sysctl() system call to learn the total RAM size used on
|
||||
BSDs has been corrected.
|
||||
(merge 781c1cf571 cb/total-ram-bsd-fix later to maint).
|
||||
|
||||
* Drop FreeBSD 4 support and declare that we support only FreeBSD 12
|
||||
or later, which has memmem() supported.
|
||||
(merge 0392f976a7 bs/config-mak-freebsd later to maint).
|
||||
|
||||
* A diff-filter with negative-only specification like "git log
|
||||
--diff-filter=d" did not trigger correctly, which has been fixed.
|
||||
(merge 375ac087c5 jk/all-negative-diff-filter-fix later to maint).
|
||||
|
||||
* A failure to open the index file for writing due to conflicting
|
||||
access did not state what went wrong, which has been corrected.
|
||||
(merge 9455397a5c hy/read-cache-lock-error-fix later to maint).
|
||||
|
||||
* Tempfile removal fix in the codepath to sign commits with SSH keys.
|
||||
(merge 4498127b04 re/ssh-sign-buffer-fix later to maint).
|
||||
|
||||
* Code and test clean-up around string-list API.
|
||||
(merge 6e5b26c3ff sj/string-list later to maint).
|
||||
|
||||
* "git apply -N" should start from the current index and register
|
||||
only new files, but it instead started from an empty index, which
|
||||
has been corrected.
|
||||
(merge 2b49d97fcb rp/apply-intent-to-add-fix later to maint).
|
||||
|
||||
* Leakfix with a new and a bit invasive test on pack-bitmap files.
|
||||
(merge bfd5522e98 ly/load-bitmap-leakfix later to maint).
|
||||
|
||||
* "git fetch --prune" used to be O(n^2) expensive when there are many
|
||||
refs, which has been corrected.
|
||||
(merge 87d8d8c5d0 ph/fetch-prune-optim later to maint).
|
||||
|
||||
* When a ref creation at refs/heads/foo/bar fails, the files backend
|
||||
now removes refs/heads/foo/ if the directory is otherwise not used.
|
||||
(merge a3a7f20516 ps/refs-files-remove-empty-parent later to maint).
|
||||
|
||||
* "pack-objects" has been taught to avoid pointing into objects in
|
||||
cruft packs from midx.
|
||||
|
||||
* "git remote" now detects remote names that overlap with each other
|
||||
(e.g., remote nickname "outer" and "outer/inner" are used at the
|
||||
same time), as it will lead to overlapping remote-tracking
|
||||
branches.
|
||||
(merge a5a727c448 jk/remote-avoid-overlapping-names later to maint).
|
||||
|
||||
* The gpg.program configuration variable, which names a pathname to
|
||||
the (custom) GPG compatible program, can now be spelled with ~tilde
|
||||
expansion.
|
||||
(merge 7d275cd5c0 jb/gpg-program-variable-is-a-pathname later to maint).
|
||||
|
||||
* Other code cleanup, docfix, build fix, etc.
|
||||
(merge b257adb571 lo/my-first-ow-doc-update later to maint).
|
||||
(merge 8b34b6a220 ly/sequencer-update-squash-is-fixup-only later to maint).
|
||||
(merge 5dceb8bd05 ly/do-not-localize-bug-messages later to maint).
|
||||
(merge 61372dd613 ly/commit-buffer-reencode-leakfix later to maint).
|
||||
(merge 81cd1eef7d ly/pack-bitmap-root-leakfix later to maint).
|
||||
(merge bfc9f9cc64 ly/submodule-update-failure-leakfix later to maint).
|
||||
(merge 65dff89c6b ma/doc-diff-cc-headers later to maint).
|
||||
(merge efb61591ee jm/bundle-uri-debug-output-to-fp later to maint).
|
||||
(merge a3d278bb64 ly/prepare-show-merge-leakfix later to maint).
|
||||
(merge 1fde1c5daf ac/preload-index-wo-the-repository later to maint).
|
||||
(merge 855cfc65ae rm/t2400-modernize later to maint).
|
||||
(merge 2939494284 ly/run-builtin-use-passed-in-repo later to maint).
|
||||
(merge ff73f375bb jg/mailinfo-leakfix later to maint).
|
||||
(merge 996f14c02b jj/doc-branch-markup-fix later to maint).
|
||||
(merge 1e77de1864 cb/ci-freebsd-update-to-14.3 later to maint).
|
||||
(merge b0e9d25865 jk/fix-leak-send-pack later to maint).
|
||||
(merge f3a9558c8c bs/remote-helpers-doc-markup-fix later to maint).
|
||||
(merge c4e9775c60 kh/doc-config-subcommands later to maint).
|
||||
(merge de404249ab ps/perlless-test-fixes later to maint).
|
||||
(merge 953049eed8 ts/merge-orig-head-doc-fix later to maint).
|
||||
(merge 0c83bbc704 rj/freebsd-sysinfo-build-fix later to maint).
|
||||
(merge ad7780b38f ps/doc-pack-refs-auto-with-files-backend-fix later to maint).
|
||||
(merge f4fa8a3687 rh/doc-glob-pathspec-fix later to maint).
|
||||
(merge b27be108c8 ja/doc-git-log-markup later to maint).
|
|
@ -43,7 +43,7 @@ ifdef::doctype-book[]
|
|||
endif::doctype-book[]
|
||||
|
||||
[literal-inlinemacro]
|
||||
{eval:re.sub(r'(<[-a-zA-Z0-9.]+>)', r'<emphasis>\1</emphasis>', re.sub(r'([\[\s|()>]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@\\\*\/_^\$%]+\.?)+|,)',r'\1<literal>\2</literal>', re.sub(r'(\.\.\.?)([^\]$.])', r'<literal>\1</literal>\2', macros.passthroughs[int(attrs['passtext'][1:-1])] if attrs['passtext'][1:-1].isnumeric() else attrs['passtext'][1:-1])))}
|
||||
{eval:re.sub(r'(<[-a-zA-Z0-9.]+>)', r'<emphasis>\1</emphasis>', re.sub(r'([\[\s|()>]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@\\\*\/_^\$]+\.?)+|,)',r'\1<literal>\2</literal>', re.sub(r'(\.\.\.?)([^\]$.])', r'<literal>\1</literal>\2', macros.passthroughs[int(attrs['passtext'][1:-1])] if attrs['passtext'][1:-1].isnumeric() else attrs['passtext'][1:-1])))}
|
||||
|
||||
endif::backend-docbook[]
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ module Git
|
|||
elsif type == :monospaced
|
||||
node.text.gsub(/(\.\.\.?)([^\]$\.])/, '<literal>\1</literal>\2')
|
||||
.gsub(/^\.\.\.?$/, '<literal>\0</literal>')
|
||||
.gsub(%r{([\[\s|()>.]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@/_^\$\\\*%]+\.{0,2})+|,)}, '\1<literal>\2</literal>')
|
||||
.gsub(%r{([\[\s|()>.]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@/_^\$\\\*]+\.{0,2})+|,)}, '\1<literal>\2</literal>')
|
||||
.gsub(/(<[-a-zA-Z0-9.]+>)/, '<emphasis>\1</emphasis>')
|
||||
else
|
||||
open, close, supports_phrase = QUOTE_TAGS[type]
|
||||
|
@ -102,7 +102,7 @@ module Git
|
|||
if node.type == :monospaced
|
||||
node.text.gsub(/(\.\.\.?)([^\]$.])/, '<code>\1</code>\2')
|
||||
.gsub(/^\.\.\.?$/, '<code>\0</code>')
|
||||
.gsub(%r{([\[\s|()>.]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@,/_^\$\\\*%]+\.{0,2})+)}, '\1<code>\2</code>')
|
||||
.gsub(%r{([\[\s|()>.]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@,/_^\$\\\*]+\.{0,2})+)}, '\1<code>\2</code>')
|
||||
.gsub(/(<[-a-zA-Z0-9.]+>)/, '<em>\1</em>')
|
||||
|
||||
else
|
||||
|
|
|
@ -69,9 +69,9 @@ This option defaults to `never`.
|
|||
`git fetch`) to lookup the default branch for merging. Without
|
||||
this option, `git pull` defaults to merge the first refspec fetched.
|
||||
Specify multiple values to get an octopus merge.
|
||||
If you wish to setup `git pull` so that it merges into _<name>_ from
|
||||
If you wish to setup `git pull` so that it merges into <name> from
|
||||
another branch in the local repository, you can point
|
||||
`branch.<name>.merge` to the desired branch, and use the relative path
|
||||
branch.<name>.merge to the desired branch, and use the relative path
|
||||
setting `.` (a period) for `branch.<name>.remote`.
|
||||
|
||||
`branch.<name>.mergeOptions`::
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
`checkout.defaultRemote`::
|
||||
checkout.defaultRemote::
|
||||
When you run `git checkout <something>`
|
||||
or `git switch <something>` and only have one
|
||||
remote, it may implicitly fall back on checking out and
|
||||
tracking e.g. `origin/<something>`. This stops working as soon
|
||||
as you have more than one remote with a _<something>_
|
||||
as you have more than one remote with a `<something>`
|
||||
reference. This setting allows for setting the name of a
|
||||
preferred remote that should always win when it comes to
|
||||
disambiguation. The typical use-case is to set this to
|
||||
|
@ -12,17 +12,17 @@
|
|||
Currently this is used by linkgit:git-switch[1] and
|
||||
linkgit:git-checkout[1] when `git checkout <something>`
|
||||
or `git switch <something>`
|
||||
will checkout the _<something>_ branch on another remote,
|
||||
will checkout the `<something>` branch on another remote,
|
||||
and by linkgit:git-worktree[1] when `git worktree add` refers to a
|
||||
remote branch. This setting might be used for other checkout-like
|
||||
commands or functionality in the future.
|
||||
|
||||
`checkout.guess`::
|
||||
checkout.guess::
|
||||
Provides the default value for the `--guess` or `--no-guess`
|
||||
option in `git checkout` and `git switch`. See
|
||||
linkgit:git-switch[1] and linkgit:git-checkout[1].
|
||||
|
||||
`checkout.workers`::
|
||||
checkout.workers::
|
||||
The number of parallel workers to use when updating the working tree.
|
||||
The default is one, i.e. sequential execution. If set to a value less
|
||||
than one, Git will use as many workers as the number of logical cores
|
||||
|
@ -30,13 +30,13 @@ commands or functionality in the future.
|
|||
all commands that perform checkout. E.g. checkout, clone, reset,
|
||||
sparse-checkout, etc.
|
||||
+
|
||||
NOTE: Parallel checkout usually delivers better performance for repositories
|
||||
Note: Parallel checkout usually delivers better performance for repositories
|
||||
located on SSDs or over NFS. For repositories on spinning disks and/or machines
|
||||
with a small number of cores, the default sequential checkout often performs
|
||||
better. The size and compression level of a repository might also influence how
|
||||
well the parallel version performs.
|
||||
|
||||
`checkout.thresholdForParallelism`::
|
||||
checkout.thresholdForParallelism::
|
||||
When running parallel checkout with a small number of files, the cost
|
||||
of subprocess spawning and inter-process communication might outweigh
|
||||
the parallelization gains. This setting allows you to define the minimum
|
||||
|
|
|
@ -8,11 +8,10 @@ endif::git-commit[]
|
|||
This setting overrides the default of the `--cleanup` option in
|
||||
`git commit`. {see-git-commit} Changing the default can be useful
|
||||
when you always want to keep lines that begin
|
||||
with the comment character (`core.commentChar`, default `#`)
|
||||
in your log message, in which case you
|
||||
with the comment character `#` in your log message, in which case you
|
||||
would do `git config commit.cleanup whitespace` (note that you will
|
||||
have to remove the help lines that begin with the comment character
|
||||
in the commit log template yourself, if you do this).
|
||||
have to remove the help lines that begin with `#` in the commit log
|
||||
template yourself, if you do this).
|
||||
|
||||
`commit.gpgSign`::
|
||||
A boolean to specify whether all commits should be GPG signed.
|
||||
|
|
|
@ -20,16 +20,6 @@ walking fewer objects.
|
|||
+
|
||||
* `pack.allowPackReuse=multi` may improve the time it takes to create a pack by
|
||||
reusing objects from multiple packs instead of just one.
|
||||
+
|
||||
* `pack.usePathWalk` may speed up packfile creation and make the packfiles be
|
||||
significantly smaller in the presence of certain filename collisions with Git's
|
||||
default name-hash.
|
||||
+
|
||||
* `init.defaultRefFormat=reftable` causes newly initialized repositories to use
|
||||
the reftable format for storing references. This new format solves issues with
|
||||
case-insensitive filesystems, compresses better and performs significantly
|
||||
better with many use cases. Refer to Documentation/technical/reftable.adoc for
|
||||
more information on this new storage format.
|
||||
|
||||
feature.manyFiles::
|
||||
Enable config options that optimize for repos with many files in the
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
`merge.branchdesc`::
|
||||
merge.branchdesc::
|
||||
In addition to branch names, populate the log message with
|
||||
the branch description text associated with them. Defaults
|
||||
to false.
|
||||
|
||||
`merge.log`::
|
||||
merge.log::
|
||||
In addition to branch names, populate the log message with at
|
||||
most the specified number of one-line descriptions from the
|
||||
actual commits that are being merged. Defaults to false, and
|
||||
true is a synonym for 20.
|
||||
|
||||
`merge.suppressDest`::
|
||||
merge.suppressDest::
|
||||
By adding a glob that matches the names of integration
|
||||
branches to this multi-valued configuration variable, the
|
||||
default merge message computed for merges into these
|
||||
integration branches will omit "into _<branch-name>_" from
|
||||
integration branches will omit "into <branch name>" from
|
||||
its title.
|
||||
+
|
||||
An element with an empty value can be used to clear the list
|
||||
|
|
|
@ -68,15 +68,9 @@ format.encodeEmailHeaders::
|
|||
Defaults to true.
|
||||
|
||||
format.pretty::
|
||||
ifndef::with-breaking-changes[]
|
||||
The default pretty format for log/show/whatchanged command.
|
||||
See linkgit:git-log[1], linkgit:git-show[1],
|
||||
linkgit:git-whatchanged[1].
|
||||
endif::with-breaking-changes[]
|
||||
ifdef::with-breaking-changes[]
|
||||
The default pretty format for log/show command.
|
||||
See linkgit:git-log[1], linkgit:git-show[1].
|
||||
endif::with-breaking-changes[]
|
||||
|
||||
format.thread::
|
||||
The default threading style for 'git format-patch'. Can be
|
||||
|
|
|
@ -47,8 +47,7 @@ gitcvs.dbDriver::
|
|||
May not contain double colons (`:`). Default: 'SQLite'.
|
||||
See linkgit:git-cvsserver[1].
|
||||
|
||||
gitcvs.dbUser::
|
||||
gitcvs.dbPass::
|
||||
gitcvs.dbUser, gitcvs.dbPass::
|
||||
Database user and password. Only useful if setting `gitcvs.dbDriver`,
|
||||
since SQLite has no concept of database users and/or passwords.
|
||||
'gitcvs.dbUser' supports variable substitution (see
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
gpg.program::
|
||||
Pathname of the program to use instead of "`gpg`" when
|
||||
Use this custom program instead of "`gpg`" found on `$PATH` when
|
||||
making or verifying a PGP signature. The program must support the
|
||||
same command-line interface as GPG, namely, to verify a detached
|
||||
signature, "`gpg --verify $signature - <$file`" is run, and the
|
||||
|
|
|
@ -289,8 +289,7 @@ for most push problems, but can increase memory consumption
|
|||
significantly since the entire buffer is allocated even for small
|
||||
pushes.
|
||||
|
||||
http.lowSpeedLimit::
|
||||
http.lowSpeedTime::
|
||||
http.lowSpeedLimit, http.lowSpeedTime::
|
||||
If the HTTP transfer speed, in bytes per second, is less than
|
||||
'http.lowSpeedLimit' for longer than 'http.lowSpeedTime' seconds,
|
||||
the transfer is aborted.
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
imap.folder::
|
||||
The folder to drop the mails into, which is typically the Drafts
|
||||
folder. For example: `INBOX.Drafts`, `INBOX/Drafts` or
|
||||
`[Gmail]/Drafts`. The IMAP folder to interact with MUST be specified;
|
||||
the value of this configuration variable is used as the fallback
|
||||
default value when the `--folder` option is not given.
|
||||
folder. For example: "INBOX.Drafts", "INBOX/Drafts" or
|
||||
"[Gmail]/Drafts". Required.
|
||||
|
||||
imap.tunnel::
|
||||
Command used to set up a tunnel to the IMAP server through which
|
||||
|
@ -42,6 +40,5 @@ imap.authMethod::
|
|||
Specify the authentication method for authenticating with the IMAP server.
|
||||
If Git was built with the NO_CURL option, or if your curl version is older
|
||||
than 7.34.0, or if you're running git-imap-send with the `--no-curl`
|
||||
option, the only supported methods are `PLAIN`, `CRAM-MD5`, `OAUTHBEARER`
|
||||
and `XOAUTH2`. If this is not set then `git imap-send` uses the basic IMAP
|
||||
plaintext `LOGIN` command.
|
||||
option, the only supported method is 'CRAM-MD5'. If this is not set
|
||||
then 'git imap-send' uses the basic IMAP plaintext LOGIN command.
|
||||
|
|
|
@ -1,76 +1,64 @@
|
|||
`log.abbrevCommit`::
|
||||
If `true`, make
|
||||
ifndef::with-breaking-changes[]
|
||||
linkgit:git-log[1], linkgit:git-show[1], and
|
||||
linkgit:git-whatchanged[1]
|
||||
endif::with-breaking-changes[]
|
||||
ifdef::with-breaking-changes[]
|
||||
linkgit:git-log[1] and linkgit:git-show[1]
|
||||
endif::with-breaking-changes[]
|
||||
assume `--abbrev-commit`. You may
|
||||
log.abbrevCommit::
|
||||
If true, makes linkgit:git-log[1], linkgit:git-show[1], and
|
||||
linkgit:git-whatchanged[1] assume `--abbrev-commit`. You may
|
||||
override this option with `--no-abbrev-commit`.
|
||||
|
||||
`log.date`::
|
||||
Set the default date-time mode for the `log` command.
|
||||
Setting a value for log.date is similar to using `git log`'s
|
||||
log.date::
|
||||
Set the default date-time mode for the 'log' command.
|
||||
Setting a value for log.date is similar to using 'git log''s
|
||||
`--date` option. See linkgit:git-log[1] for details.
|
||||
+
|
||||
If the format is set to "auto:foo" and the pager is in use, format
|
||||
"foo" will be used for the date format. Otherwise, "default" will
|
||||
be used.
|
||||
|
||||
`log.decorate`::
|
||||
log.decorate::
|
||||
Print out the ref names of any commits that are shown by the log
|
||||
command. Possible values are:
|
||||
+
|
||||
----
|
||||
`short`;; the ref name prefixes `refs/heads/`, `refs/tags/` and
|
||||
`refs/remotes/` are not printed.
|
||||
`full`;; the full ref name (including prefix) are printed.
|
||||
`auto`;; if the output is going to a terminal,
|
||||
the ref names are shown as if `short` were given, otherwise no ref
|
||||
names are shown.
|
||||
----
|
||||
+
|
||||
This is the same as the `--decorate` option of the `git log`.
|
||||
command. If 'short' is specified, the ref name prefixes 'refs/heads/',
|
||||
'refs/tags/' and 'refs/remotes/' will not be printed. If 'full' is
|
||||
specified, the full ref name (including prefix) will be printed.
|
||||
If 'auto' is specified, then if the output is going to a terminal,
|
||||
the ref names are shown as if 'short' were given, otherwise no ref
|
||||
names are shown. This is the same as the `--decorate` option
|
||||
of the `git log`.
|
||||
|
||||
`log.initialDecorationSet`::
|
||||
log.initialDecorationSet::
|
||||
By default, `git log` only shows decorations for certain known ref
|
||||
namespaces. If 'all' is specified, then show all refs as
|
||||
decorations.
|
||||
|
||||
`log.excludeDecoration`::
|
||||
log.excludeDecoration::
|
||||
Exclude the specified patterns from the log decorations. This is
|
||||
similar to the `--decorate-refs-exclude` command-line option, but
|
||||
the config option can be overridden by the `--decorate-refs`
|
||||
option.
|
||||
|
||||
`log.diffMerges`::
|
||||
log.diffMerges::
|
||||
Set diff format to be used when `--diff-merges=on` is
|
||||
specified, see `--diff-merges` in linkgit:git-log[1] for
|
||||
details. Defaults to `separate`.
|
||||
|
||||
`log.follow`::
|
||||
log.follow::
|
||||
If `true`, `git log` will act as if the `--follow` option was used when
|
||||
a single <path> is given. This has the same limitations as `--follow`,
|
||||
i.e. it cannot be used to follow multiple files and does not work well
|
||||
on non-linear history.
|
||||
|
||||
`log.graphColors`::
|
||||
log.graphColors::
|
||||
A list of colors, separated by commas, that can be used to draw
|
||||
history lines in `git log --graph`.
|
||||
|
||||
`log.showRoot`::
|
||||
log.showRoot::
|
||||
If true, the initial commit will be shown as a big creation event.
|
||||
This is equivalent to a diff against an empty tree.
|
||||
Tools like linkgit:git-log[1] or linkgit:git-whatchanged[1], which
|
||||
normally hide the root commit will now show it. True by default.
|
||||
|
||||
`log.showSignature`::
|
||||
log.showSignature::
|
||||
If true, makes linkgit:git-log[1], linkgit:git-show[1], and
|
||||
linkgit:git-whatchanged[1] assume `--show-signature`.
|
||||
|
||||
`log.mailmap`::
|
||||
log.mailmap::
|
||||
If true, makes linkgit:git-log[1], linkgit:git-show[1], and
|
||||
linkgit:git-whatchanged[1] assume `--use-mailmap`, otherwise
|
||||
assume `--no-use-mailmap`. True by default.
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
`merge.conflictStyle`::
|
||||
merge.conflictStyle::
|
||||
Specify the style in which conflicted hunks are written out to
|
||||
working tree files upon merge. The default is "merge", which
|
||||
shows a +<<<<<<<+ conflict marker, changes made by one side,
|
||||
shows a `<<<<<<<` conflict marker, changes made by one side,
|
||||
a `=======` marker, changes made by the other side, and then
|
||||
a +>>>>>>>+ marker. An alternate style, "diff3", adds a +|||||||+
|
||||
a `>>>>>>>` marker. An alternate style, "diff3", adds a `|||||||`
|
||||
marker and the original text before the `=======` marker. The
|
||||
"merge" style tends to produce smaller conflict regions than diff3,
|
||||
both because of the exclusion of the original text, and because
|
||||
|
@ -13,17 +13,17 @@
|
|||
the conflict region when those matching lines appear near either
|
||||
the beginning or end of a conflict region.
|
||||
|
||||
`merge.defaultToUpstream`::
|
||||
merge.defaultToUpstream::
|
||||
If merge is called without any commit argument, merge the upstream
|
||||
branches configured for the current branch by using their last
|
||||
observed values stored in their remote-tracking branches.
|
||||
The values of the `branch.<current branch>.merge` that name the
|
||||
branches at the remote named by `branch.<current-branch>.remote`
|
||||
branches at the remote named by `branch.<current branch>.remote`
|
||||
are consulted, and then they are mapped via `remote.<remote>.fetch`
|
||||
to their corresponding remote-tracking branches, and the tips of
|
||||
these tracking branches are merged. Defaults to true.
|
||||
|
||||
`merge.ff`::
|
||||
merge.ff::
|
||||
By default, Git does not create an extra merge commit when merging
|
||||
a commit that is a descendant of the current commit. Instead, the
|
||||
tip of the current branch is fast-forwarded. When set to `false`,
|
||||
|
@ -33,46 +33,42 @@
|
|||
allowed (equivalent to giving the `--ff-only` option from the
|
||||
command line).
|
||||
|
||||
`merge.verifySignatures`::
|
||||
If true, this is equivalent to the `--verify-signatures` command
|
||||
merge.verifySignatures::
|
||||
If true, this is equivalent to the --verify-signatures command
|
||||
line option. See linkgit:git-merge[1] for details.
|
||||
|
||||
include::fmt-merge-msg.adoc[]
|
||||
|
||||
`merge.renameLimit`::
|
||||
merge.renameLimit::
|
||||
The number of files to consider in the exhaustive portion of
|
||||
rename detection during a merge. If not specified, defaults
|
||||
to the value of `diff.renameLimit`. If neither
|
||||
`merge.renameLimit` nor `diff.renameLimit` are specified,
|
||||
to the value of diff.renameLimit. If neither
|
||||
merge.renameLimit nor diff.renameLimit are specified,
|
||||
currently defaults to 7000. This setting has no effect if
|
||||
rename detection is turned off.
|
||||
|
||||
`merge.renames`::
|
||||
Whether Git detects renames. If set to `false`, rename detection
|
||||
is disabled. If set to `true`, basic rename detection is enabled.
|
||||
merge.renames::
|
||||
Whether Git detects renames. If set to "false", rename detection
|
||||
is disabled. If set to "true", basic rename detection is enabled.
|
||||
Defaults to the value of diff.renames.
|
||||
|
||||
`merge.directoryRenames`::
|
||||
merge.directoryRenames::
|
||||
Whether Git detects directory renames, affecting what happens at
|
||||
merge time to new files added to a directory on one side of
|
||||
history when that directory was renamed on the other side of
|
||||
history. Possible values are:
|
||||
+
|
||||
--
|
||||
`false`;; Directory rename detection is disabled, meaning that such new files will be
|
||||
left behind in the old directory.
|
||||
`true`;; Directory rename detection is enabled, meaning that such new files will be
|
||||
moved into the new directory.
|
||||
`conflict`;; A conflict will be reported for such paths.
|
||||
--
|
||||
+
|
||||
If `merge.renames` is `false`, `merge.directoryRenames` is ignored and treated
|
||||
as `false`. Defaults to `conflict`.
|
||||
history. If merge.directoryRenames is set to "false", directory
|
||||
rename detection is disabled, meaning that such new files will be
|
||||
left behind in the old directory. If set to "true", directory
|
||||
rename detection is enabled, meaning that such new files will be
|
||||
moved into the new directory. If set to "conflict", a conflict
|
||||
will be reported for such paths. If merge.renames is false,
|
||||
merge.directoryRenames is ignored and treated as false. Defaults
|
||||
to "conflict".
|
||||
|
||||
`merge.renormalize`::
|
||||
merge.renormalize::
|
||||
Tell Git that canonical representation of files in the
|
||||
repository has changed over time (e.g. earlier commits record
|
||||
text files with _CRLF_ line endings, but recent ones use _LF_ line
|
||||
text files with CRLF line endings, but recent ones use LF line
|
||||
endings). In such a repository, for each file where a
|
||||
three-way content merge is needed, Git can convert the data
|
||||
recorded in commits to a canonical form before performing a
|
||||
|
@ -80,45 +76,35 @@ as `false`. Defaults to `conflict`.
|
|||
see section "Merging branches with differing checkin/checkout
|
||||
attributes" in linkgit:gitattributes[5].
|
||||
|
||||
`merge.stat`::
|
||||
What, if anything, to print between `ORIG_HEAD` and the merge result
|
||||
at the end of the merge. Possible values are:
|
||||
+
|
||||
--
|
||||
`false`;; Show nothing.
|
||||
`true`;; Show `git diff --diffstat --summary ORIG_HEAD`.
|
||||
`compact`;; Show `git diff --compact-summary ORIG_HEAD`.
|
||||
--
|
||||
+
|
||||
but any unrecognised value (e.g., a value added by a future version of
|
||||
Git) is taken as `true` instead of triggering an error. Defaults to
|
||||
`true`.
|
||||
merge.stat::
|
||||
Whether to print the diffstat between ORIG_HEAD and the merge result
|
||||
at the end of the merge. True by default.
|
||||
|
||||
`merge.autoStash`::
|
||||
When set to `true`, automatically create a temporary stash entry
|
||||
merge.autoStash::
|
||||
When set to true, automatically create a temporary stash entry
|
||||
before the operation begins, and apply it after the operation
|
||||
ends. This means that you can run merge on a dirty worktree.
|
||||
However, use with care: the final stash application after a
|
||||
successful merge might result in non-trivial conflicts.
|
||||
This option can be overridden by the `--no-autostash` and
|
||||
`--autostash` options of linkgit:git-merge[1].
|
||||
Defaults to `false`.
|
||||
Defaults to false.
|
||||
|
||||
`merge.tool`::
|
||||
merge.tool::
|
||||
Controls which merge tool is used by linkgit:git-mergetool[1].
|
||||
The list below shows the valid built-in values.
|
||||
Any other value is treated as a custom merge tool and requires
|
||||
that a corresponding `mergetool.<tool>.cmd` variable is defined.
|
||||
that a corresponding mergetool.<tool>.cmd variable is defined.
|
||||
|
||||
`merge.guitool`::
|
||||
merge.guitool::
|
||||
Controls which merge tool is used by linkgit:git-mergetool[1] when the
|
||||
`-g`/`--gui` flag is specified. The list below shows the valid built-in values.
|
||||
-g/--gui flag is specified. The list below shows the valid built-in values.
|
||||
Any other value is treated as a custom merge tool and requires that a
|
||||
corresponding `mergetool.<guitool>.cmd` variable is defined.
|
||||
corresponding mergetool.<guitool>.cmd variable is defined.
|
||||
|
||||
include::{build_dir}/mergetools-merge.adoc[]
|
||||
|
||||
`merge.verbosity`::
|
||||
merge.verbosity::
|
||||
Controls the amount of output shown by the recursive merge
|
||||
strategy. Level 0 outputs nothing except a final error
|
||||
message if conflicts were detected. Level 1 outputs only
|
||||
|
@ -126,15 +112,15 @@ include::{build_dir}/mergetools-merge.adoc[]
|
|||
above outputs debugging information. The default is level 2.
|
||||
Can be overridden by the `GIT_MERGE_VERBOSITY` environment variable.
|
||||
|
||||
`merge.<driver>.name`::
|
||||
merge.<driver>.name::
|
||||
Defines a human-readable name for a custom low-level
|
||||
merge driver. See linkgit:gitattributes[5] for details.
|
||||
|
||||
`merge.<driver>.driver`::
|
||||
merge.<driver>.driver::
|
||||
Defines the command that implements a custom low-level
|
||||
merge driver. See linkgit:gitattributes[5] for details.
|
||||
|
||||
`merge.<driver>.recursive`::
|
||||
merge.<driver>.recursive::
|
||||
Names a low-level merge driver to be used when
|
||||
performing an internal merge between common ancestors.
|
||||
See linkgit:gitattributes[5] for details.
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
`mergetool.<tool>.path`::
|
||||
mergetool.<tool>.path::
|
||||
Override the path for the given tool. This is useful in case
|
||||
your tool is not in the `$PATH`.
|
||||
your tool is not in the PATH.
|
||||
|
||||
`mergetool.<tool>.cmd`::
|
||||
mergetool.<tool>.cmd::
|
||||
Specify the command to invoke the specified merge tool. The
|
||||
specified command is evaluated in shell with the following
|
||||
variables available: `BASE` is the name of a temporary file
|
||||
variables available: 'BASE' is the name of a temporary file
|
||||
containing the common base of the files to be merged, if available;
|
||||
`LOCAL` is the name of a temporary file containing the contents of
|
||||
the file on the current branch; `REMOTE` is the name of a temporary
|
||||
'LOCAL' is the name of a temporary file containing the contents of
|
||||
the file on the current branch; 'REMOTE' is the name of a temporary
|
||||
file containing the contents of the file from the branch being
|
||||
merged; `MERGED` contains the name of the file to which the merge
|
||||
merged; 'MERGED' contains the name of the file to which the merge
|
||||
tool should write the results of a successful merge.
|
||||
|
||||
`mergetool.<tool>.hideResolved`::
|
||||
mergetool.<tool>.hideResolved::
|
||||
Allows the user to override the global `mergetool.hideResolved` value
|
||||
for a specific tool. See `mergetool.hideResolved` for the full
|
||||
description.
|
||||
|
||||
`mergetool.<tool>.trustExitCode`::
|
||||
mergetool.<tool>.trustExitCode::
|
||||
For a custom merge command, specify whether the exit code of
|
||||
the merge command can be used to determine whether the merge was
|
||||
successful. If this is not set to true then the merge target file
|
||||
|
@ -26,7 +26,7 @@
|
|||
if the file has been updated; otherwise, the user is prompted to
|
||||
indicate the success of the merge.
|
||||
|
||||
`mergetool.meld.hasOutput`::
|
||||
mergetool.meld.hasOutput::
|
||||
Older versions of `meld` do not support the `--output` option.
|
||||
Git will attempt to detect whether `meld` supports `--output`
|
||||
by inspecting the output of `meld --help`. Configuring
|
||||
|
@ -35,7 +35,7 @@
|
|||
to `true` tells Git to unconditionally use the `--output` option,
|
||||
and `false` avoids using `--output`.
|
||||
|
||||
`mergetool.meld.useAutoMerge`::
|
||||
mergetool.meld.useAutoMerge::
|
||||
When the `--auto-merge` is given, meld will merge all non-conflicting
|
||||
parts automatically, highlight the conflicting parts, and wait for
|
||||
user decision. Setting `mergetool.meld.useAutoMerge` to `true` tells
|
||||
|
@ -45,15 +45,15 @@
|
|||
value of `false` avoids using `--auto-merge` altogether, and is the
|
||||
default value.
|
||||
|
||||
`mergetool.<variant>.layout`::
|
||||
Configure the split window layout for vimdiff's _<variant>_, which is any of `vimdiff`,
|
||||
mergetool.<vimdiff variant>.layout::
|
||||
Configure the split window layout for vimdiff's `<variant>`, which is any of `vimdiff`,
|
||||
`nvimdiff`, `gvimdiff`.
|
||||
Upon launching `git mergetool` with `--tool=<variant>` (or without `--tool`
|
||||
if `merge.tool` is configured as _<variant>_), Git will consult
|
||||
if `merge.tool` is configured as `<variant>`), Git will consult
|
||||
`mergetool.<variant>.layout` to determine the tool's layout. If the
|
||||
variant-specific configuration is not available, `vimdiff` ' s is used as
|
||||
variant-specific configuration is not available, `vimdiff`'s is used as
|
||||
fallback. If that too is not available, a default layout with 4 windows
|
||||
will be used. To configure the layout, see the 'BACKEND SPECIFIC HINTS'
|
||||
will be used. To configure the layout, see the `BACKEND SPECIFIC HINTS`
|
||||
ifdef::git-mergetool[]
|
||||
section.
|
||||
endif::[]
|
||||
|
@ -61,39 +61,39 @@ ifndef::git-mergetool[]
|
|||
section in linkgit:git-mergetool[1].
|
||||
endif::[]
|
||||
|
||||
`mergetool.hideResolved`::
|
||||
mergetool.hideResolved::
|
||||
During a merge, Git will automatically resolve as many conflicts as
|
||||
possible and write the `$MERGED` file containing conflict markers around
|
||||
any conflicts that it cannot resolve; `$LOCAL` and `$REMOTE` normally
|
||||
are the versions of the file from before Git`s conflict
|
||||
resolution. This flag causes `$LOCAL` and `$REMOTE` to be overwritten so
|
||||
possible and write the 'MERGED' file containing conflict markers around
|
||||
any conflicts that it cannot resolve; 'LOCAL' and 'REMOTE' normally
|
||||
represent the versions of the file from before Git's conflict
|
||||
resolution. This flag causes 'LOCAL' and 'REMOTE' to be overwritten so
|
||||
that only the unresolved conflicts are presented to the merge tool. Can
|
||||
be configured per-tool via the `mergetool.<tool>.hideResolved`
|
||||
configuration variable. Defaults to `false`.
|
||||
|
||||
`mergetool.keepBackup`::
|
||||
mergetool.keepBackup::
|
||||
After performing a merge, the original file with conflict markers
|
||||
can be saved as a file with a `.orig` extension. If this variable
|
||||
is set to `false` then this file is not preserved. Defaults to
|
||||
`true` (i.e. keep the backup files).
|
||||
|
||||
`mergetool.keepTemporaries`::
|
||||
mergetool.keepTemporaries::
|
||||
When invoking a custom merge tool, Git uses a set of temporary
|
||||
files to pass to the tool. If the tool returns an error and this
|
||||
variable is set to `true`, then these temporary files will be
|
||||
preserved; otherwise, they will be removed after the tool has
|
||||
exited. Defaults to `false`.
|
||||
|
||||
`mergetool.writeToTemp`::
|
||||
Git writes temporary `BASE`, `LOCAL`, and `REMOTE` versions of
|
||||
mergetool.writeToTemp::
|
||||
Git writes temporary 'BASE', 'LOCAL', and 'REMOTE' versions of
|
||||
conflicting files in the worktree by default. Git will attempt
|
||||
to use a temporary directory for these files when set `true`.
|
||||
Defaults to `false`.
|
||||
|
||||
`mergetool.prompt`::
|
||||
mergetool.prompt::
|
||||
Prompt before each invocation of the merge resolution program.
|
||||
|
||||
`mergetool.guiDefault`::
|
||||
mergetool.guiDefault::
|
||||
Set `true` to use the `merge.guitool` by default (equivalent to
|
||||
specifying the `--gui` argument), or `auto` to select `merge.guitool`
|
||||
or `merge.tool` depending on the presence of a `DISPLAY` environment
|
||||
|
|
|
@ -155,10 +155,6 @@ pack.useSparse::
|
|||
commits contain certain types of direct renames. Default is
|
||||
`true`.
|
||||
|
||||
pack.usePathWalk::
|
||||
Enable the `--path-walk` option by default for `git pack-objects`
|
||||
processes. See linkgit:git-pack-objects[1] for full details.
|
||||
|
||||
pack.preferBitmapTips::
|
||||
When selecting which commits will receive bitmaps, prefer a
|
||||
commit at the tip of any reference that is a suffix of any value
|
||||
|
|
|
@ -39,10 +39,3 @@ repack.cruftThreads::
|
|||
a cruft pack and the respective parameters are not given over
|
||||
the command line. See similarly named `pack.*` configuration
|
||||
variables for defaults and meaning.
|
||||
|
||||
repack.midxMustContainCruft::
|
||||
When set to true, linkgit:git-repack[1] will unconditionally include
|
||||
cruft pack(s), if any, in the multi-pack index when invoked with
|
||||
`--write-midx`. When false, cruft packs are only included in the MIDX
|
||||
when necessary (e.g., because they might be required to form a
|
||||
reachability closure with MIDX bitmaps). Defaults to true.
|
||||
|
|
|
@ -1,38 +1,38 @@
|
|||
sendemail.identity::
|
||||
A configuration identity. When given, causes values in the
|
||||
`sendemail.<identity>` subsection to take precedence over
|
||||
values in the `sendemail` section. The default identity is
|
||||
'sendemail.<identity>' subsection to take precedence over
|
||||
values in the 'sendemail' section. The default identity is
|
||||
the value of `sendemail.identity`.
|
||||
|
||||
sendemail.smtpEncryption::
|
||||
See linkgit:git-send-email[1] for description. Note that this
|
||||
setting is not subject to the `identity` mechanism.
|
||||
setting is not subject to the 'identity' mechanism.
|
||||
|
||||
sendemail.smtpSSLCertPath::
|
||||
Path to ca-certificates (either a directory or a single file).
|
||||
Set it to an empty string to disable certificate verification.
|
||||
|
||||
sendemail.<identity>.*::
|
||||
Identity-specific versions of the `sendemail.*` parameters
|
||||
Identity-specific versions of the 'sendemail.*' parameters
|
||||
found below, taking precedence over those when this
|
||||
identity is selected, through either the command-line or
|
||||
`sendemail.identity`.
|
||||
|
||||
sendemail.multiEdit::
|
||||
If `true` (default), a single editor instance will be spawned to edit
|
||||
If true (default), a single editor instance will be spawned to edit
|
||||
files you have to edit (patches when `--annotate` is used, and the
|
||||
summary when `--compose` is used). If `false`, files will be edited one
|
||||
summary when `--compose` is used). If false, files will be edited one
|
||||
after the other, spawning a new editor each time.
|
||||
|
||||
sendemail.confirm::
|
||||
Sets the default for whether to confirm before sending. Must be
|
||||
one of `always`, `never`, `cc`, `compose`, or `auto`. See `--confirm`
|
||||
one of 'always', 'never', 'cc', 'compose', or 'auto'. See `--confirm`
|
||||
in the linkgit:git-send-email[1] documentation for the meaning of these
|
||||
values.
|
||||
|
||||
sendemail.mailmap::
|
||||
If `true`, makes linkgit:git-send-email[1] assume `--mailmap`,
|
||||
otherwise assume `--no-mailmap`. `False` by default.
|
||||
If true, makes linkgit:git-send-email[1] assume `--mailmap`,
|
||||
otherwise assume `--no-mailmap`. False by default.
|
||||
|
||||
sendemail.mailmap.file::
|
||||
The location of a linkgit:git-send-email[1] specific augmenting
|
||||
|
@ -51,7 +51,7 @@ sendemail.aliasesFile::
|
|||
|
||||
sendemail.aliasFileType::
|
||||
Format of the file(s) specified in sendemail.aliasesFile. Must be
|
||||
one of `mutt`, `mailrc`, `pine`, `elm`, `gnus`, or `sendmail`.
|
||||
one of 'mutt', 'mailrc', 'pine', 'elm', 'gnus', or 'sendmail'.
|
||||
+
|
||||
What an alias file in each format looks like can be found in
|
||||
the documentation of the email program of the same name. The
|
||||
|
@ -96,17 +96,12 @@ sendemail.xmailer::
|
|||
linkgit:git-send-email[1] command-line options. See its
|
||||
documentation for details.
|
||||
|
||||
sendemail.outlookidfix::
|
||||
If `true`, makes linkgit:git-send-email[1] assume `--outlook-id-fix`,
|
||||
and if `false` assume `--no-outlook-id-fix`. If not specified, it will
|
||||
behave the same way as if `--outlook-id-fix` is not specified.
|
||||
|
||||
sendemail.signedOffCc (deprecated)::
|
||||
Deprecated alias for `sendemail.signedOffByCc`.
|
||||
|
||||
sendemail.smtpBatchSize::
|
||||
Number of messages to be sent per connection, after that a relogin
|
||||
will happen. If the value is `0` or undefined, send all messages in
|
||||
will happen. If the value is 0 or undefined, send all messages in
|
||||
one connection.
|
||||
See also the `--batch-size` option of linkgit:git-send-email[1].
|
||||
|
||||
|
@ -116,5 +111,5 @@ sendemail.smtpReloginDelay::
|
|||
|
||||
sendemail.forbidSendmailVariables::
|
||||
To avoid common misconfiguration mistakes, linkgit:git-send-email[1]
|
||||
will abort with a warning if any configuration options for `sendmail`
|
||||
will abort with a warning if any configuration options for "sendmail"
|
||||
exist. Set this variable to bypass the check.
|
||||
|
|
|
@ -138,7 +138,7 @@ or like this (when the `--cc` option is used):
|
|||
+
|
||||
[synopsis]
|
||||
index <hash>,<hash>..<hash>
|
||||
mode <mode>,<mode>..<mode>
|
||||
mode <mode>,<mode>`..`<mode>
|
||||
new file mode <mode>
|
||||
deleted file mode <mode>,<mode>
|
||||
+
|
||||
|
|
|
@ -37,32 +37,32 @@ endif::git-diff[]
|
|||
endif::git-format-patch[]
|
||||
|
||||
ifdef::git-log[]
|
||||
`-m`::
|
||||
-m::
|
||||
Show diffs for merge commits in the default format. This is
|
||||
similar to `--diff-merges=on`, except `-m` will
|
||||
produce no output unless `-p` is given as well.
|
||||
|
||||
`-c`::
|
||||
-c::
|
||||
Produce combined diff output for merge commits.
|
||||
Shortcut for `--diff-merges=combined -p`.
|
||||
|
||||
`--cc`::
|
||||
--cc::
|
||||
Produce dense combined diff output for merge commits.
|
||||
Shortcut for `--diff-merges=dense-combined -p`.
|
||||
|
||||
`--dd`::
|
||||
--dd::
|
||||
Produce diff with respect to first parent for both merge and
|
||||
regular commits.
|
||||
Shortcut for `--diff-merges=first-parent -p`.
|
||||
|
||||
`--remerge-diff`::
|
||||
--remerge-diff::
|
||||
Produce remerge-diff output for merge commits.
|
||||
Shortcut for `--diff-merges=remerge -p`.
|
||||
|
||||
`--no-diff-merges`::
|
||||
--no-diff-merges::
|
||||
Synonym for `--diff-merges=off`.
|
||||
|
||||
`--diff-merges=<format>`::
|
||||
--diff-merges=<format>::
|
||||
Specify diff format to be used for merge commits. Default is
|
||||
{diff-merges-default} unless `--first-parent` is in use, in
|
||||
which case `first-parent` is the default.
|
||||
|
@ -70,54 +70,48 @@ ifdef::git-log[]
|
|||
The following formats are supported:
|
||||
+
|
||||
--
|
||||
`off`::
|
||||
`none`::
|
||||
off, none::
|
||||
Disable output of diffs for merge commits. Useful to override
|
||||
implied value.
|
||||
|
||||
`on`::
|
||||
`m`::
|
||||
on, m::
|
||||
Make diff output for merge commits to be shown in the default
|
||||
format. The default format can be changed using
|
||||
`log.diffMerges` configuration variable, whose default value
|
||||
is `separate`.
|
||||
|
||||
`first-parent`::
|
||||
`1`::
|
||||
first-parent, 1::
|
||||
Show full diff with respect to first parent. This is the same
|
||||
format as `--patch` produces for non-merge commits.
|
||||
|
||||
`separate`::
|
||||
separate::
|
||||
Show full diff with respect to each of parents.
|
||||
Separate log entry and diff is generated for each parent.
|
||||
|
||||
`combined`::
|
||||
`c`::
|
||||
combined, c::
|
||||
Show differences from each of the parents to the merge
|
||||
result simultaneously instead of showing pairwise diff between
|
||||
a parent and the result one at a time. Furthermore, it lists
|
||||
only files which were modified from all parents.
|
||||
|
||||
`dense-combined`::
|
||||
`cc`::
|
||||
dense-combined, cc::
|
||||
Further compress output produced by `--diff-merges=combined`
|
||||
by omitting uninteresting hunks whose contents in the parents
|
||||
have only two variants and the merge result picks one of them
|
||||
without modification.
|
||||
|
||||
`remerge`::
|
||||
`r`:: Remerge two-parent merge commits to create a temporary tree
|
||||
remerge, r::
|
||||
Remerge two-parent merge commits to create a temporary tree
|
||||
object--potentially containing files with conflict markers
|
||||
and such. A diff is then shown between that temporary tree
|
||||
and the actual merge commit.
|
||||
--
|
||||
+
|
||||
The output emitted when this option is used is subject to change, and
|
||||
so is its interaction with other options (unless explicitly
|
||||
documented).
|
||||
--
|
||||
|
||||
|
||||
`--combined-all-paths`::
|
||||
--combined-all-paths::
|
||||
Cause combined diffs (used for merge commits) to
|
||||
list the name of the file from all parents. It thus only has
|
||||
effect when `--diff-merges=[dense-]combined` is in use, and
|
||||
|
|
|
@ -75,14 +75,13 @@ OPTIONS
|
|||
tree. If `--check` is in effect, merely check that it would
|
||||
apply cleanly to the index entry.
|
||||
|
||||
-N::
|
||||
--intent-to-add::
|
||||
When applying the patch only to the working tree, mark new
|
||||
files to be added to the index later (see `--intent-to-add`
|
||||
option in linkgit:git-add[1]). This option is ignored if
|
||||
`--index` or `--cached` are used, and has no effect outside a Git
|
||||
repository. Note that `--index` could be implied by other options
|
||||
such as `--3way`.
|
||||
option in linkgit:git-add[1]). This option is ignored unless
|
||||
running in a Git repository and `--index` is not specified.
|
||||
Note that `--index` could be implied by other options such
|
||||
as `--cached` or `--3way`.
|
||||
|
||||
-3::
|
||||
--3way::
|
||||
|
|
|
@ -307,11 +307,6 @@ newline. The available atoms are:
|
|||
`objecttype`::
|
||||
The type of the object (the same as `cat-file -t` reports).
|
||||
|
||||
`objectmode`::
|
||||
If the specified object has mode information (such as a tree or
|
||||
index entry), the mode expressed as an octal integer. Otherwise,
|
||||
empty string.
|
||||
|
||||
`objectsize`::
|
||||
The size, in bytes, of the object (the same as `cat-file -s`
|
||||
reports).
|
||||
|
@ -373,14 +368,6 @@ If a name is specified that might refer to more than one object (an ambiguous sh
|
|||
<object> SP ambiguous LF
|
||||
------------
|
||||
|
||||
If a name is specified that refers to a submodule entry in a tree and the
|
||||
target object does not exist in the repository, then `cat-file` will ignore
|
||||
any custom format and print (with the object ID of the submodule):
|
||||
|
||||
------------
|
||||
<oid> SP submodule LF
|
||||
------------
|
||||
|
||||
If `--follow-symlinks` is used, and a symlink in the repository points
|
||||
outside the repository, then `cat-file` will ignore any custom format
|
||||
and print:
|
||||
|
|
|
@ -7,54 +7,54 @@ git-checkout - Switch branches or restore working tree files
|
|||
|
||||
SYNOPSIS
|
||||
--------
|
||||
[synopsis]
|
||||
git checkout [-q] [-f] [-m] [<branch>]
|
||||
git checkout [-q] [-f] [-m] --detach [<branch>]
|
||||
git checkout [-q] [-f] [-m] [--detach] <commit>
|
||||
git checkout [-q] [-f] [-m] [[-b|-B|--orphan] <new-branch>] [<start-point>]
|
||||
git checkout [-f] <tree-ish> [--] <pathspec>...
|
||||
git checkout [-f] <tree-ish> --pathspec-from-file=<file> [--pathspec-file-nul]
|
||||
git checkout [-f|--ours|--theirs|-m|--conflict=<style>] [--] <pathspec>...
|
||||
git checkout [-f|--ours|--theirs|-m|--conflict=<style>] --pathspec-from-file=<file> [--pathspec-file-nul]
|
||||
git checkout (-p|--patch) [<tree-ish>] [--] [<pathspec>...]
|
||||
[verse]
|
||||
'git checkout' [-q] [-f] [-m] [<branch>]
|
||||
'git checkout' [-q] [-f] [-m] --detach [<branch>]
|
||||
'git checkout' [-q] [-f] [-m] [--detach] <commit>
|
||||
'git checkout' [-q] [-f] [-m] [[-b|-B|--orphan] <new-branch>] [<start-point>]
|
||||
'git checkout' [-f] <tree-ish> [--] <pathspec>...
|
||||
'git checkout' [-f] <tree-ish> --pathspec-from-file=<file> [--pathspec-file-nul]
|
||||
'git checkout' [-f|--ours|--theirs|-m|--conflict=<style>] [--] <pathspec>...
|
||||
'git checkout' [-f|--ours|--theirs|-m|--conflict=<style>] --pathspec-from-file=<file> [--pathspec-file-nul]
|
||||
'git checkout' (-p|--patch) [<tree-ish>] [--] [<pathspec>...]
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
Updates files in the working tree to match the version in the index
|
||||
or the specified tree. If no pathspec was given, `git checkout` will
|
||||
or the specified tree. If no pathspec was given, 'git checkout' will
|
||||
also update `HEAD` to set the specified branch as the current
|
||||
branch.
|
||||
|
||||
`git checkout [<branch>]`::
|
||||
To prepare for working on _<branch>_, switch to it by updating
|
||||
'git checkout' [<branch>]::
|
||||
To prepare for working on `<branch>`, switch to it by updating
|
||||
the index and the files in the working tree, and by pointing
|
||||
`HEAD` at the branch. Local modifications to the files in the
|
||||
working tree are kept, so that they can be committed to the
|
||||
_<branch>_.
|
||||
`<branch>`.
|
||||
+
|
||||
If _<branch>_ is not found but there does exist a tracking branch in
|
||||
exactly one remote (call it _<remote>_) with a matching name and
|
||||
If `<branch>` is not found but there does exist a tracking branch in
|
||||
exactly one remote (call it `<remote>`) with a matching name and
|
||||
`--no-guess` is not specified, treat as equivalent to
|
||||
+
|
||||
------------
|
||||
$ git checkout -b <branch> --track <remote>/<branch>
|
||||
------------
|
||||
+
|
||||
You could omit _<branch>_, in which case the command degenerates to
|
||||
You could omit `<branch>`, in which case the command degenerates to
|
||||
"check out the current branch", which is a glorified no-op with
|
||||
rather expensive side-effects to show only the tracking information,
|
||||
if it exists, for the current branch.
|
||||
|
||||
`git checkout (-b|-B) <new-branch> [<start-point>]`::
|
||||
'git checkout' -b|-B <new-branch> [<start-point>]::
|
||||
|
||||
Specifying `-b` causes a new branch to be created as if
|
||||
linkgit:git-branch[1] were called and then checked out. In
|
||||
this case you can use the `--track` or `--no-track` options,
|
||||
which will be passed to `git branch`. As a convenience,
|
||||
which will be passed to 'git branch'. As a convenience,
|
||||
`--track` without `-b` implies branch creation; see the
|
||||
description of `--track` below.
|
||||
+
|
||||
If `-B` is given, _<new-branch>_ is created if it doesn't exist; otherwise, it
|
||||
If `-B` is given, `<new-branch>` is created if it doesn't exist; otherwise, it
|
||||
is reset. This is the transactional equivalent of
|
||||
+
|
||||
------------
|
||||
|
@ -67,30 +67,30 @@ successful (e.g., when the branch is in use in another worktree, not
|
|||
just the current branch stays the same, but the branch is not reset to
|
||||
the start-point, either).
|
||||
|
||||
`git checkout --detach [<branch>]`::
|
||||
`git checkout [--detach] <commit>`::
|
||||
'git checkout' --detach [<branch>]::
|
||||
'git checkout' [--detach] <commit>::
|
||||
|
||||
Prepare to work on top of _<commit>_, by detaching `HEAD` at it
|
||||
Prepare to work on top of `<commit>`, by detaching `HEAD` at it
|
||||
(see "DETACHED HEAD" section), and updating the index and the
|
||||
files in the working tree. Local modifications to the files
|
||||
in the working tree are kept, so that the resulting working
|
||||
tree will be the state recorded in the commit plus the local
|
||||
modifications.
|
||||
+
|
||||
When the _<commit>_ argument is a branch name, the `--detach` option can
|
||||
When the `<commit>` argument is a branch name, the `--detach` option can
|
||||
be used to detach `HEAD` at the tip of the branch (`git checkout
|
||||
<branch>` would check out that branch without detaching `HEAD`).
|
||||
+
|
||||
Omitting _<branch>_ detaches `HEAD` at the tip of the current branch.
|
||||
Omitting `<branch>` detaches `HEAD` at the tip of the current branch.
|
||||
|
||||
`git checkout [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <pathspec>...`::
|
||||
`git checkout [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] --pathspec-from-file=<file> [--pathspec-file-nul]`::
|
||||
'git checkout' [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <pathspec>...::
|
||||
'git checkout' [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] --pathspec-from-file=<file> [--pathspec-file-nul]::
|
||||
|
||||
Overwrite the contents of the files that match the pathspec.
|
||||
When the _<tree-ish>_ (most often a commit) is not given,
|
||||
When the `<tree-ish>` (most often a commit) is not given,
|
||||
overwrite working tree with the contents in the index.
|
||||
When the _<tree-ish>_ is given, overwrite both the index and
|
||||
the working tree with the contents at the _<tree-ish>_.
|
||||
When the `<tree-ish>` is given, overwrite both the index and
|
||||
the working tree with the contents at the `<tree-ish>`.
|
||||
+
|
||||
The index may contain unmerged entries because of a previous failed merge.
|
||||
By default, if you try to check out such an entry from the index, the
|
||||
|
@ -100,7 +100,7 @@ specific side of the merge can be checked out of the index by
|
|||
using `--ours` or `--theirs`. With `-m`, changes made to the working tree
|
||||
file can be discarded to re-create the original conflicted merge result.
|
||||
|
||||
`git checkout (-p|--patch) [<tree-ish>] [--] [<pathspec>...]`::
|
||||
'git checkout' (-p|--patch) [<tree-ish>] [--] [<pathspec>...]::
|
||||
This is similar to the previous mode, but lets you use the
|
||||
interactive interface to show the "diff" output and choose which
|
||||
hunks to use in the result. See below for the description of
|
||||
|
@ -108,19 +108,19 @@ file can be discarded to re-create the original conflicted merge result.
|
|||
|
||||
OPTIONS
|
||||
-------
|
||||
`-q`::
|
||||
`--quiet`::
|
||||
-q::
|
||||
--quiet::
|
||||
Quiet, suppress feedback messages.
|
||||
|
||||
`--progress`::
|
||||
`--no-progress`::
|
||||
--progress::
|
||||
--no-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 enables progress reporting even if not
|
||||
attached to a terminal, regardless of `--quiet`.
|
||||
|
||||
`-f`::
|
||||
`--force`::
|
||||
-f::
|
||||
--force::
|
||||
When switching branches, proceed even if the index or the
|
||||
working tree differs from `HEAD`, and even if there are untracked
|
||||
files in the way. This is used to throw away local changes and
|
||||
|
@ -129,13 +129,13 @@ OPTIONS
|
|||
When checking out paths from the index, do not fail upon unmerged
|
||||
entries; instead, unmerged entries are ignored.
|
||||
|
||||
`--ours`::
|
||||
`--theirs`::
|
||||
--ours::
|
||||
--theirs::
|
||||
When checking out paths from the index, check out stage #2
|
||||
(`ours`) or #3 (`theirs`) for unmerged paths.
|
||||
('ours') or #3 ('theirs') for unmerged paths.
|
||||
+
|
||||
Note that during `git rebase` and `git pull --rebase`, `ours` and
|
||||
`theirs` may appear swapped; `--ours` gives the version from the
|
||||
Note that during `git rebase` and `git pull --rebase`, 'ours' and
|
||||
'theirs' may appear swapped; `--ours` gives the version from the
|
||||
branch the changes are rebased onto, while `--theirs` gives the
|
||||
version from the branch that holds your work that is being rebased.
|
||||
+
|
||||
|
@ -149,22 +149,22 @@ as `ours` (i.e. "our shared canonical history"), while what you did
|
|||
on your side branch as `theirs` (i.e. "one contributor's work on top
|
||||
of it").
|
||||
|
||||
`-b <new-branch>`::
|
||||
Create a new branch named _<new-branch>_, start it at
|
||||
_<start-point>_, and check the resulting branch out;
|
||||
-b <new-branch>::
|
||||
Create a new branch named `<new-branch>`, start it at
|
||||
`<start-point>`, and check the resulting branch out;
|
||||
see linkgit:git-branch[1] for details.
|
||||
|
||||
`-B <new-branch>`::
|
||||
Creates the branch _<new-branch>_, start it at _<start-point>_;
|
||||
if it already exists, then reset it to _<start-point>_. And then
|
||||
-B <new-branch>::
|
||||
Creates the branch `<new-branch>`, start it at `<start-point>`;
|
||||
if it already exists, then reset it to `<start-point>`. And then
|
||||
check the resulting branch out. This is equivalent to running
|
||||
`git branch` with `-f` followed by `git checkout` of that branch;
|
||||
"git branch" with "-f" followed by "git checkout" of that branch;
|
||||
see linkgit:git-branch[1] for details.
|
||||
|
||||
`-t`::
|
||||
`--track[=(direct|inherit)]`::
|
||||
-t::
|
||||
--track[=(direct|inherit)]::
|
||||
When creating a new branch, set up "upstream" configuration. See
|
||||
`--track` in linkgit:git-branch[1] for details.
|
||||
"--track" in linkgit:git-branch[1] for details.
|
||||
+
|
||||
If no `-b` option is given, the name of the new branch will be
|
||||
derived from the remote-tracking branch, by looking at the local part of
|
||||
|
@ -176,14 +176,14 @@ off of `origin/hack` (or `remotes/origin/hack`, or even
|
|||
guessing results in an empty name, the guessing is aborted. You can
|
||||
explicitly give a name with `-b` in such a case.
|
||||
|
||||
`--no-track`::
|
||||
--no-track::
|
||||
Do not set up "upstream" configuration, even if the
|
||||
`branch.autoSetupMerge` configuration variable is true.
|
||||
|
||||
`--guess`::
|
||||
`--no-guess`::
|
||||
If _<branch>_ is not found but there does exist a tracking
|
||||
branch in exactly one remote (call it _<remote>_) with a
|
||||
--guess::
|
||||
--no-guess::
|
||||
If `<branch>` is not found but there does exist a tracking
|
||||
branch in exactly one remote (call it `<remote>`) with a
|
||||
matching name, treat as equivalent to
|
||||
+
|
||||
------------
|
||||
|
@ -192,10 +192,10 @@ $ git checkout -b <branch> --track <remote>/<branch>
|
|||
+
|
||||
If the branch exists in multiple remotes and one of them is named by
|
||||
the `checkout.defaultRemote` configuration variable, we'll use that
|
||||
one for the purposes of disambiguation, even if the _<branch>_ isn't
|
||||
one for the purposes of disambiguation, even if the `<branch>` isn't
|
||||
unique across all remotes. Set it to
|
||||
e.g. `checkout.defaultRemote=origin` to always checkout remote
|
||||
branches from there if _<branch>_ is ambiguous but exists on the
|
||||
branches from there if `<branch>` is ambiguous but exists on the
|
||||
'origin' remote. See also `checkout.defaultRemote` in
|
||||
linkgit:git-config[1].
|
||||
+
|
||||
|
@ -204,28 +204,28 @@ linkgit:git-config[1].
|
|||
The default behavior can be set via the `checkout.guess` configuration
|
||||
variable.
|
||||
|
||||
`-l`::
|
||||
-l::
|
||||
Create the new branch's reflog; see linkgit:git-branch[1] for
|
||||
details.
|
||||
|
||||
`-d`::
|
||||
`--detach`::
|
||||
-d::
|
||||
--detach::
|
||||
Rather than checking out a branch to work on it, check out a
|
||||
commit for inspection and discardable experiments.
|
||||
This is the default behavior of `git checkout <commit>` when
|
||||
_<commit>_ is not a branch name. See the "DETACHED HEAD" section
|
||||
`<commit>` is not a branch name. See the "DETACHED HEAD" section
|
||||
below for details.
|
||||
|
||||
`--orphan <new-branch>`::
|
||||
Create a new unborn branch, named _<new-branch>_, started from
|
||||
_<start-point>_ and switch to it. The first commit made on this
|
||||
--orphan <new-branch>::
|
||||
Create a new unborn branch, named `<new-branch>`, started from
|
||||
`<start-point>` and switch to it. The first commit made on this
|
||||
new branch will have no parents and it will be the root of a new
|
||||
history totally disconnected from all the other branches and
|
||||
commits.
|
||||
+
|
||||
The index and the working tree are adjusted as if you had previously run
|
||||
`git checkout <start-point>`. This allows you to start a new history
|
||||
that records a set of paths similar to _<start-point>_ by easily running
|
||||
that records a set of paths similar to `<start-point>` by easily running
|
||||
`git commit -a` to make the root commit.
|
||||
+
|
||||
This can be useful when you want to publish the tree from a commit
|
||||
|
@ -235,20 +235,20 @@ whose full history contains proprietary or otherwise encumbered bits of
|
|||
code.
|
||||
+
|
||||
If you want to start a disconnected history that records a set of paths
|
||||
that is totally different from the one of _<start-point>_, then you should
|
||||
that is totally different from the one of `<start-point>`, then you should
|
||||
clear the index and the working tree right after creating the orphan
|
||||
branch by running `git rm -rf .` from the top level of the working tree.
|
||||
Afterwards you will be ready to prepare your new files, repopulating the
|
||||
working tree, by copying them from elsewhere, extracting a tarball, etc.
|
||||
|
||||
`--ignore-skip-worktree-bits`::
|
||||
In sparse checkout mode, `git checkout -- <path>...` would
|
||||
update only entries matched by _<paths>_ and sparse patterns
|
||||
--ignore-skip-worktree-bits::
|
||||
In sparse checkout mode, `git checkout -- <paths>` would
|
||||
update only entries matched by `<paths>` and sparse patterns
|
||||
in `$GIT_DIR/info/sparse-checkout`. This option ignores
|
||||
the sparse patterns and adds back any files in `<path>...`.
|
||||
the sparse patterns and adds back any files in `<paths>`.
|
||||
|
||||
`-m`::
|
||||
`--merge`::
|
||||
-m::
|
||||
--merge::
|
||||
When switching branches,
|
||||
if you have local modifications to one or more files that
|
||||
are different between the current branch and the branch to
|
||||
|
@ -269,40 +269,40 @@ used when checking out paths from a tree-ish.
|
|||
+
|
||||
When switching branches with `--merge`, staged changes may be lost.
|
||||
|
||||
`--conflict=<style>`::
|
||||
--conflict=<style>::
|
||||
The same as `--merge` option above, but changes the way the
|
||||
conflicting hunks are presented, overriding the
|
||||
`merge.conflictStyle` configuration variable. Possible values are
|
||||
`merge` (default), `diff3`, and `zdiff3`.
|
||||
"merge" (default), "diff3", and "zdiff3".
|
||||
|
||||
`-p`::
|
||||
`--patch`::
|
||||
-p::
|
||||
--patch::
|
||||
Interactively select hunks in the difference between the
|
||||
_<tree-ish>_ (or the index, if unspecified) and the working
|
||||
`<tree-ish>` (or the index, if unspecified) and the working
|
||||
tree. The chosen hunks are then applied in reverse to the
|
||||
working tree (and if a _<tree-ish>_ was specified, the index).
|
||||
working tree (and if a `<tree-ish>` was specified, the index).
|
||||
+
|
||||
This means that you can use `git checkout -p` to selectively discard
|
||||
edits from your current working tree. See the "Interactive Mode"
|
||||
edits from your current working tree. See the ``Interactive Mode''
|
||||
section of linkgit:git-add[1] to learn how to operate the `--patch` mode.
|
||||
+
|
||||
Note that this option uses the no overlay mode by default (see also
|
||||
`--overlay`), and currently doesn't support overlay mode.
|
||||
|
||||
`--ignore-other-worktrees`::
|
||||
--ignore-other-worktrees::
|
||||
`git checkout` refuses when the wanted branch is already checked
|
||||
out or otherwise in use by another worktree. This option makes
|
||||
it check the branch out anyway. In other words, the branch can
|
||||
be in use by more than one worktree.
|
||||
|
||||
`--overwrite-ignore`::
|
||||
`--no-overwrite-ignore`::
|
||||
--overwrite-ignore::
|
||||
--no-overwrite-ignore::
|
||||
Silently overwrite ignored files when switching branches. This
|
||||
is the default behavior. Use `--no-overwrite-ignore` to abort
|
||||
the operation when the new branch contains ignored files.
|
||||
|
||||
`--recurse-submodules`::
|
||||
`--no-recurse-submodules`::
|
||||
--recurse-submodules::
|
||||
--no-recurse-submodules::
|
||||
Using `--recurse-submodules` will update the content of all active
|
||||
submodules according to the commit recorded in the superproject. If
|
||||
local modifications in a submodule would be overwritten the checkout
|
||||
|
@ -311,25 +311,25 @@ Note that this option uses the no overlay mode by default (see also
|
|||
Just like linkgit:git-submodule[1], this will detach `HEAD` of the
|
||||
submodule.
|
||||
|
||||
`--overlay`::
|
||||
`--no-overlay`::
|
||||
--overlay::
|
||||
--no-overlay::
|
||||
In the default overlay mode, `git checkout` never
|
||||
removes files from the index or the working tree. When
|
||||
specifying `--no-overlay`, files that appear in the index and
|
||||
working tree, but not in _<tree-ish>_ are removed, to make them
|
||||
match _<tree-ish>_ exactly.
|
||||
working tree, but not in `<tree-ish>` are removed, to make them
|
||||
match `<tree-ish>` exactly.
|
||||
|
||||
`--pathspec-from-file=<file>`::
|
||||
Pathspec is passed in _<file>_ instead of commandline args. If
|
||||
_<file>_ is exactly `-` then standard input is used. Pathspec
|
||||
elements are separated by _LF_ or _CR_/_LF_. Pathspec elements can be
|
||||
--pathspec-from-file=<file>::
|
||||
Pathspec is passed in `<file>` instead of commandline args. If
|
||||
`<file>` is exactly `-` then standard input is used. Pathspec
|
||||
elements are separated by LF or CR/LF. Pathspec elements can be
|
||||
quoted as explained for the configuration variable `core.quotePath`
|
||||
(see linkgit:git-config[1]). See also `--pathspec-file-nul` and
|
||||
global `--literal-pathspecs`.
|
||||
|
||||
`--pathspec-file-nul`::
|
||||
--pathspec-file-nul::
|
||||
Only meaningful with `--pathspec-from-file`. Pathspec elements are
|
||||
separated with _NUL_ character and all other characters are taken
|
||||
separated with NUL character and all other characters are taken
|
||||
literally (including newlines and quotes).
|
||||
|
||||
<branch>::
|
||||
|
@ -343,33 +343,33 @@ You can use the `@{-N}` syntax to refer to the N-th last
|
|||
branch/commit checked out using "git checkout" operation. You may
|
||||
also specify `-` which is synonymous to `@{-1}`.
|
||||
+
|
||||
As a special case, you may use `<rev-a>...<rev-b>` as a shortcut for the
|
||||
merge base of _<rev-a>_ and _<rev-b>_ if there is exactly one merge base. You can
|
||||
leave out at most one of _<rev-a>_ and _<rev-b>_, in which case it defaults to `HEAD`.
|
||||
As a special case, you may use `A...B` as a shortcut for the
|
||||
merge base of `A` and `B` if there is exactly one merge base. You can
|
||||
leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
|
||||
|
||||
_<new-branch>_::
|
||||
<new-branch>::
|
||||
Name for the new branch.
|
||||
|
||||
_<start-point>_::
|
||||
<start-point>::
|
||||
The name of a commit at which to start the new branch; see
|
||||
linkgit:git-branch[1] for details. Defaults to `HEAD`.
|
||||
+
|
||||
As a special case, you may use `<rev-a>...<rev-b>` as a shortcut for the
|
||||
merge base of _<rev-a>_ and _<rev-b>_ if there is exactly one merge base. You can
|
||||
leave out at most one of _<rev-a>_ and _<rev-b>_, in which case it defaults to `HEAD`.
|
||||
As a special case, you may use `"A...B"` as a shortcut for the
|
||||
merge base of `A` and `B` if there is exactly one merge base. You can
|
||||
leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
|
||||
|
||||
_<tree-ish>_::
|
||||
<tree-ish>::
|
||||
Tree to checkout from (when paths are given). If not specified,
|
||||
the index will be used.
|
||||
+
|
||||
As a special case, you may use `<rev-a>...<rev-b>` as a shortcut for the
|
||||
merge base of _<rev-a>_ and _<rev-b>_ if there is exactly one merge base. You can
|
||||
leave out at most one of _<rev-a>_ and _<rev-b>_, in which case it defaults to `HEAD`.
|
||||
As a special case, you may use `"A...B"` as a shortcut for the
|
||||
merge base of `A` and `B` if there is exactly one merge base. You can
|
||||
leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
|
||||
|
||||
`--`::
|
||||
\--::
|
||||
Do not interpret any more arguments as options.
|
||||
|
||||
`<pathspec>...`::
|
||||
<pathspec>...::
|
||||
Limits the paths affected by the operation.
|
||||
+
|
||||
For more details, see the 'pathspec' entry in linkgit:gitglossary[7].
|
||||
|
@ -391,7 +391,7 @@ a---b---c branch 'master' (refers to commit 'c')
|
|||
------------
|
||||
|
||||
When a commit is created in this state, the branch is updated to refer to
|
||||
the new commit. Specifically, `git commit` creates a new commit `d`, whose
|
||||
the new commit. Specifically, 'git commit' creates a new commit `d`, whose
|
||||
parent is commit `c`, and then updates branch `master` to refer to new
|
||||
commit `d`. `HEAD` still refers to branch `master` and so indirectly now refers
|
||||
to commit `d`:
|
||||
|
@ -510,11 +510,11 @@ ARGUMENT DISAMBIGUATION
|
|||
-----------------------
|
||||
|
||||
When there is only one argument given and it is not `--` (e.g. `git
|
||||
checkout abc`), and when the argument is both a valid _<tree-ish>_
|
||||
(e.g. a branch `abc` exists) and a valid _<pathspec>_ (e.g. a file
|
||||
checkout abc`), and when the argument is both a valid `<tree-ish>`
|
||||
(e.g. a branch `abc` exists) and a valid `<pathspec>` (e.g. a file
|
||||
or a directory whose name is "abc" exists), Git would usually ask
|
||||
you to disambiguate. Because checking out a branch is so common an
|
||||
operation, however, `git checkout abc` takes "abc" as a _<tree-ish>_
|
||||
operation, however, `git checkout abc` takes "abc" as a `<tree-ish>`
|
||||
in such a situation. Use `git checkout -- <pathspec>` if you want
|
||||
to checkout these paths out of the index.
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ EXAMPLES
|
|||
--------
|
||||
|
||||
Format data by columns:
|
||||
|
||||
+
|
||||
------------
|
||||
$ seq 1 24 | git column --mode=column --padding=5
|
||||
1 4 7 10 13 16 19 22
|
||||
|
@ -59,7 +59,7 @@ $ seq 1 24 | git column --mode=column --padding=5
|
|||
------------
|
||||
|
||||
Format data by rows:
|
||||
|
||||
+
|
||||
------------
|
||||
$ seq 1 21 | git column --mode=row --padding=5
|
||||
1 2 3 4 5 6 7
|
||||
|
@ -68,7 +68,7 @@ $ seq 1 21 | git column --mode=row --padding=5
|
|||
------------
|
||||
|
||||
List some tags in a table with unequal column widths:
|
||||
|
||||
+
|
||||
------------
|
||||
$ git tag --list 'v2.4.*' --column=row,dense
|
||||
v2.4.0 v2.4.0-rc0 v2.4.0-rc1 v2.4.0-rc2 v2.4.0-rc3
|
||||
|
|
|
@ -10,9 +10,9 @@ SYNOPSIS
|
|||
--------
|
||||
[verse]
|
||||
'git config list' [<file-option>] [<display-option>] [--includes]
|
||||
'git config get' [<file-option>] [<display-option>] [--includes] [--all] [--regexp] [--value=<pattern>] [--fixed-value] [--default=<default>] [--url=<url>] <name>
|
||||
'git config set' [<file-option>] [--type=<type>] [--all] [--value=<pattern>] [--fixed-value] <name> <value>
|
||||
'git config unset' [<file-option>] [--all] [--value=<pattern>] [--fixed-value] <name>
|
||||
'git config get' [<file-option>] [<display-option>] [--includes] [--all] [--regexp] [--value=<value>] [--fixed-value] [--default=<default>] <name>
|
||||
'git config set' [<file-option>] [--type=<type>] [--all] [--value=<value>] [--fixed-value] <name> <value>
|
||||
'git config unset' [<file-option>] [--all] [--value=<value>] [--fixed-value] <name>
|
||||
'git config rename-section' [<file-option>] <old-name> <new-name>
|
||||
'git config remove-section' [<file-option>] <name>
|
||||
'git config edit' [<file-option>]
|
||||
|
@ -26,7 +26,7 @@ escaped.
|
|||
|
||||
Multiple lines can be added to an option by using the `--append` option.
|
||||
If you want to update or unset an option which can occur on multiple
|
||||
lines, `--value=<pattern>` (which is an extended regular expression,
|
||||
lines, a `value-pattern` (which is an extended regular expression,
|
||||
unless the `--fixed-value` option is given) needs to be given. Only the
|
||||
existing values that match the pattern are updated or unset. If
|
||||
you want to handle the lines that do *not* match the pattern, just
|
||||
|
@ -109,7 +109,7 @@ OPTIONS
|
|||
|
||||
--replace-all::
|
||||
Default behavior is to replace at most one line. This replaces
|
||||
all lines matching the key (and optionally `--value=<pattern>`).
|
||||
all lines matching the key (and optionally the `value-pattern`).
|
||||
|
||||
--append::
|
||||
Adds a new line to the option without altering any existing
|
||||
|
@ -200,19 +200,11 @@ See also <<FILES>>.
|
|||
section in linkgit:gitrevisions[7] for a more complete list of
|
||||
ways to spell blob names.
|
||||
|
||||
`--value=<pattern>`::
|
||||
`--no-value`::
|
||||
With `get`, `set`, and `unset`, match only against
|
||||
_<pattern>_. The pattern is an extended regular expression unless
|
||||
`--fixed-value` is given.
|
||||
+
|
||||
Use `--no-value` to unset _<pattern>_.
|
||||
|
||||
--fixed-value::
|
||||
When used with `--value=<pattern>`, treat _<pattern>_ as
|
||||
When used with the `value-pattern` argument, treat `value-pattern` as
|
||||
an exact string instead of a regular expression. This will restrict
|
||||
the name/value pairs that are matched to only those where the value
|
||||
is exactly equal to _<pattern>_.
|
||||
is exactly equal to the `value-pattern`.
|
||||
|
||||
--type <type>::
|
||||
'git config' will ensure that any input or output is valid under the given
|
||||
|
@ -267,12 +259,6 @@ Valid `<type>`'s include:
|
|||
Output only the names of config variables for `list` or
|
||||
`get`.
|
||||
|
||||
`--show-names`::
|
||||
`--no-show-names`::
|
||||
With `get`, show config keys in addition to their values. The
|
||||
default is `--no-show-names` unless `--url` is given and there
|
||||
are no subsections in _<name>_.
|
||||
|
||||
--show-origin::
|
||||
Augment the output of all queried config options with the
|
||||
origin type (file, standard input, blob, command line) and
|
||||
|
|
|
@ -14,7 +14,7 @@ git diff [<options>] --cached [--merge-base] [<commit>] [--] [<path>...]
|
|||
git diff [<options>] [--merge-base] <commit> [<commit>...] <commit> [--] [<path>...]
|
||||
git diff [<options>] <commit>...<commit> [--] [<path>...]
|
||||
git diff [<options>] <blob> <blob>
|
||||
git diff [<options>] --no-index [--] <path> <path> [<pathspec>...]
|
||||
git diff [<options>] --no-index [--] <path> <path>
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
|
@ -31,18 +31,14 @@ files on disk.
|
|||
further add to the index but you still haven't. You can
|
||||
stage these changes by using linkgit:git-add[1].
|
||||
|
||||
`git diff [<options>] --no-index [--] <path> <path> [<pathspec>...]`::
|
||||
`git diff [<options>] --no-index [--] <path> <path>`::
|
||||
|
||||
This form is to compare the given two paths on the
|
||||
filesystem. You can omit the `--no-index` option when
|
||||
running the command in a working tree controlled by Git and
|
||||
at least one of the paths points outside the working tree,
|
||||
or when running the command outside a working tree
|
||||
controlled by Git. This form implies `--exit-code`. If both
|
||||
paths point to directories, additional pathspecs may be
|
||||
provided. These will limit the files included in the
|
||||
difference. All such pathspecs must be relative as they
|
||||
apply to both sides of the diff.
|
||||
controlled by Git. This form implies `--exit-code`.
|
||||
|
||||
`git diff [<options>] --cached [--merge-base] [<commit>] [--] [<path>...]`::
|
||||
|
||||
|
|
|
@ -46,12 +46,14 @@ resulting tag will have an invalid signature.
|
|||
|
||||
--signed-commits=(verbatim|warn-verbatim|warn-strip|strip|abort)::
|
||||
Specify how to handle signed commits. Behaves exactly as
|
||||
'--signed-tags', but for commits. Default is 'strip', which
|
||||
is the same as how earlier versions of this command without
|
||||
this option behaved.
|
||||
'--signed-tags', but for commits. Default is 'abort'.
|
||||
+
|
||||
NOTE: This is highly experimental and the format of the data stream may
|
||||
change in the future without compatibility guarantees.
|
||||
Earlier versions this command that did not have '--signed-commits'
|
||||
behaved as if '--signed-commits=strip'. As an escape hatch for users
|
||||
of tools that call 'git fast-export' but do not yet support
|
||||
'--signed-commits', you may set the environment variable
|
||||
'FAST_EXPORT_SIGNED_COMMITS_NOABORT=1' in order to change the default
|
||||
from 'abort' to 'warn-strip'.
|
||||
|
||||
--tag-of-filtered-object=(abort|drop|rewrite)::
|
||||
Specify how to handle tags whose tagged object is filtered out.
|
||||
|
|
|
@ -523,9 +523,6 @@ that signs the commit data.
|
|||
Here <alg> specifies which hashing algorithm is used for this
|
||||
signature, either `sha1` or `sha256`.
|
||||
|
||||
NOTE: This is highly experimental and the format of the data stream may
|
||||
change in the future without compatibility guarantees.
|
||||
|
||||
`encoding`
|
||||
^^^^^^^^^^
|
||||
The optional `encoding` command indicates the encoding of the commit
|
||||
|
|
|
@ -9,24 +9,21 @@ git-imap-send - Send a collection of patches from stdin to an IMAP folder
|
|||
SYNOPSIS
|
||||
--------
|
||||
[verse]
|
||||
'git imap-send' [-v] [-q] [--[no-]curl] [(--folder|-f) <folder>]
|
||||
'git imap-send' --list
|
||||
'git imap-send' [-v] [-q] [--[no-]curl]
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
This command uploads a mailbox generated with `git format-patch`
|
||||
This command uploads a mailbox generated with 'git format-patch'
|
||||
into an IMAP drafts folder. This allows patches to be sent as
|
||||
other email is when using mail clients that cannot read mailbox
|
||||
files directly. The command also works with any general mailbox
|
||||
in which emails have the fields `From`, `Date`, and `Subject` in
|
||||
in which emails have the fields "From", "Date", and "Subject" in
|
||||
that order.
|
||||
|
||||
Typical usage is something like:
|
||||
|
||||
------
|
||||
$ git format-patch --signoff --stdout --attach origin | git imap-send
|
||||
------
|
||||
git format-patch --signoff --stdout --attach origin | git imap-send
|
||||
|
||||
|
||||
OPTIONS
|
||||
|
@ -40,11 +37,6 @@ OPTIONS
|
|||
--quiet::
|
||||
Be quiet.
|
||||
|
||||
-f <folder>::
|
||||
--folder=<folder>::
|
||||
Specify the folder in which the emails have to saved.
|
||||
For example: `--folder=[Gmail]/Drafts` or `-f INBOX/Drafts`.
|
||||
|
||||
--curl::
|
||||
Use libcurl to communicate with the IMAP server, unless tunneling
|
||||
into it. Ignored if Git was built without the USE_CURL_FOR_IMAP_SEND
|
||||
|
@ -55,8 +47,6 @@ OPTIONS
|
|||
using libcurl. Ignored if Git was built with the NO_OPENSSL option
|
||||
set.
|
||||
|
||||
--list::
|
||||
Run the IMAP LIST command to output a list of all the folders present.
|
||||
|
||||
CONFIGURATION
|
||||
-------------
|
||||
|
@ -112,56 +102,20 @@ Using Gmail's IMAP interface:
|
|||
|
||||
---------
|
||||
[imap]
|
||||
folder = "[Gmail]/Drafts"
|
||||
host = imaps://imap.gmail.com
|
||||
user = user@gmail.com
|
||||
port = 993
|
||||
folder = "[Gmail]/Drafts"
|
||||
host = imaps://imap.gmail.com
|
||||
user = user@gmail.com
|
||||
port = 993
|
||||
---------
|
||||
|
||||
Gmail does not allow using your regular password for `git imap-send`.
|
||||
If you have multi-factor authentication set up on your Gmail account, you
|
||||
can generate an app-specific password for use with `git imap-send`.
|
||||
Visit https://security.google.com/settings/security/apppasswords to create
|
||||
it. Alternatively, use OAuth2.0 authentication as described below.
|
||||
|
||||
[NOTE]
|
||||
You might need to instead use: `folder = "[Google Mail]/Drafts"` if you get an error
|
||||
that the "Folder doesn't exist". You can also run `git imap-send --list` to get a
|
||||
list of available folders.
|
||||
that the "Folder doesn't exist".
|
||||
|
||||
[NOTE]
|
||||
If your Gmail account is set to another language than English, the name of the "Drafts"
|
||||
folder will be localized.
|
||||
|
||||
If you want to use OAuth2.0 based authentication, you can specify
|
||||
`OAUTHBEARER` or `XOAUTH2` mechanism in your config. It is more secure
|
||||
than using app-specific passwords, and also does not enforce the need of
|
||||
having multi-factor authentication. You will have to use an OAuth2.0
|
||||
access token in place of your password when using this authentication.
|
||||
|
||||
---------
|
||||
[imap]
|
||||
folder = "[Gmail]/Drafts"
|
||||
host = imaps://imap.gmail.com
|
||||
user = user@gmail.com
|
||||
port = 993
|
||||
authmethod = OAUTHBEARER
|
||||
---------
|
||||
|
||||
Using Outlook's IMAP interface:
|
||||
|
||||
Unlike Gmail, Outlook only supports OAuth2.0 based authentication. Also, it
|
||||
supports only `XOAUTH2` as the mechanism.
|
||||
|
||||
---------
|
||||
[imap]
|
||||
folder = "Drafts"
|
||||
host = imaps://outlook.office365.com
|
||||
user = user@outlook.com
|
||||
port = 993
|
||||
authmethod = XOAUTH2
|
||||
---------
|
||||
|
||||
Once the commits are ready to be sent, run the following command:
|
||||
|
||||
$ git format-patch --cover-letter -M --stdout origin/master | git imap-send
|
||||
|
@ -170,10 +124,6 @@ Just make sure to disable line wrapping in the email client (Gmail's web
|
|||
interface will wrap lines no matter what, so you need to use a real
|
||||
IMAP client).
|
||||
|
||||
In case you are using OAuth2.0 authentication, it is easier to use credential
|
||||
helpers to generate tokens. Credential helpers suggested in
|
||||
linkgit:git-send-email[1] can be used for `git imap-send` as well.
|
||||
|
||||
CAUTION
|
||||
-------
|
||||
It is still your responsibility to make sure that the email message
|
||||
|
|
|
@ -8,8 +8,8 @@ git-log - Show commit logs
|
|||
|
||||
SYNOPSIS
|
||||
--------
|
||||
[synopsis]
|
||||
git log [<options>] [<revision-range>] [[--] <path>...]
|
||||
[verse]
|
||||
'git log' [<options>] [<revision-range>] [[--] <path>...]
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
|
@ -27,34 +27,28 @@ each commit introduces are shown.
|
|||
OPTIONS
|
||||
-------
|
||||
|
||||
`--follow`::
|
||||
--follow::
|
||||
Continue listing the history of a file beyond renames
|
||||
(works only for a single file).
|
||||
|
||||
`--no-decorate`::
|
||||
`--decorate[=(short|full|auto|no)]`::
|
||||
Print out the ref names of any commits that are shown. Possible values
|
||||
are:
|
||||
+
|
||||
----
|
||||
`short`;; the ref name prefixes `refs/heads/`, `refs/tags/` and
|
||||
`refs/remotes/` are not printed.
|
||||
`full`;; the full ref name (including prefix) is printed.
|
||||
`auto`:: if the output is going to a terminal, the ref names
|
||||
are shown as if `short` were given, otherwise no ref names are
|
||||
shown.
|
||||
----
|
||||
+
|
||||
The option `--decorate` is short-hand for `--decorate=short`. Default to
|
||||
configuration value of `log.decorate` if configured, otherwise, `auto`.
|
||||
--no-decorate::
|
||||
--decorate[=short|full|auto|no]::
|
||||
Print out the ref names of any commits that are shown. If 'short' is
|
||||
specified, the ref name prefixes 'refs/heads/', 'refs/tags/' and
|
||||
'refs/remotes/' will not be printed. If 'full' is specified, the
|
||||
full ref name (including prefix) will be printed. If 'auto' is
|
||||
specified, then if the output is going to a terminal, the ref names
|
||||
are shown as if 'short' were given, otherwise no ref names are
|
||||
shown. The option `--decorate` is short-hand for `--decorate=short`.
|
||||
Default to configuration value of `log.decorate` if configured,
|
||||
otherwise, `auto`.
|
||||
|
||||
`--decorate-refs=<pattern>`::
|
||||
`--decorate-refs-exclude=<pattern>`::
|
||||
--decorate-refs=<pattern>::
|
||||
--decorate-refs-exclude=<pattern>::
|
||||
For each candidate reference, do not use it for decoration if it
|
||||
matches any of the _<pattern>_ parameters given to
|
||||
`--decorate-refs-exclude` or if it doesn't match any of the
|
||||
_<pattern>_ parameters given to `--decorate-refs`.
|
||||
The `log.excludeDecoration` config option allows excluding refs from
|
||||
matches any patterns given to `--decorate-refs-exclude` or if it
|
||||
doesn't match any of the patterns given to `--decorate-refs`. The
|
||||
`log.excludeDecoration` config option allows excluding refs from
|
||||
the decorations, but an explicit `--decorate-refs` pattern will
|
||||
override a match in `log.excludeDecoration`.
|
||||
+
|
||||
|
@ -62,51 +56,51 @@ If none of these options or config settings are given, then references are
|
|||
used as decoration if they match `HEAD`, `refs/heads/`, `refs/remotes/`,
|
||||
`refs/stash/`, or `refs/tags/`.
|
||||
|
||||
`--clear-decorations`::
|
||||
--clear-decorations::
|
||||
When specified, this option clears all previous `--decorate-refs`
|
||||
or `--decorate-refs-exclude` options and relaxes the default
|
||||
decoration filter to include all references. This option is
|
||||
assumed if the config value `log.initialDecorationSet` is set to
|
||||
`all`.
|
||||
|
||||
`--source`::
|
||||
--source::
|
||||
Print out the ref name given on the command line by which each
|
||||
commit was reached.
|
||||
|
||||
`--[no-]mailmap`::
|
||||
`--[no-]use-mailmap`::
|
||||
--[no-]mailmap::
|
||||
--[no-]use-mailmap::
|
||||
Use mailmap file to map author and committer names and email
|
||||
addresses to canonical real names and email addresses. See
|
||||
linkgit:git-shortlog[1].
|
||||
|
||||
`--full-diff`::
|
||||
--full-diff::
|
||||
Without this flag, `git log -p <path>...` shows commits that
|
||||
touch the specified paths, and diffs about the same specified
|
||||
paths. With this, the full diff is shown for commits that touch
|
||||
the specified paths; this means that "`<path>...`" limits only
|
||||
the specified paths; this means that "<path>..." limits only
|
||||
commits, and doesn't limit diff for those commits.
|
||||
+
|
||||
Note that this affects all diff-based output types, e.g. those
|
||||
produced by `--stat`, etc.
|
||||
|
||||
`--log-size`::
|
||||
Include a line `log size <number>` in the output for each commit,
|
||||
where _<number>_ is the length of that commit's message in bytes.
|
||||
--log-size::
|
||||
Include a line ``log size <number>'' in the output for each commit,
|
||||
where <number> is the length of that commit's message in bytes.
|
||||
Intended to speed up tools that read log messages from `git log`
|
||||
output by allowing them to allocate space in advance.
|
||||
|
||||
include::line-range-options.adoc[]
|
||||
|
||||
_<revision-range>_::
|
||||
<revision-range>::
|
||||
Show only commits in the specified revision range. When no
|
||||
_<revision-range>_ is specified, it defaults to `HEAD` (i.e. the
|
||||
<revision-range> is specified, it defaults to `HEAD` (i.e. the
|
||||
whole history leading to the current commit). `origin..HEAD`
|
||||
specifies all the commits reachable from the current commit
|
||||
(i.e. `HEAD`), but not from `origin`. For a complete list of
|
||||
ways to spell _<revision-range>_, see the 'Specifying Ranges'
|
||||
ways to spell <revision-range>, see the 'Specifying Ranges'
|
||||
section of linkgit:gitrevisions[7].
|
||||
|
||||
`[--] <path>...`::
|
||||
[--] <path>...::
|
||||
Show only commits that are enough to explain how the files
|
||||
that match the specified paths came to be. See 'History
|
||||
Simplification' below for details and other simplification
|
||||
|
@ -151,14 +145,14 @@ EXAMPLES
|
|||
|
||||
`git log --since="2 weeks ago" -- gitk`::
|
||||
|
||||
Show the changes during the last two weeks to the file `gitk`.
|
||||
Show the changes during the last two weeks to the file 'gitk'.
|
||||
The `--` is necessary to avoid confusion with the *branch* named
|
||||
`gitk`
|
||||
'gitk'
|
||||
|
||||
`git log --name-status release..test`::
|
||||
|
||||
Show the commits that are in the "`test`" branch but not yet
|
||||
in the "`release`" branch, along with the list of paths
|
||||
Show the commits that are in the "test" branch but not yet
|
||||
in the "release" branch, along with the list of paths
|
||||
each commit modifies.
|
||||
|
||||
`git log --follow builtin/rev-list.c`::
|
||||
|
@ -170,7 +164,7 @@ EXAMPLES
|
|||
`git log --branches --not --remotes=origin`::
|
||||
|
||||
Shows all commits that are in any of local branches but not in
|
||||
any of remote-tracking branches for `origin` (what you have that
|
||||
any of remote-tracking branches for 'origin' (what you have that
|
||||
origin doesn't).
|
||||
|
||||
`git log master --not --remotes=*/master`::
|
||||
|
@ -206,11 +200,11 @@ CONFIGURATION
|
|||
See linkgit:git-config[1] for core variables and linkgit:git-diff[1]
|
||||
for settings related to diff generation.
|
||||
|
||||
`format.pretty`::
|
||||
format.pretty::
|
||||
Default for the `--format` option. (See 'Pretty Formats' above.)
|
||||
Defaults to `medium`.
|
||||
|
||||
`i18n.logOutputEncoding`::
|
||||
i18n.logOutputEncoding::
|
||||
Encoding to use when displaying logs. (See 'Discussion' above.)
|
||||
Defaults to the value of `i18n.commitEncoding` if set, and UTF-8
|
||||
otherwise.
|
||||
|
|
|
@ -172,7 +172,7 @@ rerere-gc::
|
|||
|
||||
worktree-prune::
|
||||
The `worktree-prune` task deletes stale or broken worktrees. See
|
||||
linkgit:git-worktree[1] for more information.
|
||||
linkit:git-worktree[1] for more information.
|
||||
|
||||
OPTIONS
|
||||
-------
|
||||
|
|
|
@ -8,13 +8,13 @@ git-merge - Join two or more development histories together
|
|||
|
||||
SYNOPSIS
|
||||
--------
|
||||
[synopsis]
|
||||
git merge [-n] [--stat] [--compact-summary] [--no-commit] [--squash] [--[no-]edit]
|
||||
[verse]
|
||||
'git merge' [-n] [--stat] [--no-commit] [--squash] [--[no-]edit]
|
||||
[--no-verify] [-s <strategy>] [-X <strategy-option>] [-S[<keyid>]]
|
||||
[--[no-]allow-unrelated-histories]
|
||||
[--[no-]rerere-autoupdate] [-m <msg>] [-F <file>]
|
||||
[--into-name <branch>] [<commit>...]
|
||||
git merge (--continue | --abort | --quit)
|
||||
'git merge' (--continue | --abort | --quit)
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
|
@ -28,8 +28,8 @@ Assume the following history exists and the current branch is
|
|||
`master`:
|
||||
|
||||
------------
|
||||
A---B---C topic
|
||||
/
|
||||
A---B---C topic
|
||||
/
|
||||
D---E---F---G master
|
||||
------------
|
||||
|
||||
|
@ -38,11 +38,11 @@ Then `git merge topic` will replay the changes made on the
|
|||
its current commit (`C`) on top of `master`, and record the result
|
||||
in a new commit along with the names of the two parent commits and
|
||||
a log message from the user describing the changes. Before the operation,
|
||||
`ORIG_HEAD` is set to the tip of the current branch (`G`).
|
||||
`ORIG_HEAD` is set to the tip of the current branch (`C`).
|
||||
|
||||
------------
|
||||
A---B---C topic
|
||||
/ \
|
||||
A---B---C topic
|
||||
/ \
|
||||
D---E---F---G---H master
|
||||
------------
|
||||
|
||||
|
@ -57,7 +57,7 @@ merge started (and especially if those changes were further modified
|
|||
after the merge was started), `git merge --abort` will in some cases be
|
||||
unable to reconstruct the original (pre-merge) changes. Therefore:
|
||||
|
||||
WARNING: Running `git merge` with non-trivial uncommitted changes is
|
||||
*Warning*: Running `git merge` with non-trivial uncommitted changes is
|
||||
discouraged: while possible, it may leave you in a state that is hard to
|
||||
back out of in the case of a conflict.
|
||||
|
||||
|
@ -67,7 +67,7 @@ OPTIONS
|
|||
|
||||
include::merge-options.adoc[]
|
||||
|
||||
`-m <msg>`::
|
||||
-m <msg>::
|
||||
Set the commit message to be used for the merge commit (in
|
||||
case one is created).
|
||||
+
|
||||
|
@ -78,13 +78,13 @@ The `git fmt-merge-msg` command can be
|
|||
used to give a good default for automated `git merge`
|
||||
invocations. The automated message can include the branch description.
|
||||
|
||||
`--into-name <branch>`::
|
||||
--into-name <branch>::
|
||||
Prepare the default merge message as if merging to the branch
|
||||
_<branch>_, instead of the name of the real branch to which
|
||||
`<branch>`, instead of the name of the real branch to which
|
||||
the merge is made.
|
||||
|
||||
`-F <file>`::
|
||||
`--file=<file>`::
|
||||
-F <file>::
|
||||
--file=<file>::
|
||||
Read the commit message to be used for the merge commit (in
|
||||
case one is created).
|
||||
+
|
||||
|
@ -93,12 +93,12 @@ will be appended to the specified message.
|
|||
|
||||
include::rerere-options.adoc[]
|
||||
|
||||
`--overwrite-ignore`::
|
||||
`--no-overwrite-ignore`::
|
||||
--overwrite-ignore::
|
||||
--no-overwrite-ignore::
|
||||
Silently overwrite ignored files from the merge result. This
|
||||
is the default behavior. Use `--no-overwrite-ignore` to abort.
|
||||
|
||||
`--abort`::
|
||||
--abort::
|
||||
Abort the current conflict resolution process, and
|
||||
try to reconstruct the pre-merge state. If an autostash entry is
|
||||
present, apply it to the worktree.
|
||||
|
@ -114,17 +114,17 @@ which case `git merge --abort` applies the stash entry to the worktree
|
|||
whereas `git reset --merge` will save the stashed changes in the stash
|
||||
list.
|
||||
|
||||
`--quit`::
|
||||
--quit::
|
||||
Forget about the current merge in progress. Leave the index
|
||||
and the working tree as-is. If `MERGE_AUTOSTASH` is present, the
|
||||
stash entry will be saved to the stash list.
|
||||
|
||||
`--continue`::
|
||||
--continue::
|
||||
After a `git merge` stops due to conflicts you can conclude the
|
||||
merge by running `git merge --continue` (see "HOW TO RESOLVE
|
||||
CONFLICTS" section below).
|
||||
|
||||
`<commit>...`::
|
||||
<commit>...::
|
||||
Commits, usually other branch heads, to merge into our branch.
|
||||
Specifying more than one commit will create a merge with
|
||||
more than two parents (affectionately called an Octopus merge).
|
||||
|
@ -152,7 +152,7 @@ To avoid recording unrelated changes in the merge commit,
|
|||
`git pull` and `git merge` will also abort if there are any changes
|
||||
registered in the index relative to the `HEAD` commit. (Special
|
||||
narrow exceptions to this rule may exist depending on which merge
|
||||
strategy is in use, but generally, the index must match `HEAD`.)
|
||||
strategy is in use, but generally, the index must match HEAD.)
|
||||
|
||||
If all named commits are already ancestors of `HEAD`, `git merge`
|
||||
will exit early with the message "Already up to date."
|
||||
|
@ -195,11 +195,11 @@ happens:
|
|||
stage 2 from `HEAD`, and stage 3 from `MERGE_HEAD` (you
|
||||
can inspect the stages with `git ls-files -u`). The working
|
||||
tree files contain the result of the merge operation; i.e. 3-way
|
||||
merge results with familiar conflict markers +<<<+ `===` +>>>+.
|
||||
merge results with familiar conflict markers `<<<` `===` `>>>`.
|
||||
5. A ref named `AUTO_MERGE` is written, pointing to a tree
|
||||
corresponding to the current content of the working tree (including
|
||||
conflict markers for textual conflicts). Note that this ref is only
|
||||
written when the `ort` merge strategy is used (the default).
|
||||
written when the 'ort' merge strategy is used (the default).
|
||||
6. No other changes are made. In particular, the local
|
||||
modifications you had before you started merge will stay the
|
||||
same and the index entries for them stay as they were,
|
||||
|
@ -231,6 +231,7 @@ git merge v1.2.3^0
|
|||
git merge --ff-only v1.2.3
|
||||
----
|
||||
|
||||
|
||||
HOW CONFLICTS ARE PRESENTED
|
||||
---------------------------
|
||||
|
||||
|
@ -259,7 +260,7 @@ And here is another line that is cleanly resolved or unmodified.
|
|||
------------
|
||||
|
||||
The area where a pair of conflicting changes happened is marked with markers
|
||||
+<<<<<<<+, `=======`, and +>>>>>>>+. The part before the `=======`
|
||||
`<<<<<<<`, `=======`, and `>>>>>>>`. The part before the `=======`
|
||||
is typically your side, and the part afterwards is typically their side.
|
||||
|
||||
The default format does not show what the original said in the conflicting
|
||||
|
@ -269,7 +270,7 @@ side wants to say it is hard and you'd prefer to go shopping, while the
|
|||
other side wants to claim it is easy.
|
||||
|
||||
An alternative style can be used by setting the `merge.conflictStyle`
|
||||
configuration variable to either `diff3` or `zdiff3`. In `diff3`
|
||||
configuration variable to either "diff3" or "zdiff3". In "diff3"
|
||||
style, the above conflict may look like this:
|
||||
|
||||
------------
|
||||
|
@ -289,7 +290,7 @@ Git makes conflict resolution easy.
|
|||
And here is another line that is cleanly resolved or unmodified.
|
||||
------------
|
||||
|
||||
while in `zdiff3` style, it may look like this:
|
||||
while in "zdiff3" style, it may look like this:
|
||||
|
||||
------------
|
||||
Here are lines that are either unchanged from the common
|
||||
|
@ -307,8 +308,8 @@ Git makes conflict resolution easy.
|
|||
And here is another line that is cleanly resolved or unmodified.
|
||||
------------
|
||||
|
||||
In addition to the +<<<<<<<+, `=======`, and +>>>>>>>+ markers, it uses
|
||||
another +|||||||+ marker that is followed by the original text. You can
|
||||
In addition to the `<<<<<<<`, `=======`, and `>>>>>>>` markers, it uses
|
||||
another `|||||||` marker that is followed by the original text. You can
|
||||
tell that the original just stated a fact, and your side simply gave in to
|
||||
that statement and gave up, while the other side tried to have a more
|
||||
positive attitude. You can sometimes come up with a better resolution by
|
||||
|
@ -389,8 +390,8 @@ include::merge-strategies.adoc[]
|
|||
CONFIGURATION
|
||||
-------------
|
||||
|
||||
`branch.<name>.mergeOptions`::
|
||||
Sets default options for merging into branch _<name>_. The syntax and
|
||||
branch.<name>.mergeOptions::
|
||||
Sets default options for merging into branch <name>. The syntax and
|
||||
supported options are the same as those of `git merge`, but option
|
||||
values containing whitespace characters are currently not supported.
|
||||
|
||||
|
|
|
@ -7,95 +7,95 @@ git-mergetool - Run merge conflict resolution tools to resolve merge conflicts
|
|||
|
||||
SYNOPSIS
|
||||
--------
|
||||
[synopsis]
|
||||
git mergetool [--tool=<tool>] [-y | --[no-]prompt] [<file>...]
|
||||
[verse]
|
||||
'git mergetool' [--tool=<tool>] [-y | --[no-]prompt] [<file>...]
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
|
||||
Use `git mergetool` to run one of several merge utilities to resolve
|
||||
merge conflicts. It is typically run after `git merge`.
|
||||
merge conflicts. It is typically run after 'git merge'.
|
||||
|
||||
If one or more <file> parameters are given, the merge tool program will
|
||||
be run to resolve differences in each file (skipping those without
|
||||
conflicts). Specifying a directory will include all unresolved files in
|
||||
that path. If no _<file>_ names are specified, `git mergetool` will run
|
||||
that path. If no <file> names are specified, 'git mergetool' will run
|
||||
the merge tool program on every file with merge conflicts.
|
||||
|
||||
OPTIONS
|
||||
-------
|
||||
`-t <tool>`::
|
||||
`--tool=<tool>`::
|
||||
Use the merge resolution program specified by _<tool>_.
|
||||
Valid values include `emerge`, `gvimdiff`, `kdiff3`,
|
||||
`meld`, `vimdiff`, and `tortoisemerge`. Run `git mergetool --tool-help`
|
||||
for the list of valid _<tool>_ settings.
|
||||
-t <tool>::
|
||||
--tool=<tool>::
|
||||
Use the merge resolution program specified by <tool>.
|
||||
Valid values include emerge, gvimdiff, kdiff3,
|
||||
meld, vimdiff, and tortoisemerge. Run `git mergetool --tool-help`
|
||||
for the list of valid <tool> settings.
|
||||
+
|
||||
If a merge resolution program is not specified, `git mergetool`
|
||||
If a merge resolution program is not specified, 'git mergetool'
|
||||
will use the configuration variable `merge.tool`. If the
|
||||
configuration variable `merge.tool` is not set, `git mergetool`
|
||||
configuration variable `merge.tool` is not set, 'git mergetool'
|
||||
will pick a suitable default.
|
||||
+
|
||||
You can explicitly provide a full path to the tool by setting the
|
||||
configuration variable `mergetool.<tool>.path`. For example, you
|
||||
can configure the absolute path to kdiff3 by setting
|
||||
`mergetool.kdiff3.path`. Otherwise, `git mergetool` assumes the
|
||||
tool is available in `$PATH`.
|
||||
`mergetool.kdiff3.path`. Otherwise, 'git mergetool' assumes the
|
||||
tool is available in PATH.
|
||||
+
|
||||
Instead of running one of the known merge tool programs,
|
||||
`git mergetool` can be customized to run an alternative program
|
||||
'git mergetool' can be customized to run an alternative program
|
||||
by specifying the command line to invoke in a configuration
|
||||
variable `mergetool.<tool>.cmd`.
|
||||
+
|
||||
When `git mergetool` is invoked with this tool (either through the
|
||||
When 'git mergetool' is invoked with this tool (either through the
|
||||
`-t` or `--tool` option or the `merge.tool` configuration
|
||||
variable), the configured command line will be invoked with `BASE`
|
||||
variable), the configured command line will be invoked with `$BASE`
|
||||
set to the name of a temporary file containing the common base for
|
||||
the merge, if available; `LOCAL` set to the name of a temporary
|
||||
the merge, if available; `$LOCAL` set to the name of a temporary
|
||||
file containing the contents of the file on the current branch;
|
||||
`REMOTE` set to the name of a temporary file containing the
|
||||
contents of the file to be merged, and `MERGED` set to the name
|
||||
`$REMOTE` set to the name of a temporary file containing the
|
||||
contents of the file to be merged, and `$MERGED` set to the name
|
||||
of the file to which the merge tool should write the result of the
|
||||
merge resolution.
|
||||
+
|
||||
If the custom merge tool correctly indicates the success of a
|
||||
merge resolution with its exit code, then the configuration
|
||||
variable `mergetool.<tool>.trustExitCode` can be set to `true`.
|
||||
Otherwise, `git mergetool` will prompt the user to indicate the
|
||||
Otherwise, 'git mergetool' will prompt the user to indicate the
|
||||
success of the resolution after the custom tool has exited.
|
||||
|
||||
`--tool-help`::
|
||||
--tool-help::
|
||||
Print a list of merge tools that may be used with `--tool`.
|
||||
|
||||
`-y`::
|
||||
`--no-prompt`::
|
||||
-y::
|
||||
--no-prompt::
|
||||
Don't prompt before each invocation of the merge resolution
|
||||
program.
|
||||
This is the default if the merge resolution program is
|
||||
explicitly specified with the `--tool` option or with the
|
||||
`merge.tool` configuration variable.
|
||||
|
||||
`--prompt`::
|
||||
--prompt::
|
||||
Prompt before each invocation of the merge resolution program
|
||||
to give the user a chance to skip the path.
|
||||
|
||||
`-g`::
|
||||
`--gui`::
|
||||
When `git-mergetool` is invoked with the `-g` or `--gui` option,
|
||||
-g::
|
||||
--gui::
|
||||
When 'git-mergetool' is invoked with the `-g` or `--gui` option,
|
||||
the default merge tool will be read from the configured
|
||||
`merge.guitool` variable instead of `merge.tool`. If
|
||||
`merge.guitool` is not set, we will fallback to the tool
|
||||
configured under `merge.tool`. This may be autoselected using
|
||||
the configuration variable `mergetool.guiDefault`.
|
||||
|
||||
`--no-gui`::
|
||||
--no-gui::
|
||||
This overrides a previous `-g` or `--gui` setting or
|
||||
`mergetool.guiDefault` configuration and reads the default merge
|
||||
tool from the configured `merge.tool` variable.
|
||||
|
||||
`-O<orderfile>`::
|
||||
-O<orderfile>::
|
||||
Process files in the order specified in the
|
||||
_<orderfile>_, which has one shell glob pattern per line.
|
||||
<orderfile>, which has one shell glob pattern per line.
|
||||
This overrides the `diff.orderFile` configuration variable
|
||||
(see linkgit:git-config[1]). To cancel `diff.orderFile`,
|
||||
use `-O/dev/null`.
|
||||
|
|
|
@ -38,13 +38,10 @@ write::
|
|||
+
|
||||
--
|
||||
--preferred-pack=<pack>::
|
||||
When specified, break ties in favor of this pack when
|
||||
there are additional copies of its objects in other
|
||||
packs. Ties for objects not found in the preferred
|
||||
pack are always resolved in favor of the copy in the
|
||||
pack with the highest mtime. If unspecified, the pack
|
||||
with the lowest mtime is used by default. The
|
||||
preferred pack must have at least one object.
|
||||
Optionally specify the tie-breaking pack used when
|
||||
multiple packs contain the same object. `<pack>` must
|
||||
contain at least one object. If not given, ties are
|
||||
broken in favor of the pack with the lowest mtime.
|
||||
|
||||
--[no-]bitmap::
|
||||
Control whether or not a multi-pack bitmap is written.
|
||||
|
|
|
@ -87,9 +87,6 @@ In `--stdin` mode, take lines in the format
|
|||
on standard input, and copy the notes from each _<from-object>_ to its
|
||||
corresponding _<to-object>_. (The optional _<rest>_ is ignored so that
|
||||
the command can read the input given to the `post-rewrite` hook.)
|
||||
+
|
||||
`--stdin` cannot be combined with object names given on the command
|
||||
line.
|
||||
|
||||
`append`::
|
||||
Append new message(s) given by `-m` or `-F` options to an
|
||||
|
@ -127,10 +124,6 @@ When done, the user can either finalize the merge with
|
|||
giving zero or one object from the command line, this is
|
||||
equivalent to specifying an empty note message to
|
||||
the `edit` subcommand.
|
||||
+
|
||||
In `--stdin` mode, also remove the object names given on standard
|
||||
input. In other words, `--stdin` can be combined with object names from
|
||||
the command line.
|
||||
|
||||
`prune`::
|
||||
Remove all notes for non-existing/unreachable objects.
|
||||
|
@ -151,18 +144,26 @@ OPTIONS
|
|||
Use the given note message (instead of prompting).
|
||||
If multiple `-m` options are given, their values
|
||||
are concatenated as separate paragraphs.
|
||||
Lines starting with `#` and empty lines other than a
|
||||
single line between paragraphs will be stripped out.
|
||||
If you wish to keep them verbatim, use `--no-stripspace`.
|
||||
|
||||
`-F <file>`::
|
||||
`--file=<file>`::
|
||||
Take the note message from the given file. Use `-` to
|
||||
read the note message from the standard input.
|
||||
Lines starting with `#` and empty lines other than a
|
||||
single line between paragraphs will be stripped out.
|
||||
If you wish to keep them verbatim, use `--no-stripspace`.
|
||||
|
||||
`-C <object>`::
|
||||
`--reuse-message=<object>`::
|
||||
Take the given blob object (for example, another note) as the
|
||||
note message. (Use `git notes copy <object>` instead to
|
||||
copy notes between objects.) Implies `--no-stripspace` since
|
||||
the default behavior is to copy the message verbatim.
|
||||
copy notes between objects.). By default, message will be
|
||||
copied verbatim, but if you wish to strip out the lines
|
||||
starting with `#` and empty lines other than a single line
|
||||
between paragraphs, use with `--stripspace` option.
|
||||
|
||||
`-c <object>`::
|
||||
`--reedit-message=<object>`::
|
||||
|
@ -173,34 +174,21 @@ OPTIONS
|
|||
Allow an empty note object to be stored. The default behavior is
|
||||
to automatically remove empty notes.
|
||||
|
||||
`--[no-]separator`::
|
||||
`--separator=<paragraph-break>`::
|
||||
`--separator`::
|
||||
`--no-separator`::
|
||||
Specify a string used as a custom inter-paragraph separator
|
||||
(a newline is added at the end as needed). If `--no-separator`, no
|
||||
separators will be added between paragraphs. Defaults to a blank
|
||||
line.
|
||||
|
||||
`--stripspace`::
|
||||
`--no-stripspace`::
|
||||
Clean up whitespace. Specifically (see
|
||||
linkgit:git-stripspace[1]):
|
||||
+
|
||||
--
|
||||
- remove trailing whitespace from all lines
|
||||
- collapse multiple consecutive empty lines into one empty line
|
||||
- remove empty lines from the beginning and end of the input
|
||||
- add a missing `\n` to the last line if necessary.
|
||||
--
|
||||
+
|
||||
`--stripspace` is the default except for
|
||||
`-C`/`--reuse-message`. However, keep in mind that this depends on the
|
||||
order of similar options. For example, for `-C <object> -m<message>`,
|
||||
`--stripspace` will be used because the default for `-m` overrides the
|
||||
previous `-C`. This is a known limitation that may be fixed in the
|
||||
future.
|
||||
`--[no-]stripspace`::
|
||||
Strip leading and trailing whitespace from the note message.
|
||||
Also strip out empty lines other than a single line between
|
||||
paragraphs. Lines starting with `#` will be stripped out
|
||||
in non-editor cases like `-m`, `-F` and `-C`, but not in
|
||||
editor case like `git notes edit`, `-c`, etc.
|
||||
|
||||
`--ref=<ref>`::
|
||||
`--ref <ref>`::
|
||||
Manipulate the notes tree in _<ref>_. This overrides
|
||||
`GIT_NOTES_REF` and the `core.notesRef` configuration. The ref
|
||||
specifies the full refname when it begins with `refs/notes/`; when it
|
||||
|
@ -212,7 +200,9 @@ future.
|
|||
object that does not have notes attached to it.
|
||||
|
||||
`--stdin`::
|
||||
Only valid for `remove` and `copy`. See the respective subcommands.
|
||||
Also read the object names to remove notes from the standard
|
||||
input (there is no reason you cannot combine this with object
|
||||
names from the command line).
|
||||
|
||||
`-n`::
|
||||
`--dry-run`::
|
||||
|
|
|
@ -10,13 +10,13 @@ SYNOPSIS
|
|||
--------
|
||||
[verse]
|
||||
'git pack-objects' [-q | --progress | --all-progress] [--all-progress-implied]
|
||||
[--no-reuse-delta] [--delta-base-offset] [--non-empty]
|
||||
[--local] [--incremental] [--window=<n>] [--depth=<n>]
|
||||
[--revs [--unpacked | --all]] [--keep-pack=<pack-name>]
|
||||
[--cruft] [--cruft-expiration=<time>]
|
||||
[--stdout [--filter=<filter-spec>] | <base-name>]
|
||||
[--shallow] [--keep-true-parents] [--[no-]sparse]
|
||||
[--name-hash-version=<n>] [--path-walk] < <object-list>
|
||||
[--no-reuse-delta] [--delta-base-offset] [--non-empty]
|
||||
[--local] [--incremental] [--window=<n>] [--depth=<n>]
|
||||
[--revs [--unpacked | --all]] [--keep-pack=<pack-name>]
|
||||
[--cruft] [--cruft-expiration=<time>]
|
||||
[--stdout [--filter=<filter-spec>] | <base-name>]
|
||||
[--shallow] [--keep-true-parents] [--[no-]sparse]
|
||||
[--name-hash-version=<n>] < <object-list>
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -87,21 +87,13 @@ base-name::
|
|||
reference was included in the resulting packfile. This
|
||||
can be useful to send new tags to native Git clients.
|
||||
|
||||
--stdin-packs[=<mode>]::
|
||||
--stdin-packs::
|
||||
Read the basenames of packfiles (e.g., `pack-1234abcd.pack`)
|
||||
from the standard input, instead of object names or revision
|
||||
arguments. The resulting pack contains all objects listed in the
|
||||
included packs (those not beginning with `^`), excluding any
|
||||
objects listed in the excluded packs (beginning with `^`).
|
||||
+
|
||||
When `mode` is "follow", objects from packs not listed on stdin receive
|
||||
special treatment. Objects within unlisted packs will be included if
|
||||
those objects are (1) reachable from the included packs, and (2) not
|
||||
found in any excluded packs. This mode is useful, for example, to
|
||||
resurrect once-unreachable objects found in cruft packs to generate
|
||||
packs which are closed under reachability up to the boundary set by the
|
||||
excluded packs.
|
||||
+
|
||||
Incompatible with `--revs`, or options that imply `--revs` (such as
|
||||
`--all`), with the exception of `--unpacked`, which is compatible.
|
||||
|
||||
|
@ -383,17 +375,6 @@ many different directories. At the moment, this version is not allowed
|
|||
when writing reachability bitmap files with `--write-bitmap-index` and it
|
||||
will be automatically changed to version `1`.
|
||||
|
||||
--path-walk::
|
||||
Perform compression by first organizing objects by path, then a
|
||||
second pass that compresses across paths as normal. This has the
|
||||
potential to improve delta compression especially in the presence
|
||||
of filenames that cause collisions in Git's default name-hash
|
||||
algorithm.
|
||||
+
|
||||
Incompatible with `--delta-islands`, `--shallow`, or `--filter`. The
|
||||
`--use-bitmap-index` option will be ignored in the presence of
|
||||
`--path-walk.`
|
||||
|
||||
|
||||
DELTA ISLANDS
|
||||
-------------
|
||||
|
|
|
@ -66,10 +66,7 @@ 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": Loose references are packed into the `packed-refs` file
|
||||
based on the ratio of loose references to the size of the
|
||||
`packed-refs` file. The bigger the `packed-refs` file, the more loose
|
||||
references need to exist before we repack.
|
||||
- "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
|
||||
|
|
|
@ -11,7 +11,7 @@ SYNOPSIS
|
|||
[verse]
|
||||
'git repack' [-a] [-A] [-d] [-f] [-F] [-l] [-n] [-q] [-b] [-m]
|
||||
[--window=<n>] [--depth=<n>] [--threads=<n>] [--keep-pack=<pack-name>]
|
||||
[--write-midx] [--name-hash-version=<n>] [--path-walk]
|
||||
[--write-midx] [--name-hash-version=<n>]
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
|
@ -258,9 +258,6 @@ linkgit:git-multi-pack-index[1]).
|
|||
Provide this argument to the underlying `git pack-objects` process.
|
||||
See linkgit:git-pack-objects[1] for full details.
|
||||
|
||||
--path-walk::
|
||||
Pass the `--path-walk` option to the underlying `git pack-objects`
|
||||
process. See linkgit:git-pack-objects[1] for full details.
|
||||
|
||||
CONFIGURATION
|
||||
-------------
|
||||
|
|
|
@ -21,7 +21,7 @@ Takes the patches given on the command line and emails them out.
|
|||
Patches can be specified as files, directories (which will send all
|
||||
files in the directory), or directly as a revision list. In the
|
||||
last case, any format accepted by linkgit:git-format-patch[1] can
|
||||
be passed to `git send-email`, as well as options understood by
|
||||
be passed to git send-email, as well as options understood by
|
||||
linkgit:git-format-patch[1].
|
||||
|
||||
The header of the email is configurable via command-line options. If not
|
||||
|
@ -35,11 +35,11 @@ There are two formats accepted for patch files:
|
|||
This is what linkgit:git-format-patch[1] generates. Most headers and MIME
|
||||
formatting are ignored.
|
||||
|
||||
2. The original format used by Greg Kroah-Hartman's `send_lots_of_email.pl`
|
||||
2. The original format used by Greg Kroah-Hartman's 'send_lots_of_email.pl'
|
||||
script
|
||||
+
|
||||
This format expects the first line of the file to contain the `Cc:` value
|
||||
and the `Subject:` of the message as the second line.
|
||||
This format expects the first line of the file to contain the "Cc:" value
|
||||
and the "Subject:" of the message as the second line.
|
||||
|
||||
|
||||
OPTIONS
|
||||
|
@ -54,13 +54,13 @@ Composing
|
|||
`sendemail.multiEdit`.
|
||||
|
||||
--bcc=<address>,...::
|
||||
Specify a `Bcc:` value for each email. Default is the value of
|
||||
Specify a "Bcc:" value for each email. Default is the value of
|
||||
`sendemail.bcc`.
|
||||
+
|
||||
This option may be specified multiple times.
|
||||
|
||||
--cc=<address>,...::
|
||||
Specify a starting `Cc:` value for each email.
|
||||
Specify a starting "Cc:" value for each email.
|
||||
Default is the value of `sendemail.cc`.
|
||||
+
|
||||
This option may be specified multiple times.
|
||||
|
@ -69,14 +69,14 @@ This option may be specified multiple times.
|
|||
Invoke a text editor (see GIT_EDITOR in linkgit:git-var[1])
|
||||
to edit an introductory message for the patch series.
|
||||
+
|
||||
When `--compose` is used, `git send-email` will use the `From`, `To`, `Cc`,
|
||||
`Bcc`, `Subject`, `Reply-To`, and `In-Reply-To` headers specified in the
|
||||
message. If the body of the message (what you type after the headers and a
|
||||
blank line) only contains blank (or `Git:` prefixed) lines, the summary won't be
|
||||
When `--compose` is used, git send-email will use the From, To, Cc, Bcc,
|
||||
Subject, Reply-To, and In-Reply-To headers specified in the message. If
|
||||
the body of the message (what you type after the headers and a blank
|
||||
line) only contains blank (or Git: prefixed) lines, the summary won't be
|
||||
sent, but the headers mentioned above will be used unless they are
|
||||
removed.
|
||||
+
|
||||
Missing `From` or `In-Reply-To` headers will be prompted for.
|
||||
Missing From or In-Reply-To headers will be prompted for.
|
||||
+
|
||||
See the CONFIGURATION section for `sendemail.multiEdit`.
|
||||
|
||||
|
@ -85,13 +85,13 @@ See the CONFIGURATION section for `sendemail.multiEdit`.
|
|||
the value of the `sendemail.from` configuration option is used. If
|
||||
neither the command-line option nor `sendemail.from` are set, then the
|
||||
user will be prompted for the value. The default for the prompt will be
|
||||
the value of `GIT_AUTHOR_IDENT`, or `GIT_COMMITTER_IDENT` if that is not
|
||||
set, as returned by `git var -l`.
|
||||
the value of GIT_AUTHOR_IDENT, or GIT_COMMITTER_IDENT if that is not
|
||||
set, as returned by "git var -l".
|
||||
|
||||
--reply-to=<address>::
|
||||
Specify the address where replies from recipients should go to.
|
||||
Use this if replies to messages should go to another address than what
|
||||
is specified with the `--from` parameter.
|
||||
is specified with the --from parameter.
|
||||
|
||||
--in-reply-to=<identifier>::
|
||||
Make the first mail (or all the mails with `--no-thread`) appear as a
|
||||
|
@ -112,14 +112,14 @@ illustration below where `[PATCH v2 0/3]` is in reply to `[PATCH 0/2]`:
|
|||
[PATCH v2 2/3] New tests
|
||||
[PATCH v2 3/3] Implementation
|
||||
+
|
||||
Only necessary if `--compose` is also set. If `--compose`
|
||||
Only necessary if --compose is also set. If --compose
|
||||
is not set, this will be prompted for.
|
||||
|
||||
--[no-]outlook-id-fix::
|
||||
Microsoft Outlook SMTP servers discard the Message-ID sent via email and
|
||||
assign a new random Message-ID, thus breaking threads.
|
||||
+
|
||||
With `--outlook-id-fix`, `git send-email` uses a mechanism specific to
|
||||
With `--outlook-id-fix`, 'git send-email' uses a mechanism specific to
|
||||
Outlook servers to learn the Message-ID the server assigned to fix the
|
||||
threading. Use it only when you know that the server reports the
|
||||
rewritten Message-ID the same way as Outlook servers do.
|
||||
|
@ -130,14 +130,14 @@ to 'smtp.office365.com' or 'smtp-mail.outlook.com'. Use
|
|||
|
||||
--subject=<string>::
|
||||
Specify the initial subject of the email thread.
|
||||
Only necessary if `--compose` is also set. If `--compose`
|
||||
Only necessary if --compose is also set. If --compose
|
||||
is not set, this will be prompted for.
|
||||
|
||||
--to=<address>,...::
|
||||
Specify the primary recipient of the emails generated. Generally, this
|
||||
will be the upstream maintainer of the project involved. Default is the
|
||||
value of the `sendemail.to` configuration value; if that is unspecified,
|
||||
and `--to-cmd` is not specified, this will be prompted for.
|
||||
and --to-cmd is not specified, this will be prompted for.
|
||||
+
|
||||
This option may be specified multiple times.
|
||||
|
||||
|
@ -145,30 +145,30 @@ This option may be specified multiple times.
|
|||
When encountering a non-ASCII message or subject that does not
|
||||
declare its encoding, add headers/quoting to indicate it is
|
||||
encoded in <encoding>. Default is the value of the
|
||||
`sendemail.assume8bitEncoding`; if that is unspecified, this
|
||||
'sendemail.assume8bitEncoding'; if that is unspecified, this
|
||||
will be prompted for if any non-ASCII files are encountered.
|
||||
+
|
||||
Note that no attempts whatsoever are made to validate the encoding.
|
||||
|
||||
--compose-encoding=<encoding>::
|
||||
Specify encoding of compose message. Default is the value of the
|
||||
`sendemail.composeEncoding`; if that is unspecified, UTF-8 is assumed.
|
||||
'sendemail.composeEncoding'; if that is unspecified, UTF-8 is assumed.
|
||||
|
||||
--transfer-encoding=(7bit|8bit|quoted-printable|base64|auto)::
|
||||
Specify the transfer encoding to be used to send the message over SMTP.
|
||||
`7bit` will fail upon encountering a non-ASCII message. `quoted-printable`
|
||||
7bit will fail upon encountering a non-ASCII message. quoted-printable
|
||||
can be useful when the repository contains files that contain carriage
|
||||
returns, but makes the raw patch email file (as saved from an MUA) much
|
||||
harder to inspect manually. `base64` is even more fool proof, but also
|
||||
even more opaque. `auto` will use `8bit` when possible, and
|
||||
`quoted-printable` otherwise.
|
||||
returns, but makes the raw patch email file (as saved from a MUA) much
|
||||
harder to inspect manually. base64 is even more fool proof, but also
|
||||
even more opaque. auto will use 8bit when possible, and quoted-printable
|
||||
otherwise.
|
||||
+
|
||||
Default is the value of the `sendemail.transferEncoding` configuration
|
||||
value; if that is unspecified, default to `auto`.
|
||||
|
||||
--xmailer::
|
||||
--no-xmailer::
|
||||
Add (or prevent adding) the `X-Mailer:` header. By default,
|
||||
Add (or prevent adding) the "X-Mailer:" header. By default,
|
||||
the header is added, but it can be turned off by setting the
|
||||
`sendemail.xmailer` configuration variable to `false`.
|
||||
|
||||
|
@ -178,9 +178,9 @@ Sending
|
|||
--envelope-sender=<address>::
|
||||
Specify the envelope sender used to send the emails.
|
||||
This is useful if your default address is not the address that is
|
||||
subscribed to a list. In order to use the `From` address, set the
|
||||
value to `auto`. If you use the `sendmail` binary, you must have
|
||||
suitable privileges for the `-f` parameter. Default is the value of the
|
||||
subscribed to a list. In order to use the 'From' address, set the
|
||||
value to "auto". If you use the sendmail binary, you must have
|
||||
suitable privileges for the -f parameter. Default is the value of the
|
||||
`sendemail.envelopeSender` configuration variable; if that is
|
||||
unspecified, choosing the envelope sender is left to your MTA.
|
||||
|
||||
|
@ -189,27 +189,27 @@ Sending
|
|||
be sendmail-like; specifically, it must support the `-i` option.
|
||||
The command will be executed in the shell if necessary. Default
|
||||
is the value of `sendemail.sendmailCmd`. If unspecified, and if
|
||||
`--smtp-server` is also unspecified, `git send-email` will search
|
||||
for `sendmail` in `/usr/sbin`, `/usr/lib` and `$PATH`.
|
||||
--smtp-server is also unspecified, git-send-email will search
|
||||
for `sendmail` in `/usr/sbin`, `/usr/lib` and $PATH.
|
||||
|
||||
--smtp-encryption=<encryption>::
|
||||
Specify in what way encrypting begins for the SMTP connection.
|
||||
Valid values are `ssl` and `tls`. Any other value reverts to plain
|
||||
Valid values are 'ssl' and 'tls'. Any other value reverts to plain
|
||||
(unencrypted) SMTP, which defaults to port 25.
|
||||
Despite the names, both values will use the same newer version of TLS,
|
||||
but for historic reasons have these names. `ssl` refers to "implicit"
|
||||
but for historic reasons have these names. 'ssl' refers to "implicit"
|
||||
encryption (sometimes called SMTPS), that uses port 465 by default.
|
||||
`tls` refers to "explicit" encryption (often known as STARTTLS),
|
||||
'tls' refers to "explicit" encryption (often known as STARTTLS),
|
||||
that uses port 25 by default. Other ports might be used by the SMTP
|
||||
server, which are not the default. Commonly found alternative port for
|
||||
`tls` and unencrypted is 587. You need to check your provider's
|
||||
'tls' and unencrypted is 587. You need to check your provider's
|
||||
documentation or your server configuration to make sure
|
||||
for your own case. Default is the value of `sendemail.smtpEncryption`.
|
||||
|
||||
--smtp-domain=<FQDN>::
|
||||
Specifies the Fully Qualified Domain Name (FQDN) used in the
|
||||
HELO/EHLO command to the SMTP server. Some servers require the
|
||||
FQDN to match your IP address. If not set, `git send-email` attempts
|
||||
FQDN to match your IP address. If not set, git send-email attempts
|
||||
to determine your FQDN automatically. Default is the value of
|
||||
`sendemail.smtpDomain`.
|
||||
|
||||
|
@ -223,10 +223,10 @@ $ git send-email --smtp-auth="PLAIN LOGIN GSSAPI" ...
|
|||
+
|
||||
If at least one of the specified mechanisms matches the ones advertised by the
|
||||
SMTP server and if it is supported by the utilized SASL library, the mechanism
|
||||
is used for authentication. If neither `sendemail.smtpAuth` nor `--smtp-auth`
|
||||
is used for authentication. If neither 'sendemail.smtpAuth' nor `--smtp-auth`
|
||||
is specified, all mechanisms supported by the SASL library can be used. The
|
||||
special value `none` maybe specified to completely disable authentication
|
||||
independently of `--smtp-user`.
|
||||
special value 'none' maybe specified to completely disable authentication
|
||||
independently of `--smtp-user`
|
||||
|
||||
--smtp-pass[=<password>]::
|
||||
Password for SMTP-AUTH. The argument is optional: If no
|
||||
|
@ -238,16 +238,16 @@ Furthermore, passwords need not be specified in configuration files
|
|||
or on the command line. If a username has been specified (with
|
||||
`--smtp-user` or a `sendemail.smtpUser`), but no password has been
|
||||
specified (with `--smtp-pass` or `sendemail.smtpPass`), then
|
||||
a password is obtained using linkgit:git-credential[1].
|
||||
a password is obtained using 'git-credential'.
|
||||
|
||||
--no-smtp-auth::
|
||||
Disable SMTP authentication. Short hand for `--smtp-auth=none`.
|
||||
Disable SMTP authentication. Short hand for `--smtp-auth=none`
|
||||
|
||||
--smtp-server=<host>::
|
||||
If set, specifies the outgoing SMTP server to use (e.g.
|
||||
`smtp.example.com` or a raw IP address). If unspecified, and if
|
||||
`--sendmail-cmd` is also unspecified, the default is to search
|
||||
for `sendmail` in `/usr/sbin`, `/usr/lib` and `$PATH` if such a
|
||||
for `sendmail` in `/usr/sbin`, `/usr/lib` and $PATH if such a
|
||||
program is available, falling back to `localhost` otherwise.
|
||||
+
|
||||
For backward compatibility, this option can also specify a full pathname
|
||||
|
@ -260,7 +260,7 @@ instead.
|
|||
Specifies a port different from the default port (SMTP
|
||||
servers typically listen to smtp port 25, but may also listen to
|
||||
submission port 587, or the common SSL smtp port 465);
|
||||
symbolic port names (e.g. `submission` instead of 587)
|
||||
symbolic port names (e.g. "submission" instead of 587)
|
||||
are also accepted. The port can also be set with the
|
||||
`sendemail.smtpServerPort` configuration variable.
|
||||
|
||||
|
@ -269,25 +269,23 @@ instead.
|
|||
Default value can be specified by the `sendemail.smtpServerOption`
|
||||
configuration option.
|
||||
+
|
||||
The `--smtp-server-option` option must be repeated for each option you want
|
||||
The --smtp-server-option option must be repeated for each option you want
|
||||
to pass to the server. Likewise, different lines in the configuration files
|
||||
must be used for each option.
|
||||
|
||||
--smtp-ssl::
|
||||
Legacy alias for `--smtp-encryption ssl`.
|
||||
Legacy alias for '--smtp-encryption ssl'.
|
||||
|
||||
--smtp-ssl-cert-path::
|
||||
Path to a store of trusted CA certificates for SMTP SSL/TLS
|
||||
certificate validation (either a directory that has been processed
|
||||
by `c_rehash`, or a single file containing one or more PEM format
|
||||
certificates concatenated together: see the description of the
|
||||
`-CAfile` _<file>_ and the `-CApath` _<dir>_ options of
|
||||
https://docs.openssl.org/master/man1/openssl-verify/
|
||||
[OpenSSL's verify(1) manual page] for more information on these).
|
||||
Set it to an empty string to disable certificate verification.
|
||||
Defaults to the value of the `sendemail.smtpSSLCertPath` configuration
|
||||
variable, if set, or the backing SSL library's compiled-in default
|
||||
otherwise (which should be the best choice on most platforms).
|
||||
by 'c_rehash', or a single file containing one or more PEM format
|
||||
certificates concatenated together: see verify(1) -CAfile and
|
||||
-CApath for more information on these). Set it to an empty string
|
||||
to disable certificate verification. Defaults to the value of the
|
||||
`sendemail.smtpSSLCertPath` configuration variable, if set, or the
|
||||
backing SSL library's compiled-in default otherwise (which should
|
||||
be the best choice on most platforms).
|
||||
|
||||
--smtp-user=<user>::
|
||||
Username for SMTP-AUTH. Default is the value of `sendemail.smtpUser`;
|
||||
|
@ -300,18 +298,18 @@ must be used for each option.
|
|||
connection and authentication problems.
|
||||
|
||||
--batch-size=<num>::
|
||||
Some email servers (e.g. 'smtp.163.com') limit the number of emails to be
|
||||
Some email servers (e.g. smtp.163.com) limit the number emails to be
|
||||
sent per session (connection) and this will lead to a failure when
|
||||
sending many messages. With this option, send-email will disconnect after
|
||||
sending _<num>_ messages and wait for a few seconds
|
||||
(see `--relogin-delay`) and reconnect, to work around such a limit.
|
||||
You may want to use some form of credential helper to avoid having to
|
||||
retype your password every time this happens. Defaults to the
|
||||
sending $<num> messages and wait for a few seconds (see --relogin-delay)
|
||||
and reconnect, to work around such a limit. You may want to
|
||||
use some form of credential helper to avoid having to retype
|
||||
your password every time this happens. Defaults to the
|
||||
`sendemail.smtpBatchSize` configuration variable.
|
||||
|
||||
--relogin-delay=<int>::
|
||||
Waiting _<int>_ seconds before reconnecting to SMTP server. Used together
|
||||
with `--batch-size` option. Defaults to the `sendemail.smtpReloginDelay`
|
||||
Waiting $<int> seconds before reconnecting to SMTP server. Used together
|
||||
with --batch-size option. Defaults to the `sendemail.smtpReloginDelay`
|
||||
configuration variable.
|
||||
|
||||
Automating
|
||||
|
@ -320,7 +318,7 @@ Automating
|
|||
--no-to::
|
||||
--no-cc::
|
||||
--no-bcc::
|
||||
Clears any list of `To:`, `Cc:`, `Bcc:` addresses previously
|
||||
Clears any list of "To:", "Cc:", "Bcc:" addresses previously
|
||||
set via config.
|
||||
|
||||
--no-identity::
|
||||
|
@ -329,13 +327,13 @@ Automating
|
|||
|
||||
--to-cmd=<command>::
|
||||
Specify a command to execute once per patch file which
|
||||
should generate patch file specific `To:` entries.
|
||||
should generate patch file specific "To:" entries.
|
||||
Output of this command must be single email address per line.
|
||||
Default is the value of `sendemail.toCmd` configuration value.
|
||||
Default is the value of 'sendemail.toCmd' configuration value.
|
||||
|
||||
--cc-cmd=<command>::
|
||||
Specify a command to execute once per patch file which
|
||||
should generate patch file specific `Cc:` entries.
|
||||
should generate patch file specific "Cc:" entries.
|
||||
Output of this command must be single email address per line.
|
||||
Default is the value of `sendemail.ccCmd` configuration value.
|
||||
|
||||
|
@ -343,7 +341,7 @@ Automating
|
|||
Specify a command that is executed once per outgoing message
|
||||
and output RFC 2822 style header lines to be inserted into
|
||||
them. When the `sendemail.headerCmd` configuration variable is
|
||||
set, its value is always used. When `--header-cmd` is provided
|
||||
set, its value is always used. When --header-cmd is provided
|
||||
at the command line, its value takes precedence over the
|
||||
`sendemail.headerCmd` configuration variable.
|
||||
|
||||
|
@ -352,7 +350,7 @@ Automating
|
|||
|
||||
--[no-]chain-reply-to::
|
||||
If this is set, each email will be sent as a reply to the previous
|
||||
email sent. If disabled with `--no-chain-reply-to`, all emails after
|
||||
email sent. If disabled with "--no-chain-reply-to", all emails after
|
||||
the first will be sent as replies to the first email sent. When using
|
||||
this, it is recommended that the first file given be an overview of the
|
||||
entire patch series. Disabled by default, but the `sendemail.chainReplyTo`
|
||||
|
@ -360,80 +358,79 @@ Automating
|
|||
|
||||
--identity=<identity>::
|
||||
A configuration identity. When given, causes values in the
|
||||
`sendemail.<identity>` subsection to take precedence over
|
||||
values in the `sendemail` section. The default identity is
|
||||
'sendemail.<identity>' subsection to take precedence over
|
||||
values in the 'sendemail' section. The default identity is
|
||||
the value of `sendemail.identity`.
|
||||
|
||||
--[no-]signed-off-by-cc::
|
||||
If this is set, add emails found in the `Signed-off-by` trailer or `Cc:`
|
||||
lines to the cc list. Default is the value of `sendemail.signedOffByCc`
|
||||
configuration value; if that is unspecified, default to
|
||||
`--signed-off-by-cc`.
|
||||
If this is set, add emails found in the `Signed-off-by` trailer or Cc: lines to the
|
||||
cc list. Default is the value of `sendemail.signedOffByCc` configuration
|
||||
value; if that is unspecified, default to --signed-off-by-cc.
|
||||
|
||||
--[no-]cc-cover::
|
||||
If this is set, emails found in `Cc:` headers in the first patch of
|
||||
If this is set, emails found in Cc: headers in the first patch of
|
||||
the series (typically the cover letter) are added to the cc list
|
||||
for each email set. Default is the value of `sendemail.ccCover`
|
||||
configuration value; if that is unspecified, default to `--no-cc-cover`.
|
||||
for each email set. Default is the value of 'sendemail.ccCover'
|
||||
configuration value; if that is unspecified, default to --no-cc-cover.
|
||||
|
||||
--[no-]to-cover::
|
||||
If this is set, emails found in `To:` headers in the first patch of
|
||||
If this is set, emails found in To: headers in the first patch of
|
||||
the series (typically the cover letter) are added to the to list
|
||||
for each email set. Default is the value of `sendemail.toCover`
|
||||
configuration value; if that is unspecified, default to `--no-to-cover`.
|
||||
for each email set. Default is the value of 'sendemail.toCover'
|
||||
configuration value; if that is unspecified, default to --no-to-cover.
|
||||
|
||||
--suppress-cc=<category>::
|
||||
Specify an additional category of recipients to suppress the
|
||||
auto-cc of:
|
||||
+
|
||||
--
|
||||
- `author` will avoid including the patch author.
|
||||
- `self` will avoid including the sender.
|
||||
- `cc` will avoid including anyone mentioned in Cc lines in the patch header
|
||||
except for self (use `self` for that).
|
||||
- `bodycc` will avoid including anyone mentioned in Cc lines in the
|
||||
patch body (commit message) except for self (use `self` for that).
|
||||
- `sob` will avoid including anyone mentioned in the Signed-off-by trailers except
|
||||
for self (use `self` for that).
|
||||
- `misc-by` will avoid including anyone mentioned in Acked-by,
|
||||
- 'author' will avoid including the patch author.
|
||||
- 'self' will avoid including the sender.
|
||||
- 'cc' will avoid including anyone mentioned in Cc lines in the patch header
|
||||
except for self (use 'self' for that).
|
||||
- 'bodycc' will avoid including anyone mentioned in Cc lines in the
|
||||
patch body (commit message) except for self (use 'self' for that).
|
||||
- 'sob' will avoid including anyone mentioned in the Signed-off-by trailers except
|
||||
for self (use 'self' for that).
|
||||
- 'misc-by' will avoid including anyone mentioned in Acked-by,
|
||||
Reviewed-by, Tested-by and other "-by" lines in the patch body,
|
||||
except Signed-off-by (use `sob` for that).
|
||||
- `cccmd` will avoid running the --cc-cmd.
|
||||
- `body` is equivalent to `sob` + `bodycc` + `misc-by`.
|
||||
- `all` will suppress all auto cc values.
|
||||
except Signed-off-by (use 'sob' for that).
|
||||
- 'cccmd' will avoid running the --cc-cmd.
|
||||
- 'body' is equivalent to 'sob' + 'bodycc' + 'misc-by'.
|
||||
- 'all' will suppress all auto cc values.
|
||||
--
|
||||
+
|
||||
Default is the value of `sendemail.suppressCc` configuration value; if
|
||||
that is unspecified, default to `self` if `--suppress-from` is
|
||||
specified, as well as `body` if `--no-signed-off-cc` is specified.
|
||||
that is unspecified, default to 'self' if --suppress-from is
|
||||
specified, as well as 'body' if --no-signed-off-cc is specified.
|
||||
|
||||
--[no-]suppress-from::
|
||||
If this is set, do not add the `From:` address to the `Cc:` list.
|
||||
If this is set, do not add the From: address to the cc: list.
|
||||
Default is the value of `sendemail.suppressFrom` configuration
|
||||
value; if that is unspecified, default to `--no-suppress-from`.
|
||||
value; if that is unspecified, default to --no-suppress-from.
|
||||
|
||||
--[no-]thread::
|
||||
If this is set, the `In-Reply-To` and `References` headers will be
|
||||
If this is set, the In-Reply-To and References headers will be
|
||||
added to each email sent. Whether each mail refers to the
|
||||
previous email (`deep` threading per `git format-patch`
|
||||
previous email (`deep` threading per 'git format-patch'
|
||||
wording) or to the first email (`shallow` threading) is
|
||||
governed by `--[no-]chain-reply-to`.
|
||||
governed by "--[no-]chain-reply-to".
|
||||
+
|
||||
If disabled with `--no-thread`, those headers will not be added
|
||||
(unless specified with `--in-reply-to`). Default is the value of the
|
||||
If disabled with "--no-thread", those headers will not be added
|
||||
(unless specified with --in-reply-to). Default is the value of the
|
||||
`sendemail.thread` configuration value; if that is unspecified,
|
||||
default to `--thread`.
|
||||
default to --thread.
|
||||
+
|
||||
It is up to the user to ensure that no In-Reply-To header already
|
||||
exists when `git send-email` is asked to add it (especially note that
|
||||
`git format-patch` can be configured to do the threading itself).
|
||||
exists when 'git send-email' is asked to add it (especially note that
|
||||
'git format-patch' can be configured to do the threading itself).
|
||||
Failure to do so may not produce the expected result in the
|
||||
recipient's MUA.
|
||||
|
||||
--[no-]mailmap::
|
||||
Use the mailmap file (see linkgit:gitmailmap[5]) to map all
|
||||
addresses to their canonical real name and email address. Additional
|
||||
mailmap data specific to `git send-email` may be provided using the
|
||||
mailmap data specific to git-send-email may be provided using the
|
||||
`sendemail.mailmap.file` or `sendemail.mailmap.blob` configuration
|
||||
values. Defaults to `sendemail.mailmap`.
|
||||
|
||||
|
@ -444,17 +441,17 @@ Administering
|
|||
Confirm just before sending:
|
||||
+
|
||||
--
|
||||
- `always` will always confirm before sending.
|
||||
- `never` will never confirm before sending.
|
||||
- `cc` will confirm before sending when send-email has automatically
|
||||
added addresses from the patch to the Cc list.
|
||||
- `compose` will confirm before sending the first message when using --compose.
|
||||
- `auto` is equivalent to `cc` + `compose`.
|
||||
- 'always' will always confirm before sending
|
||||
- 'never' will never confirm before sending
|
||||
- 'cc' will confirm before sending when send-email has automatically
|
||||
added addresses from the patch to the Cc list
|
||||
- 'compose' will confirm before sending the first message when using --compose.
|
||||
- 'auto' is equivalent to 'cc' + 'compose'
|
||||
--
|
||||
+
|
||||
Default is the value of `sendemail.confirm` configuration value; if that
|
||||
is unspecified, default to `auto` unless any of the suppress options
|
||||
have been specified, in which case default to `compose`.
|
||||
is unspecified, default to 'auto' unless any of the suppress options
|
||||
have been specified, in which case default to 'compose'.
|
||||
|
||||
--dry-run::
|
||||
Do everything except actually send the emails.
|
||||
|
@ -463,10 +460,10 @@ have been specified, in which case default to `compose`.
|
|||
When an argument may be understood either as a reference or as a file name,
|
||||
choose to understand it as a format-patch argument (`--format-patch`)
|
||||
or as a file name (`--no-format-patch`). By default, when such a conflict
|
||||
occurs, `git send-email` will fail.
|
||||
occurs, git send-email will fail.
|
||||
|
||||
--quiet::
|
||||
Make `git send-email` less verbose. One line per email should be
|
||||
Make git-send-email less verbose. One line per email should be
|
||||
all that is output.
|
||||
|
||||
--[no-]validate::
|
||||
|
@ -477,7 +474,7 @@ have been specified, in which case default to `compose`.
|
|||
* Invoke the sendemail-validate hook if present (see linkgit:githooks[5]).
|
||||
* Warn of patches that contain lines longer than
|
||||
998 characters unless a suitable transfer encoding
|
||||
(`auto`, `base64`, or `quoted-printable`) is used;
|
||||
('auto', 'base64', or 'quoted-printable') is used;
|
||||
this is due to SMTP limits as described by
|
||||
https://www.ietf.org/rfc/rfc5322.txt.
|
||||
--
|
||||
|
@ -496,13 +493,13 @@ Information
|
|||
Instead of the normal operation, dump the shorthand alias names from
|
||||
the configured alias file(s), one per line in alphabetical order. Note
|
||||
that this only includes the alias name and not its expanded email addresses.
|
||||
See `sendemail.aliasesFile` for more information about aliases.
|
||||
See 'sendemail.aliasesFile' for more information about aliases.
|
||||
|
||||
--translate-aliases::
|
||||
Instead of the normal operation, read from standard input and
|
||||
interpret each line as an email alias. Translate it according to the
|
||||
configured alias file(s). Output each translated name and email
|
||||
address to standard output, one per line. See `sendemail.aliasFile`
|
||||
address to standard output, one per line. See 'sendemail.aliasFile'
|
||||
for more information about aliases.
|
||||
|
||||
CONFIGURATION
|
||||
|
@ -527,18 +524,15 @@ edit `~/.gitconfig` to specify your account settings:
|
|||
smtpServerPort = 587
|
||||
----
|
||||
|
||||
Gmail does not allow using your regular password for `git send-email`.
|
||||
If you have multi-factor authentication set up on your Gmail account, you can
|
||||
generate an app-specific password for use with `git send-email`. Visit
|
||||
generate an app-specific password for use with 'git send-email'. Visit
|
||||
https://security.google.com/settings/security/apppasswords to create it.
|
||||
|
||||
Alternatively, instead of using an app-specific password, you can use
|
||||
OAuth2.0 authentication with Gmail. OAuth2.0 is more secure than
|
||||
app-specific passwords, and works regardless of whether you have multi-factor
|
||||
authentication set up. `OAUTHBEARER` and `XOAUTH2` are common mechanisms used
|
||||
for this type of authentication. Gmail supports both of them. As an example,
|
||||
if you want to use `OAUTHBEARER`, edit your `~/.gitconfig` file and add
|
||||
`smtpAuth = OAUTHBEARER` to your account settings:
|
||||
You can also use OAuth2.0 authentication with Gmail. `OAUTHBEARER` and
|
||||
`XOAUTH2` are common methods used for this type of authentication. Gmail
|
||||
supports both of them. As an example, if you want to use `OAUTHBEARER`, edit
|
||||
your `~/.gitconfig` file and add `smtpAuth = OAUTHBEARER` to your account
|
||||
settings:
|
||||
|
||||
----
|
||||
[sendemail]
|
||||
|
@ -549,15 +543,11 @@ if you want to use `OAUTHBEARER`, edit your `~/.gitconfig` file and add
|
|||
smtpAuth = OAUTHBEARER
|
||||
----
|
||||
|
||||
Another alternative is using a tool developed by Google known as
|
||||
https://github.com/google/gmail-oauth2-tools/tree/master/go/sendgmail[sendgmail]
|
||||
to send emails using `git send-email`.
|
||||
|
||||
Use Microsoft Outlook as the SMTP Server
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Unlike Gmail, Microsoft Outlook no longer supports app-specific passwords.
|
||||
Therefore, OAuth2.0 authentication must be used for Outlook. Also, it only
|
||||
supports `XOAUTH2` authentication mechanism.
|
||||
supports `XOAUTH2` authentication method.
|
||||
|
||||
Edit `~/.gitconfig` to specify your account settings for Outlook and use its
|
||||
SMTP server with `git send-email`:
|
||||
|
@ -589,7 +579,8 @@ next time.
|
|||
|
||||
If you are using OAuth2.0 authentication, you need to use an access token in
|
||||
place of a password when prompted. Various OAuth2.0 token generators are
|
||||
available online. Community maintained credential helpers are also available:
|
||||
available online. Community maintained credential helpers for Gmail and Outlook
|
||||
are also available:
|
||||
|
||||
- https://github.com/AdityaGarg8/git-credential-email[git-credential-gmail]
|
||||
(cross platform, dedicated helper for authenticating Gmail accounts)
|
||||
|
@ -597,65 +588,15 @@ available online. Community maintained credential helpers are also available:
|
|||
- https://github.com/AdityaGarg8/git-credential-email[git-credential-outlook]
|
||||
(cross platform, dedicated helper for authenticating Microsoft Outlook accounts)
|
||||
|
||||
- https://github.com/AdityaGarg8/git-credential-email[git-credential-yahoo]
|
||||
(cross platform, dedicated helper for authenticating Yahoo accounts)
|
||||
|
||||
- https://github.com/AdityaGarg8/git-credential-email[git-credential-aol]
|
||||
(cross platform, dedicated helper for authenticating AOL accounts)
|
||||
|
||||
You can also see linkgit:gitcredentials[7] for more OAuth based authentication
|
||||
helpers.
|
||||
|
||||
Proton Mail does not provide an SMTP server to send emails. If you are a paid
|
||||
customer of Proton Mail, you can use
|
||||
https://proton.me/mail/bridge[Proton Mail Bridge]
|
||||
officially provided by Proton Mail to create a local SMTP server for sending
|
||||
emails. For both free and paid users, community maintained projects like
|
||||
https://github.com/AdityaGarg8/git-credential-email[git-protonmail] can be
|
||||
used.
|
||||
|
||||
Note: the following core Perl modules that may be installed with your
|
||||
distribution of Perl are required:
|
||||
|
||||
https://metacpan.org/pod/MIME::Base64[MIME::Base64],
|
||||
https://metacpan.org/pod/MIME::QuotedPrint[MIME::QuotedPrint],
|
||||
https://metacpan.org/pod/Net::Domain[Net::Domain] and
|
||||
https://metacpan.org/pod/Net::SMTP[Net::SMTP].
|
||||
|
||||
MIME::Base64, MIME::QuotedPrint, Net::Domain and Net::SMTP.
|
||||
These additional Perl modules are also required:
|
||||
Authen::SASL and Mail::Address.
|
||||
|
||||
https://metacpan.org/pod/Authen::SASL[Authen::SASL] and
|
||||
https://metacpan.org/pod/Mail::Address[Mail::Address].
|
||||
|
||||
Exploiting the `sendmailCmd` option of `git send-email`
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Apart from sending emails via an SMTP server, `git send-email` can also send
|
||||
emails through any application that supports sendmail-like commands. You can
|
||||
read documentation of `--sendmail-cmd=<command>` above for more information.
|
||||
This ability can be very useful if you want to use another application as an
|
||||
SMTP client for `git send-email`, or if your email provider uses proprietary
|
||||
APIs instead of SMTP to send emails.
|
||||
|
||||
As an example, lets see how to configure https://marlam.de/msmtp/[msmtp], a
|
||||
popular SMTP client found in many Linux distributions. Edit `~/.gitconfig`
|
||||
to instruct `git-send-email` to use it for sending emails.
|
||||
|
||||
----
|
||||
[sendemail]
|
||||
sendmailCmd = /usr/bin/msmtp # Change this to the path where msmtp is installed
|
||||
----
|
||||
|
||||
Links of a few such community maintained helpers are:
|
||||
|
||||
- https://marlam.de/msmtp/[msmtp]
|
||||
(popular SMTP client with many features, available for Linux and macOS)
|
||||
|
||||
- https://github.com/AdityaGarg8/git-credential-email[git-protonmail]
|
||||
(cross platform client that can send emails using the ProtonMail API)
|
||||
|
||||
- https://github.com/AdityaGarg8/git-credential-email[git-msgraph]
|
||||
(cross platform client that can send emails using the Microsoft Graph API)
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
|
|
|
@ -23,8 +23,6 @@ SYNOPSIS
|
|||
'git stash' clear
|
||||
'git stash' create [<message>]
|
||||
'git stash' store [(-m | --message) <message>] [-q | --quiet] <commit>
|
||||
'git stash' export (--print | --to-ref <ref>) [<stash>...]
|
||||
'git stash' import <commit>
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
|
@ -156,18 +154,6 @@ store::
|
|||
reflog. This is intended to be useful for scripts. It is
|
||||
probably not the command you want to use; see "push" above.
|
||||
|
||||
export ( --print | --to-ref <ref> ) [<stash>...]::
|
||||
|
||||
Export the specified stashes, or all of them if none are specified, to
|
||||
a chain of commits which can be transferred using the normal fetch and
|
||||
push mechanisms, then imported using the `import` subcommand.
|
||||
|
||||
import <commit>::
|
||||
|
||||
Import the specified stashes from the specified commit, which must have been
|
||||
created by `export`, and add them to the list of stashes. To replace the
|
||||
existing stashes, use `clear` first.
|
||||
|
||||
OPTIONS
|
||||
-------
|
||||
-a::
|
||||
|
@ -256,19 +242,6 @@ literally (including newlines and quotes).
|
|||
+
|
||||
Quiet, suppress feedback messages.
|
||||
|
||||
--print::
|
||||
This option is only valid for the `export` command.
|
||||
+
|
||||
Create the chain of commits representing the exported stashes without
|
||||
storing it anywhere in the ref namespace and print the object ID to
|
||||
standard output. This is designed for scripts.
|
||||
|
||||
--to-ref::
|
||||
This option is only valid for the `export` command.
|
||||
+
|
||||
Create the chain of commits representing the exported stashes and store
|
||||
it to the specified ref.
|
||||
|
||||
\--::
|
||||
This option is only valid for `push` command.
|
||||
+
|
||||
|
@ -286,7 +259,7 @@ For more details, see the 'pathspec' entry in linkgit:gitglossary[7].
|
|||
|
||||
<stash>::
|
||||
This option is only valid for `apply`, `branch`, `drop`, `pop`,
|
||||
`show`, and `export` commands.
|
||||
`show` commands.
|
||||
+
|
||||
A reference of the form `stash@{<revision>}`. When no `<stash>` is
|
||||
given, the latest stash is assumed (that is, `stash@{0}`).
|
||||
|
|
|
@ -37,8 +37,7 @@ OPTIONS
|
|||
-------
|
||||
-s::
|
||||
--strip-comments::
|
||||
Skip and remove all lines starting with a comment character
|
||||
(`core.commentChar`, default `#`).
|
||||
Skip and remove all lines starting with a comment character (default '#').
|
||||
|
||||
-c::
|
||||
--comment-lines::
|
||||
|
|
|
@ -7,11 +7,11 @@ git-switch - Switch branches
|
|||
|
||||
SYNOPSIS
|
||||
--------
|
||||
[synopsis]
|
||||
git switch [<options>] [--no-guess] <branch>
|
||||
git switch [<options>] --detach [<start-point>]
|
||||
git switch [<options>] (-c|-C) <new-branch> [<start-point>]
|
||||
git switch [<options>] --orphan <new-branch>
|
||||
[verse]
|
||||
'git switch' [<options>] [--no-guess] <branch>
|
||||
'git switch' [<options>] --detach [<start-point>]
|
||||
'git switch' [<options>] (-c|-C) <new-branch> [<start-point>]
|
||||
'git switch' [<options>] --orphan <new-branch>
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
|
@ -33,33 +33,33 @@ THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.
|
|||
|
||||
OPTIONS
|
||||
-------
|
||||
_<branch>_::
|
||||
<branch>::
|
||||
Branch to switch to.
|
||||
|
||||
_<new-branch>_::
|
||||
<new-branch>::
|
||||
Name for the new branch.
|
||||
|
||||
_<start-point>_::
|
||||
<start-point>::
|
||||
The starting point for the new branch. Specifying a
|
||||
_<start-point>_ allows you to create a branch based on some
|
||||
other point in history than where `HEAD` currently points. (Or,
|
||||
`<start-point>` allows you to create a branch based on some
|
||||
other point in history than where HEAD currently points. (Or,
|
||||
in the case of `--detach`, allows you to inspect and detach
|
||||
from some other point.)
|
||||
+
|
||||
You can use the `@{-<N>}` syntax to refer to the _<N>_-th last
|
||||
branch/commit switched to using `git switch` or `git checkout`
|
||||
You can use the `@{-N}` syntax to refer to the N-th last
|
||||
branch/commit switched to using "git switch" or "git checkout"
|
||||
operation. You may also specify `-` which is synonymous to `@{-1}`.
|
||||
This is often used to switch quickly between two branches, or to undo
|
||||
a branch switch by mistake.
|
||||
+
|
||||
As a special case, you may use `<rev-a>...<rev-b>` as a shortcut for the merge
|
||||
base of _<rev-a>_ and _<rev-b>_ if there is exactly one merge base. You can leave
|
||||
out at most one of _<rev-a>_ and _<rev-b>_, in which case it defaults to `HEAD`.
|
||||
As a special case, you may use `A...B` as a shortcut for the merge
|
||||
base of `A` and `B` if there is exactly one merge base. You can leave
|
||||
out at most one of `A` and `B`, in which case it defaults to `HEAD`.
|
||||
|
||||
`-c <new-branch>`::
|
||||
`--create <new-branch>`::
|
||||
Create a new branch named _<new-branch>_ starting at
|
||||
_<start-point>_ before switching to the branch. This is the
|
||||
-c <new-branch>::
|
||||
--create <new-branch>::
|
||||
Create a new branch named `<new-branch>` starting at
|
||||
`<start-point>` before switching to the branch. This is the
|
||||
transactional equivalent of
|
||||
+
|
||||
------------
|
||||
|
@ -67,32 +67,32 @@ $ git branch <new-branch>
|
|||
$ git switch <new-branch>
|
||||
------------
|
||||
+
|
||||
that is to say, the branch is not reset/created unless `git switch` is
|
||||
that is to say, the branch is not reset/created unless "git switch" is
|
||||
successful (e.g., when the branch is in use in another worktree, not
|
||||
just the current branch stays the same, but the branch is not reset to
|
||||
the start-point, either).
|
||||
|
||||
`-C <new-branch>`::
|
||||
`--force-create <new-branch>`::
|
||||
Similar to `--create` except that if _<new-branch>_ already
|
||||
exists, it will be reset to _<start-point>_. This is a
|
||||
-C <new-branch>::
|
||||
--force-create <new-branch>::
|
||||
Similar to `--create` except that if `<new-branch>` already
|
||||
exists, it will be reset to `<start-point>`. This is a
|
||||
convenient shortcut for:
|
||||
+
|
||||
------------
|
||||
$ git branch -f _<new-branch>_
|
||||
$ git switch _<new-branch>_
|
||||
$ git branch -f <new-branch>
|
||||
$ git switch <new-branch>
|
||||
------------
|
||||
|
||||
`-d`::
|
||||
`--detach`::
|
||||
-d::
|
||||
--detach::
|
||||
Switch to a commit for inspection and discardable
|
||||
experiments. See the "DETACHED HEAD" section in
|
||||
linkgit:git-checkout[1] for details.
|
||||
|
||||
`--guess`::
|
||||
`--no-guess`::
|
||||
If _<branch>_ is not found but there does exist a tracking
|
||||
branch in exactly one remote (call it _<remote>_) with a
|
||||
--guess::
|
||||
--no-guess::
|
||||
If `<branch>` is not found but there does exist a tracking
|
||||
branch in exactly one remote (call it `<remote>`) with a
|
||||
matching name, treat as equivalent to
|
||||
+
|
||||
------------
|
||||
|
@ -101,9 +101,9 @@ $ git switch -c <branch> --track <remote>/<branch>
|
|||
+
|
||||
If the branch exists in multiple remotes and one of them is named by
|
||||
the `checkout.defaultRemote` configuration variable, we'll use that
|
||||
one for the purposes of disambiguation, even if the _<branch>_ isn't
|
||||
one for the purposes of disambiguation, even if the `<branch>` isn't
|
||||
unique across all remotes. Set it to e.g. `checkout.defaultRemote=origin`
|
||||
to always checkout remote branches from there if _<branch>_ is
|
||||
to always checkout remote branches from there if `<branch>` is
|
||||
ambiguous but exists on the 'origin' remote. See also
|
||||
`checkout.defaultRemote` in linkgit:git-config[1].
|
||||
+
|
||||
|
@ -112,19 +112,19 @@ ambiguous but exists on the 'origin' remote. See also
|
|||
The default behavior can be set via the `checkout.guess` configuration
|
||||
variable.
|
||||
|
||||
`-f`::
|
||||
`--force`::
|
||||
-f::
|
||||
--force::
|
||||
An alias for `--discard-changes`.
|
||||
|
||||
`--discard-changes`::
|
||||
--discard-changes::
|
||||
Proceed even if the index or the working tree differs from
|
||||
`HEAD`. Both the index and working tree are restored to match
|
||||
the switching target. If `--recurse-submodules` is specified,
|
||||
submodule content is also restored to match the switching
|
||||
target. This is used to throw away local changes.
|
||||
|
||||
`-m`::
|
||||
`--merge`::
|
||||
-m::
|
||||
--merge::
|
||||
If you have local modifications to one or more files that are
|
||||
different between the current branch and the branch to which
|
||||
you are switching, the command refuses to switch branches in
|
||||
|
@ -138,25 +138,25 @@ paths are left unmerged, and you need to resolve the conflicts
|
|||
and mark the resolved paths with `git add` (or `git rm` if the merge
|
||||
should result in deletion of the path).
|
||||
|
||||
`--conflict=<style>`::
|
||||
--conflict=<style>::
|
||||
The same as `--merge` option above, but changes the way the
|
||||
conflicting hunks are presented, overriding the
|
||||
`merge.conflictStyle` configuration variable. Possible values are
|
||||
`merge` (default), `diff3`, and `zdiff3`.
|
||||
"merge" (default), "diff3", and "zdiff3".
|
||||
|
||||
`-q`::
|
||||
`--quiet`::
|
||||
-q::
|
||||
--quiet::
|
||||
Quiet, suppress feedback messages.
|
||||
|
||||
`--progress`::
|
||||
`--no-progress`::
|
||||
--progress::
|
||||
--no-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 enables progress reporting even if not
|
||||
attached to a terminal, regardless of `--quiet`.
|
||||
|
||||
`-t`::
|
||||
`--track[ (direct|inherit)]`::
|
||||
-t::
|
||||
--track [direct|inherit]::
|
||||
When creating a new branch, set up "upstream" configuration.
|
||||
`-c` is implied. See `--track` in linkgit:git-branch[1] for
|
||||
details.
|
||||
|
@ -171,22 +171,22 @@ given name has no slash, or the above guessing results in an empty
|
|||
name, the guessing is aborted. You can explicitly give a name with
|
||||
`-c` in such a case.
|
||||
|
||||
`--no-track`::
|
||||
--no-track::
|
||||
Do not set up "upstream" configuration, even if the
|
||||
`branch.autoSetupMerge` configuration variable is true.
|
||||
|
||||
`--orphan <new-branch>`::
|
||||
Create a new unborn branch, named _<new-branch>_. All
|
||||
--orphan <new-branch>::
|
||||
Create a new unborn branch, named `<new-branch>`. All
|
||||
tracked files are removed.
|
||||
|
||||
`--ignore-other-worktrees`::
|
||||
--ignore-other-worktrees::
|
||||
`git switch` refuses when the wanted ref is already
|
||||
checked out by another worktree. This option makes it check
|
||||
the ref out anyway. In other words, the ref can be held by
|
||||
more than one worktree.
|
||||
|
||||
`--recurse-submodules`::
|
||||
`--no-recurse-submodules`::
|
||||
--recurse-submodules::
|
||||
--no-recurse-submodules::
|
||||
Using `--recurse-submodules` will update the content of all
|
||||
active submodules according to the commit recorded in the
|
||||
superproject. If nothing (or `--no-recurse-submodules`) is
|
||||
|
@ -239,7 +239,7 @@ $ git switch -
|
|||
------------
|
||||
|
||||
You can grow a new branch from any commit. For example, switch to
|
||||
"`HEAD~3`" and create branch "`fixup`":
|
||||
"HEAD~3" and create branch "fixup":
|
||||
|
||||
------------
|
||||
$ git switch -c fixup HEAD~3
|
||||
|
@ -251,8 +251,8 @@ name:
|
|||
|
||||
------------
|
||||
$ git switch new-topic
|
||||
Branch `new-topic` set up to track remote branch `new-topic` from `origin`
|
||||
Switched to a new branch `new-topic`
|
||||
Branch 'new-topic' set up to track remote branch 'new-topic' from 'origin'
|
||||
Switched to a new branch 'new-topic'
|
||||
------------
|
||||
|
||||
To check out commit `HEAD~3` for temporary inspection or experiment
|
||||
|
|
|
@ -8,14 +8,8 @@ git-whatchanged - Show logs with differences each commit introduces
|
|||
|
||||
SYNOPSIS
|
||||
--------
|
||||
[synopsis]
|
||||
git whatchanged <option>...
|
||||
|
||||
WARNING
|
||||
-------
|
||||
`git whatchanged` has been deprecated and is scheduled for removal in
|
||||
a future version of Git, as it is merely `git log` with different
|
||||
default; `whatchanged` is not even shorter to type than `log --raw`.
|
||||
[verse]
|
||||
'git whatchanged' <option>...
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
|
|
|
@ -133,6 +133,10 @@ Popular helpers with OAuth support include:
|
|||
|
||||
- https://github.com/hickford/git-credential-oauth[git-credential-oauth] (cross platform, included in many Linux distributions)
|
||||
|
||||
- https://github.com/AdityaGarg8/git-credential-email[git-credential-gmail] (cross platform, dedicated helper to authenticate Gmail accounts for linkgit:git-send-email[1])
|
||||
|
||||
- https://github.com/AdityaGarg8/git-credential-email[git-credential-outlook] (cross platform, dedicated helper to authenticate Microsoft Outlook accounts for linkgit:git-send-email[1])
|
||||
|
||||
CREDENTIAL CONTEXTS
|
||||
-------------------
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ In general a client can request to speak protocol v2 by sending
|
|||
`version=2` through the respective side-channel for the transport being
|
||||
used which inevitably sets `GIT_PROTOCOL`. More information can be
|
||||
found in linkgit:gitprotocol-pack[5] and linkgit:gitprotocol-http[5], as well as the
|
||||
`GIT_PROTOCOL` definition in linkgit:git[1]. In all cases the
|
||||
`GIT_PROTOCOL` definition in `git.txt`. In all cases the
|
||||
response from the server is the capability advertisement.
|
||||
|
||||
Git Transport
|
||||
|
@ -99,7 +99,7 @@ Uses the `--http-backend-info-refs` option to
|
|||
linkgit:git-upload-pack[1].
|
||||
|
||||
The server may need to be configured to pass this header's contents via
|
||||
the `GIT_PROTOCOL` variable. See the discussion in linkgit:git-http-backend[1].
|
||||
the `GIT_PROTOCOL` variable. See the discussion in `git-http-backend.txt`.
|
||||
|
||||
Capability Advertisement
|
||||
------------------------
|
||||
|
|
|
@ -498,7 +498,7 @@ set by Git if the remote helper has the 'option' capability.
|
|||
ask for the tag specifically. Some helpers may be able to
|
||||
use this option to avoid a second network connection.
|
||||
|
||||
'option dry-run' {'true'|'false'}::
|
||||
'option dry-run' {'true'|'false'}:
|
||||
If true, pretend the operation completed successfully,
|
||||
but don't actually change any repository data. For most
|
||||
helpers this only applies to the 'push', if supported.
|
||||
|
|
|
@ -418,8 +418,9 @@ full pathname may have special meaning:
|
|||
|
||||
- A leading "`**`" followed by a slash means match in all
|
||||
directories. For example, "`**/foo`" matches file or directory
|
||||
"`foo`" anywhere. "`**/foo/bar`" matches file or directory "`bar`"
|
||||
anywhere that is directly under directory "`foo`".
|
||||
"`foo`" anywhere, the same as pattern "`foo`". "`**/foo/bar`"
|
||||
matches file or directory "`bar`" anywhere that is directly
|
||||
under directory "`foo`".
|
||||
|
||||
- A trailing "`/**`" matches everything inside. For example,
|
||||
"`abc/**`" matches all files inside directory "abc", relative
|
||||
|
|
|
@ -1,30 +1,30 @@
|
|||
_<start>_ and _<end>_ can take one of these forms:
|
||||
'<start>' and '<end>' can take one of these forms:
|
||||
|
||||
- _<number>_
|
||||
- number
|
||||
+
|
||||
If _<start>_ or _<end>_ is a number, it specifies an
|
||||
If '<start>' or '<end>' is a number, it specifies an
|
||||
absolute line number (lines count from 1).
|
||||
+
|
||||
|
||||
- `/<regex>/`
|
||||
- `/regex/`
|
||||
+
|
||||
This form will use the first line matching the given
|
||||
POSIX _<regex>_. If _<start>_ is a regex, it will search from the end of
|
||||
POSIX regex. If '<start>' is a regex, it will search from the end of
|
||||
the previous `-L` range, if any, otherwise from the start of file.
|
||||
If _<start>_ is `^/<regex>/`, it will search from the start of file.
|
||||
If _<end>_ is a regex, it will search starting at the line given by
|
||||
_<start>_.
|
||||
If '<start>' is `^/regex/`, it will search from the start of file.
|
||||
If '<end>' is a regex, it will search
|
||||
starting at the line given by '<start>'.
|
||||
+
|
||||
|
||||
- `+<offset>` or `-<offset>`
|
||||
- +offset or -offset
|
||||
+
|
||||
This is only valid for _<end>_ and will specify a number
|
||||
of lines before or after the line given by _<start>_.
|
||||
This is only valid for '<end>' and will specify a number
|
||||
of lines before or after the line given by '<start>'.
|
||||
|
||||
+
|
||||
If `:<funcname>` is given in place of _<start>_ and _<end>_, it is a
|
||||
If `:<funcname>` is given in place of '<start>' and '<end>', it is a
|
||||
regular expression that denotes the range from the first funcname line
|
||||
that matches _<funcname>_, up to the next funcname line. `:<funcname>`
|
||||
that matches '<funcname>', up to the next funcname line. `:<funcname>`
|
||||
searches from the end of the previous `-L` range, if any, otherwise
|
||||
from the start of file. `^:<funcname>` searches from the start of
|
||||
file. The function names are determined in the same way as `git diff`
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
`-L<start>,<end>:<file>`::
|
||||
`-L:<funcname>:<file>`::
|
||||
-L<start>,<end>:<file>::
|
||||
-L:<funcname>:<file>::
|
||||
|
||||
Trace the evolution of the line range given by `<start>,<end>`,
|
||||
or by the function name regex _<funcname>_, within the _<file>_. You may
|
||||
Trace the evolution of the line range given by '<start>,<end>',
|
||||
or by the function name regex '<funcname>', within the '<file>'. You may
|
||||
not give any pathspec limiters. This is currently limited to
|
||||
a walk starting from a single revision, i.e., you may only
|
||||
give zero or one positive revision arguments, and
|
||||
_<start>_ and _<end>_ (or _<funcname>_) must exist in the starting revision.
|
||||
'<start>' and '<end>' (or '<funcname>') must exist in the starting revision.
|
||||
You can specify this option more than once. Implies `--patch`.
|
||||
Patch output can be suppressed using `--no-patch`, but other diff formats
|
||||
(namely `--raw`, `--numstat`, `--shortstat`, `--dirstat`, `--summary`,
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
`--commit`::
|
||||
`--no-commit`::
|
||||
--commit::
|
||||
--no-commit::
|
||||
Perform the merge and commit the result. This option can
|
||||
be used to override `--no-commit`.
|
||||
be used to override --no-commit.
|
||||
ifdef::git-pull[]
|
||||
Only useful when merging.
|
||||
endif::git-pull[]
|
||||
+
|
||||
With `--no-commit` perform the merge and stop just before creating
|
||||
With --no-commit perform the merge and stop just before creating
|
||||
a merge commit, to give the user a chance to inspect and further
|
||||
tweak the merge result before committing.
|
||||
+
|
||||
Note that fast-forward updates do not create a merge commit and
|
||||
therefore there is no way to stop those merges with `--no-commit`.
|
||||
therefore there is no way to stop those merges with --no-commit.
|
||||
Thus, if you want to ensure your branch is not changed or updated
|
||||
by the merge command, use `--no-ff` with `--no-commit`.
|
||||
by the merge command, use --no-ff with --no-commit.
|
||||
|
||||
`--edit`::
|
||||
`-e`::
|
||||
`--no-edit`::
|
||||
--edit::
|
||||
-e::
|
||||
--no-edit::
|
||||
Invoke an editor before committing successful mechanical merge to
|
||||
further edit the auto-generated merge message, so that the user
|
||||
can explain and justify the merge. The `--no-edit` option can be
|
||||
|
@ -35,17 +35,17 @@ they run `git merge`. To make it easier to adjust such scripts to the
|
|||
updated behaviour, the environment variable `GIT_MERGE_AUTOEDIT` can be
|
||||
set to `no` at the beginning of them.
|
||||
|
||||
`--cleanup=<mode>`::
|
||||
--cleanup=<mode>::
|
||||
This option determines how the merge message will be cleaned up before
|
||||
committing. See linkgit:git-commit[1] for more details. In addition, if
|
||||
the _<mode>_ is given a value of `scissors`, scissors will be appended
|
||||
the '<mode>' is given a value of `scissors`, scissors will be appended
|
||||
to `MERGE_MSG` before being passed on to the commit machinery in the
|
||||
case of a merge conflict.
|
||||
|
||||
ifdef::git-merge[]
|
||||
`--ff`::
|
||||
`--no-ff`::
|
||||
`--ff-only`::
|
||||
--ff::
|
||||
--no-ff::
|
||||
--ff-only::
|
||||
Specifies how a merge is handled when the merged-in history is
|
||||
already a descendant of the current history. `--ff` is the
|
||||
default unless merging an annotated (and possibly signed) tag
|
||||
|
@ -53,13 +53,13 @@ ifdef::git-merge[]
|
|||
hierarchy, in which case `--no-ff` is assumed.
|
||||
endif::git-merge[]
|
||||
ifdef::git-pull[]
|
||||
`--ff-only`::
|
||||
--ff-only::
|
||||
Only update to the new history if there is no divergent local
|
||||
history. This is the default when no method for reconciling
|
||||
divergent histories is provided (via the --rebase=* flags).
|
||||
|
||||
`--ff`::
|
||||
`--no-ff`::
|
||||
--ff::
|
||||
--no-ff::
|
||||
When merging rather than rebasing, specifies how a merge is
|
||||
handled when the merged-in history is already a descendant of
|
||||
the current history. If merging is requested, `--ff` is the
|
||||
|
@ -81,43 +81,40 @@ With `--ff-only`, resolve the merge as a fast-forward when possible.
|
|||
When not possible, refuse to merge and exit with a non-zero status.
|
||||
endif::git-merge[]
|
||||
|
||||
`-S[<key-id>]`::
|
||||
`--gpg-sign[=<key-id>]`::
|
||||
`--no-gpg-sign`::
|
||||
GPG-sign the resulting merge commit. The _<key-id>_ argument is
|
||||
-S[<keyid>]::
|
||||
--gpg-sign[=<keyid>]::
|
||||
--no-gpg-sign::
|
||||
GPG-sign the resulting merge commit. The `keyid` argument is
|
||||
optional and defaults to the committer identity; if specified,
|
||||
it must be stuck to the option without a space. `--no-gpg-sign`
|
||||
is useful to countermand both `commit.gpgSign` configuration variable,
|
||||
and earlier `--gpg-sign`.
|
||||
|
||||
`--log[=<n>]`::
|
||||
`--no-log`::
|
||||
--log[=<n>]::
|
||||
--no-log::
|
||||
In addition to branch names, populate the log message with
|
||||
one-line descriptions from at most _<n>_ actual commits that are being
|
||||
one-line descriptions from at most <n> actual commits that are being
|
||||
merged. See also linkgit:git-fmt-merge-msg[1].
|
||||
ifdef::git-pull[]
|
||||
Only useful when merging.
|
||||
endif::git-pull[]
|
||||
+
|
||||
With `--no-log` do not list one-line descriptions from the
|
||||
With --no-log do not list one-line descriptions from the
|
||||
actual commits being merged.
|
||||
|
||||
include::signoff-option.adoc[]
|
||||
|
||||
`--stat`::
|
||||
`-n`::
|
||||
`--no-stat`::
|
||||
--stat::
|
||||
-n::
|
||||
--no-stat::
|
||||
Show a diffstat at the end of the merge. The diffstat is also
|
||||
controlled by the configuration option merge.stat.
|
||||
+
|
||||
With `-n` or `--no-stat` do not show a diffstat at the end of the
|
||||
With -n or --no-stat do not show a diffstat at the end of the
|
||||
merge.
|
||||
|
||||
`--compact-summary`::
|
||||
Show a compact-summary at the end of the merge.
|
||||
|
||||
`--squash`::
|
||||
`--no-squash`::
|
||||
--squash::
|
||||
--no-squash::
|
||||
Produce the working tree and index state as if a real merge
|
||||
happened (except for the merge information), but do not actually
|
||||
make a commit, move the `HEAD`, or record `$GIT_DIR/MERGE_HEAD`
|
||||
|
@ -126,16 +123,16 @@ merge.
|
|||
the current branch whose effect is the same as merging another
|
||||
branch (or more in case of an octopus).
|
||||
+
|
||||
With `--no-squash` perform the merge and commit the result. This
|
||||
option can be used to override `--squash`.
|
||||
With --no-squash perform the merge and commit the result. This
|
||||
option can be used to override --squash.
|
||||
+
|
||||
With `--squash`, `--commit` is not allowed, and will fail.
|
||||
With --squash, --commit is not allowed, and will fail.
|
||||
ifdef::git-pull[]
|
||||
+
|
||||
Only useful when merging.
|
||||
endif::git-pull[]
|
||||
|
||||
`--[no-]verify`::
|
||||
--[no-]verify::
|
||||
By default, the pre-merge and commit-msg hooks are run.
|
||||
When `--no-verify` is given, these are bypassed.
|
||||
See also linkgit:githooks[5].
|
||||
|
@ -143,21 +140,21 @@ ifdef::git-pull[]
|
|||
Only useful when merging.
|
||||
endif::git-pull[]
|
||||
|
||||
`-s <strategy>`::
|
||||
`--strategy=<strategy>`::
|
||||
-s <strategy>::
|
||||
--strategy=<strategy>::
|
||||
Use the given merge strategy; can be supplied more than
|
||||
once to specify them in the order they should be tried.
|
||||
If there is no `-s` option, a built-in list of strategies
|
||||
is used instead (`ort` when merging a single head,
|
||||
`octopus` otherwise).
|
||||
|
||||
`-X <option>`::
|
||||
`--strategy-option=<option>`::
|
||||
-X <option>::
|
||||
--strategy-option=<option>::
|
||||
Pass merge strategy specific option through to the merge
|
||||
strategy.
|
||||
|
||||
`--verify-signatures`::
|
||||
`--no-verify-signatures`::
|
||||
--verify-signatures::
|
||||
--no-verify-signatures::
|
||||
Verify that the tip commit of the side branch being merged is
|
||||
signed with a valid key, i.e. a key that has a valid uid: in the
|
||||
default trust model, this means the signing key has been signed by
|
||||
|
@ -168,22 +165,22 @@ ifdef::git-pull[]
|
|||
Only useful when merging.
|
||||
endif::git-pull[]
|
||||
|
||||
`--summary`::
|
||||
`--no-summary`::
|
||||
Synonyms to `--stat` and `--no-stat`; these are deprecated and will be
|
||||
--summary::
|
||||
--no-summary::
|
||||
Synonyms to --stat and --no-stat; these are deprecated and will be
|
||||
removed in the future.
|
||||
|
||||
ifndef::git-pull[]
|
||||
`-q`::
|
||||
`--quiet`::
|
||||
Operate quietly. Implies `--no-progress`.
|
||||
-q::
|
||||
--quiet::
|
||||
Operate quietly. Implies --no-progress.
|
||||
|
||||
`-v`::
|
||||
`--verbose`::
|
||||
-v::
|
||||
--verbose::
|
||||
Be verbose.
|
||||
|
||||
`--progress`::
|
||||
`--no-progress`::
|
||||
--progress::
|
||||
--no-progress::
|
||||
Turn progress on/off explicitly. If neither is specified,
|
||||
progress is shown if standard error is connected to a terminal.
|
||||
Note that not all merge strategies may support progress
|
||||
|
@ -191,8 +188,8 @@ ifndef::git-pull[]
|
|||
|
||||
endif::git-pull[]
|
||||
|
||||
`--autostash`::
|
||||
`--no-autostash`::
|
||||
--autostash::
|
||||
--no-autostash::
|
||||
Automatically create a temporary stash entry before the operation
|
||||
begins, record it in the ref `MERGE_AUTOSTASH`
|
||||
and apply it after the operation ends. This means
|
||||
|
@ -200,13 +197,13 @@ endif::git-pull[]
|
|||
with care: the final stash application after a successful
|
||||
merge might result in non-trivial conflicts.
|
||||
|
||||
`--allow-unrelated-histories`::
|
||||
--allow-unrelated-histories::
|
||||
By default, `git merge` command refuses to merge histories
|
||||
that do not share a common ancestor. This option can be
|
||||
used to override this safety when merging histories of two
|
||||
projects that started their lives independently. As that is
|
||||
a very rare occasion, no configuration variable to enable
|
||||
this by default exists or will be added.
|
||||
this by default exists and will not be added.
|
||||
ifdef::git-pull[]
|
||||
+
|
||||
Only useful when merging.
|
||||
|
|
|
@ -6,7 +6,7 @@ backend 'merge strategies' to be chosen with `-s` option. Some strategies
|
|||
can also take their own options, which can be passed by giving `-X<option>`
|
||||
arguments to `git merge` and/or `git pull`.
|
||||
|
||||
`ort`::
|
||||
ort::
|
||||
This is the default merge strategy when pulling or merging one
|
||||
branch. This strategy can only resolve two heads using a
|
||||
3-way merge algorithm. When there is more than one common
|
||||
|
@ -29,26 +29,26 @@ descendant. Otherwise, Git will treat this case as a conflict, suggesting
|
|||
as a resolution a submodule commit that is descendant of the conflicting
|
||||
ones, if one exists.
|
||||
+
|
||||
The `ort` strategy can take the following options:
|
||||
The 'ort' strategy can take the following options:
|
||||
|
||||
`ours`;;
|
||||
ours;;
|
||||
This option forces conflicting hunks to be auto-resolved cleanly by
|
||||
favoring 'our' version. Changes from the other tree that do not
|
||||
conflict with our side are reflected in the merge result.
|
||||
For a binary file, the entire contents are taken from our side.
|
||||
+
|
||||
This should not be confused with the `ours` merge strategy, which does not
|
||||
This should not be confused with the 'ours' merge strategy, which does not
|
||||
even look at what the other tree contains at all. It discards everything
|
||||
the other tree did, declaring 'our' history contains all that happened in it.
|
||||
|
||||
`theirs`;;
|
||||
This is the opposite of `ours`; note that, unlike `ours`, there is
|
||||
no `theirs` merge strategy to confuse this merge option with.
|
||||
theirs;;
|
||||
This is the opposite of 'ours'; note that, unlike 'ours', there is
|
||||
no 'theirs' merge strategy to confuse this merge option with.
|
||||
|
||||
`ignore-space-change`;;
|
||||
`ignore-all-space`;;
|
||||
`ignore-space-at-eol`;;
|
||||
`ignore-cr-at-eol`;;
|
||||
ignore-space-change;;
|
||||
ignore-all-space;;
|
||||
ignore-space-at-eol;;
|
||||
ignore-cr-at-eol;;
|
||||
Treats lines with the indicated type of whitespace change as
|
||||
unchanged for the sake of a three-way merge. Whitespace
|
||||
changes mixed with other changes to a line are not ignored.
|
||||
|
@ -61,7 +61,7 @@ the other tree did, declaring 'our' history contains all that happened in it.
|
|||
version includes a substantial change, 'their' version is used;
|
||||
* Otherwise, the merge proceeds in the usual way.
|
||||
|
||||
`renormalize`;;
|
||||
renormalize;;
|
||||
This runs a virtual check-out and check-in of all three stages
|
||||
of any file which needs a three-way merge. This option is
|
||||
meant to be used when merging branches with different clean
|
||||
|
@ -69,31 +69,31 @@ the other tree did, declaring 'our' history contains all that happened in it.
|
|||
branches with differing checkin/checkout attributes" in
|
||||
linkgit:gitattributes[5] for details.
|
||||
|
||||
`no-renormalize`;;
|
||||
no-renormalize;;
|
||||
Disables the `renormalize` option. This overrides the
|
||||
`merge.renormalize` configuration variable.
|
||||
|
||||
`find-renames[=<n>]`;;
|
||||
find-renames[=<n>];;
|
||||
Turn on rename detection, optionally setting the similarity
|
||||
threshold. This is the default. This overrides the
|
||||
`merge.renames` configuration variable.
|
||||
'merge.renames' configuration variable.
|
||||
See also linkgit:git-diff[1] `--find-renames`.
|
||||
|
||||
`rename-threshold=<n>`;;
|
||||
rename-threshold=<n>;;
|
||||
Deprecated synonym for `find-renames=<n>`.
|
||||
|
||||
`no-renames`;;
|
||||
no-renames;;
|
||||
Turn off rename detection. This overrides the `merge.renames`
|
||||
configuration variable.
|
||||
See also linkgit:git-diff[1] `--no-renames`.
|
||||
|
||||
`histogram`;;
|
||||
histogram;;
|
||||
Deprecated synonym for `diff-algorithm=histogram`.
|
||||
|
||||
`patience`;;
|
||||
patience;;
|
||||
Deprecated synonym for `diff-algorithm=patience`.
|
||||
|
||||
`diff-algorithm=(histogram|minimal|myers|patience)`;;
|
||||
diff-algorithm=[histogram|minimal|myers|patience];;
|
||||
Use a different diff algorithm while merging, which can help
|
||||
avoid mismerges that occur due to unimportant matching lines
|
||||
(such as braces from distinct functions). See also
|
||||
|
@ -101,49 +101,49 @@ the other tree did, declaring 'our' history contains all that happened in it.
|
|||
defaults to `diff-algorithm=histogram`, while regular diffs
|
||||
currently default to the `diff.algorithm` config setting.
|
||||
|
||||
`subtree[=<path>]`;;
|
||||
subtree[=<path>];;
|
||||
This option is a more advanced form of 'subtree' strategy, where
|
||||
the strategy makes a guess on how two trees must be shifted to
|
||||
match with each other when merging. Instead, the specified path
|
||||
is prefixed (or stripped from the beginning) to make the shape of
|
||||
two trees to match.
|
||||
|
||||
`recursive`::
|
||||
recursive::
|
||||
This is now a synonym for `ort`. It was an alternative
|
||||
implementation until v2.49.0, but was redirected to mean `ort`
|
||||
in v2.50.0. The previous recursive strategy was the default
|
||||
strategy for resolving two heads from Git v0.99.9k until
|
||||
v2.33.0.
|
||||
|
||||
`resolve`::
|
||||
resolve::
|
||||
This can only resolve two heads (i.e. the current branch
|
||||
and another branch you pulled from) using a 3-way merge
|
||||
algorithm. It tries to carefully detect criss-cross
|
||||
merge ambiguities. It does not handle renames.
|
||||
|
||||
`octopus`::
|
||||
octopus::
|
||||
This resolves cases with more than two heads, but refuses to do
|
||||
a complex merge that needs manual resolution. It is
|
||||
primarily meant to be used for bundling topic branch
|
||||
heads together. This is the default merge strategy when
|
||||
pulling or merging more than one branch.
|
||||
|
||||
`ours`::
|
||||
ours::
|
||||
This resolves any number of heads, but the resulting tree of the
|
||||
merge is always that of the current branch head, effectively
|
||||
ignoring all changes from all other branches. It is meant to
|
||||
be used to supersede old development history of side
|
||||
branches. Note that this is different from the `-Xours` option to
|
||||
the `ort` merge strategy.
|
||||
branches. Note that this is different from the -Xours option to
|
||||
the 'ort' merge strategy.
|
||||
|
||||
`subtree`::
|
||||
subtree::
|
||||
This is a modified `ort` strategy. When merging trees A and
|
||||
B, if B corresponds to a subtree of A, B is first adjusted to
|
||||
match the tree structure of A, instead of reading the trees at
|
||||
the same level. This adjustment is also done to the common
|
||||
ancestor tree.
|
||||
|
||||
With the strategies that use 3-way merge (including the default, `ort`),
|
||||
With the strategies that use 3-way merge (including the default, 'ort'),
|
||||
if a change is made on both branches, but later reverted on one of the
|
||||
branches, that change will be present in the merged result; some people find
|
||||
this behavior confusing. It occurs because only the heads and the merge base
|
||||
|
|
|
@ -183,13 +183,13 @@ latter will be used as fallback if the variant-specific one is not set).
|
|||
In addition, for backwards compatibility with previous Git versions, you can
|
||||
also append `1`, `2` or `3` to either `vimdiff` or any of the variants (ex:
|
||||
`vimdiff3`, `nvimdiff1`, etc...) to use a predefined layout.
|
||||
In other words, using `--tool=[g|n]vimdiff<x>` is the same as using
|
||||
`--tool=[g|n]vimdiff` and setting configuration variable
|
||||
`mergetool.[g|n]vimdiff.layout` to...
|
||||
In other words, using `--tool=[g,n,]vimdiffx` is the same as using
|
||||
`--tool=[g,n,]vimdiff` and setting configuration variable
|
||||
`mergetool.[g,n,]vimdiff.layout` to...
|
||||
|
||||
* `<x>=1`: `"@LOCAL, REMOTE"`
|
||||
* `<x>=2`: `"LOCAL, MERGED, REMOTE"`
|
||||
* `<x>=3`: `"MERGED"`
|
||||
* `x=1`: `"@LOCAL, REMOTE"`
|
||||
* `x=2`: `"LOCAL, MERGED, REMOTE"`
|
||||
* `x=3`: `"MERGED"`
|
||||
|
||||
Example: using `--tool=gvimdiff2` will open `gvim` with three columns (`LOCAL`,
|
||||
`MERGED` and `REMOTE`).
|
||||
Example: using `--tool=gvimdiff2` will open `gvim` with three columns (LOCAL,
|
||||
MERGED and REMOTE).
|
||||
|
|
|
@ -158,6 +158,7 @@ manpages = {
|
|||
'git-verify-tag.adoc' : 1,
|
||||
'git-version.adoc' : 1,
|
||||
'git-web--browse.adoc' : 1,
|
||||
'git-whatchanged.adoc' : 1,
|
||||
'git-worktree.adoc' : 1,
|
||||
'git-write-tree.adoc' : 1,
|
||||
'git.adoc' : 1,
|
||||
|
@ -206,7 +207,6 @@ manpages = {
|
|||
|
||||
manpages_breaking_changes = {
|
||||
'git-pack-redundant.adoc' : 1,
|
||||
'git-whatchanged.adoc' : 1,
|
||||
}
|
||||
|
||||
if not get_option('breaking_changes')
|
||||
|
@ -375,7 +375,8 @@ foreach manpage, category : manpages
|
|||
output: fs.stem(manpage) + '.xml',
|
||||
)
|
||||
|
||||
custom_target(
|
||||
manpage_path = fs.stem(manpage) + '.' + category.to_string()
|
||||
manpage_target = custom_target(
|
||||
command: [
|
||||
xmlto,
|
||||
'-m', '@INPUT0@',
|
||||
|
@ -391,7 +392,7 @@ foreach manpage, category : manpages
|
|||
'manpage-normal.xsl',
|
||||
'manpage-bold-literal.xsl',
|
||||
],
|
||||
output: fs.stem(manpage) + '.' + category.to_string(),
|
||||
output: manpage_path,
|
||||
install: true,
|
||||
install_dir: get_option('mandir') / 'man' + category.to_string(),
|
||||
)
|
||||
|
|
|
@ -2,11 +2,11 @@ PRETTY FORMATS
|
|||
--------------
|
||||
|
||||
If the commit is a merge, and if the pretty-format
|
||||
is not `oneline`, `email` or `raw`, an additional line is
|
||||
inserted before the `Author:` line. This line begins with
|
||||
is not 'oneline', 'email' or 'raw', an additional line is
|
||||
inserted before the 'Author:' line. This line begins with
|
||||
"Merge: " and the hashes of ancestral commits are printed,
|
||||
separated by spaces. Note that the listed commits may not
|
||||
necessarily be the list of the 'direct' parent commits if you
|
||||
necessarily be the list of the *direct* parent commits if you
|
||||
have limited your view of history: for example, if you are
|
||||
only interested in changes related to a certain directory or
|
||||
file.
|
||||
|
@ -14,24 +14,24 @@ file.
|
|||
There are several built-in formats, and you can define
|
||||
additional formats by setting a pretty.<name>
|
||||
config option to either another format name, or a
|
||||
`format:` string, as described below (see
|
||||
'format:' string, as described below (see
|
||||
linkgit:git-config[1]). Here are the details of the
|
||||
built-in formats:
|
||||
|
||||
* `oneline`
|
||||
* 'oneline'
|
||||
|
||||
<hash> <title-line>
|
||||
+
|
||||
This is designed to be as compact as possible.
|
||||
|
||||
* `short`
|
||||
* 'short'
|
||||
|
||||
commit <hash>
|
||||
Author: <author>
|
||||
|
||||
<title-line>
|
||||
|
||||
* `medium`
|
||||
* 'medium'
|
||||
|
||||
commit <hash>
|
||||
Author: <author>
|
||||
|
@ -41,7 +41,7 @@ This is designed to be as compact as possible.
|
|||
|
||||
<full-commit-message>
|
||||
|
||||
* `full`
|
||||
* 'full'
|
||||
|
||||
commit <hash>
|
||||
Author: <author>
|
||||
|
@ -51,7 +51,7 @@ This is designed to be as compact as possible.
|
|||
|
||||
<full-commit-message>
|
||||
|
||||
* `fuller`
|
||||
* 'fuller'
|
||||
|
||||
commit <hash>
|
||||
Author: <author>
|
||||
|
@ -63,18 +63,18 @@ This is designed to be as compact as possible.
|
|||
|
||||
<full-commit-message>
|
||||
|
||||
* `reference`
|
||||
* 'reference'
|
||||
|
||||
<abbrev-hash> (<title-line>, <short-author-date>)
|
||||
+
|
||||
This format is used to refer to another commit in a commit message and
|
||||
is the same as ++--pretty=\'format:%C(auto)%h (%s, %ad)'++. By default,
|
||||
is the same as `--pretty='format:%C(auto)%h (%s, %ad)'`. By default,
|
||||
the date is formatted with `--date=short` unless another `--date` option
|
||||
is explicitly specified. As with any `format:` with format
|
||||
placeholders, its output is not affected by other options like
|
||||
`--decorate` and `--walk-reflogs`.
|
||||
|
||||
* `email`
|
||||
* 'email'
|
||||
|
||||
From <hash> <date>
|
||||
From: <author>
|
||||
|
@ -83,30 +83,30 @@ placeholders, its output is not affected by other options like
|
|||
|
||||
<full-commit-message>
|
||||
|
||||
* `mboxrd`
|
||||
* 'mboxrd'
|
||||
+
|
||||
Like `email`, but lines in the commit message starting with "From "
|
||||
Like 'email', but lines in the commit message starting with "From "
|
||||
(preceded by zero or more ">") are quoted with ">" so they aren't
|
||||
confused as starting a new commit.
|
||||
|
||||
* `raw`
|
||||
* 'raw'
|
||||
+
|
||||
The `raw` format shows the entire commit exactly as
|
||||
The 'raw' format shows the entire commit exactly as
|
||||
stored in the commit object. Notably, the hashes are
|
||||
displayed in full, regardless of whether `--abbrev` or
|
||||
`--no-abbrev` are used, and 'parents' information show the
|
||||
displayed in full, regardless of whether --abbrev or
|
||||
--no-abbrev are used, and 'parents' information show the
|
||||
true parent commits, without taking grafts or history
|
||||
simplification into account. Note that this format affects the way
|
||||
commits are displayed, but not the way the diff is shown e.g. with
|
||||
`git log --raw`. To get full object names in a raw diff format,
|
||||
use `--no-abbrev`.
|
||||
|
||||
* `format:<format-string>`
|
||||
* 'format:<format-string>'
|
||||
+
|
||||
The `format:<format-string>` format allows you to specify which information
|
||||
The 'format:<format-string>' format allows you to specify which information
|
||||
you want to show. It works a little bit like printf format,
|
||||
with the notable exception that you get a newline with `%n`
|
||||
instead of `\n`.
|
||||
with the notable exception that you get a newline with '%n'
|
||||
instead of '\n'.
|
||||
+
|
||||
E.g, 'format:"The author of %h was %an, %ar%nThe title was >>%s<<%n"'
|
||||
would show something like this:
|
||||
|
@ -120,161 +120,158 @@ The title was >>t4119: test autocomputing -p<n> for traditional diff input.<<
|
|||
The placeholders are:
|
||||
|
||||
- Placeholders that expand to a single literal character:
|
||||
++%n++:: newline
|
||||
++%%++:: a raw ++%++
|
||||
++%x00++:: ++%x++ followed by two hexadecimal digits is replaced with a
|
||||
'%n':: newline
|
||||
'%%':: a raw '%'
|
||||
'%x00':: '%x' followed by two hexadecimal digits is replaced with a
|
||||
byte with the hexadecimal digits' value (we will call this
|
||||
"literal formatting code" in the rest of this document).
|
||||
|
||||
- Placeholders that affect formatting of later placeholders:
|
||||
++%Cred++:: switch color to red
|
||||
++%Cgreen++:: switch color to green
|
||||
++%Cblue++:: switch color to blue
|
||||
++%Creset++:: reset color
|
||||
++%C(++_<spec>_++)++:: color specification, as described under Values in the
|
||||
'%Cred':: switch color to red
|
||||
'%Cgreen':: switch color to green
|
||||
'%Cblue':: switch color to blue
|
||||
'%Creset':: reset color
|
||||
'%C(...)':: color specification, as described under Values in the
|
||||
"CONFIGURATION FILE" section of linkgit:git-config[1]. By
|
||||
default, colors are shown only when enabled for log output
|
||||
(by `color.diff`, `color.ui`, or `--color`, and respecting
|
||||
the `auto` settings of the former if we are going to a
|
||||
terminal). ++%C(auto,++_<spec>_++)++ is accepted as a historical
|
||||
synonym for the default (e.g., ++%C(auto,red)++). Specifying
|
||||
++%C(always,++_<spec>_++)++ will show the colors even when color is
|
||||
terminal). `%C(auto,...)` is accepted as a historical
|
||||
synonym for the default (e.g., `%C(auto,red)`). Specifying
|
||||
`%C(always,...)` will show the colors even when color is
|
||||
not otherwise enabled (though consider just using
|
||||
`--color=always` to enable color for the whole output,
|
||||
`--color=always` to enable color for the whole output,
|
||||
including this format and anything else git might color).
|
||||
`auto` alone (i.e. ++%C(auto)++) will turn on auto coloring
|
||||
`auto` alone (i.e. `%C(auto)`) will turn on auto coloring
|
||||
on the next placeholders until the color is switched
|
||||
again.
|
||||
++%m++:: left (`<`), right (`>`) or boundary (`-`) mark
|
||||
++%w(++`[<w>[,<i1>[,<i2>]]]`++)++:: switch line wrapping, like the `-w` option of
|
||||
'%m':: left (`<`), right (`>`) or boundary (`-`) mark
|
||||
'%w([<w>[,<i1>[,<i2>]]])':: switch line wrapping, like the -w option of
|
||||
linkgit:git-shortlog[1].
|
||||
++%<(++`<n>[,(trunc|ltrunc|mtrunc)]`++)++:: make the next placeholder take at
|
||||
'%<( <N> [,trunc|ltrunc|mtrunc])':: make the next placeholder take at
|
||||
least N column widths, padding spaces on
|
||||
the right if necessary. Optionally
|
||||
truncate (with ellipsis `..`) at the left (ltrunc) `..ft`,
|
||||
truncate (with ellipsis '..') at the left (ltrunc) `..ft`,
|
||||
the middle (mtrunc) `mi..le`, or the end
|
||||
(trunc) `rig..`, if the output is longer than
|
||||
_<n>_ columns.
|
||||
N columns.
|
||||
Note 1: that truncating
|
||||
only works correctly with _<n>_ >= 2.
|
||||
Note 2: spaces around the _<n>_ and _<m>_ (see below)
|
||||
only works correctly with N >= 2.
|
||||
Note 2: spaces around the N and M (see below)
|
||||
values are optional.
|
||||
Note 3: Emojis and other wide characters
|
||||
will take two display columns, which may
|
||||
over-run column boundaries.
|
||||
Note 4: decomposed character combining marks
|
||||
may be misplaced at padding boundaries.
|
||||
++%<|(++_<m>_ ++)++:: make the next placeholder take at least until _<m>_ th
|
||||
'%<|( <M> )':: make the next placeholder take at least until Mth
|
||||
display column, padding spaces on the right if necessary.
|
||||
Use negative _<m>_ values for column positions measured
|
||||
Use negative M values for column positions measured
|
||||
from the right hand edge of the terminal window.
|
||||
++%>(++_<n>_++)++::
|
||||
++%>|(++_<m>_++)++:: similar to ++%<(++_<n>_++)++, ++%<|(++_<m>_++)++ respectively,
|
||||
'%>( <N> )', '%>|( <M> )':: similar to '%<( <N> )', '%<|( <M> )' respectively,
|
||||
but padding spaces on the left
|
||||
++%>>(++_<n>_++)++::
|
||||
++%>>|(++_<m>_++)++:: similar to ++%>(++_<n>_++)++, ++%>|(++_<m>_++)++
|
||||
'%>>( <N> )', '%>>|( <M> )':: similar to '%>( <N> )', '%>|( <M> )'
|
||||
respectively, except that if the next
|
||||
placeholder takes more spaces than given and
|
||||
there are spaces on its left, use those
|
||||
spaces
|
||||
++%><(++_<n>_++)++::
|
||||
++%><|(++_<m>_++)++:: similar to ++%<(++_<n>_++)++, ++%<|(++_<m>_++)++
|
||||
'%><( <N> )', '%><|( <M> )':: similar to '%<( <N> )', '%<|( <M> )'
|
||||
respectively, but padding both sides
|
||||
(i.e. the text is centered)
|
||||
|
||||
- Placeholders that expand to information extracted from the commit:
|
||||
+%H+:: commit hash
|
||||
+%h+:: abbreviated commit hash
|
||||
+%T+:: tree hash
|
||||
+%t+:: abbreviated tree hash
|
||||
+%P+:: parent hashes
|
||||
+%p+:: abbreviated parent hashes
|
||||
+%an+:: author name
|
||||
+%aN+:: author name (respecting .mailmap, see linkgit:git-shortlog[1]
|
||||
'%H':: commit hash
|
||||
'%h':: abbreviated commit hash
|
||||
'%T':: tree hash
|
||||
'%t':: abbreviated tree hash
|
||||
'%P':: parent hashes
|
||||
'%p':: abbreviated parent hashes
|
||||
'%an':: author name
|
||||
'%aN':: author name (respecting .mailmap, see linkgit:git-shortlog[1]
|
||||
or linkgit:git-blame[1])
|
||||
+%ae+:: author email
|
||||
+%aE+:: author email (respecting .mailmap, see linkgit:git-shortlog[1]
|
||||
'%ae':: author email
|
||||
'%aE':: author email (respecting .mailmap, see linkgit:git-shortlog[1]
|
||||
or linkgit:git-blame[1])
|
||||
+%al+:: author email local-part (the part before the `@` sign)
|
||||
+%aL+:: author local-part (see +%al+) respecting .mailmap, see
|
||||
'%al':: author email local-part (the part before the '@' sign)
|
||||
'%aL':: author local-part (see '%al') respecting .mailmap, see
|
||||
linkgit:git-shortlog[1] or linkgit:git-blame[1])
|
||||
+%ad+:: author date (format respects --date= option)
|
||||
+%aD+:: author date, RFC2822 style
|
||||
+%ar+:: author date, relative
|
||||
+%at+:: author date, UNIX timestamp
|
||||
+%ai+:: author date, ISO 8601-like format
|
||||
+%aI+:: author date, strict ISO 8601 format
|
||||
+%as+:: author date, short format (`YYYY-MM-DD`)
|
||||
+%ah+:: author date, human style (like the `--date=human` option of
|
||||
'%ad':: author date (format respects --date= option)
|
||||
'%aD':: author date, RFC2822 style
|
||||
'%ar':: author date, relative
|
||||
'%at':: author date, UNIX timestamp
|
||||
'%ai':: author date, ISO 8601-like format
|
||||
'%aI':: author date, strict ISO 8601 format
|
||||
'%as':: author date, short format (`YYYY-MM-DD`)
|
||||
'%ah':: author date, human style (like the `--date=human` option of
|
||||
linkgit:git-rev-list[1])
|
||||
+%cn+:: committer name
|
||||
+%cN+:: committer name (respecting .mailmap, see
|
||||
'%cn':: committer name
|
||||
'%cN':: committer name (respecting .mailmap, see
|
||||
linkgit:git-shortlog[1] or linkgit:git-blame[1])
|
||||
+%ce+:: committer email
|
||||
+%cE+:: committer email (respecting .mailmap, see
|
||||
'%ce':: committer email
|
||||
'%cE':: committer email (respecting .mailmap, see
|
||||
linkgit:git-shortlog[1] or linkgit:git-blame[1])
|
||||
+%cl+:: committer email local-part (the part before the `@` sign)
|
||||
+%cL+:: committer local-part (see +%cl+) respecting .mailmap, see
|
||||
'%cl':: committer email local-part (the part before the '@' sign)
|
||||
'%cL':: committer local-part (see '%cl') respecting .mailmap, see
|
||||
linkgit:git-shortlog[1] or linkgit:git-blame[1])
|
||||
+%cd+:: committer date (format respects --date= option)
|
||||
+%cD+:: committer date, RFC2822 style
|
||||
+%cr+:: committer date, relative
|
||||
+%ct+:: committer date, UNIX timestamp
|
||||
+%ci+:: committer date, ISO 8601-like format
|
||||
+%cI+:: committer date, strict ISO 8601 format
|
||||
+%cs+:: committer date, short format (`YYYY-MM-DD`)
|
||||
+%ch+:: committer date, human style (like the `--date=human` option of
|
||||
'%cd':: committer date (format respects --date= option)
|
||||
'%cD':: committer date, RFC2822 style
|
||||
'%cr':: committer date, relative
|
||||
'%ct':: committer date, UNIX timestamp
|
||||
'%ci':: committer date, ISO 8601-like format
|
||||
'%cI':: committer date, strict ISO 8601 format
|
||||
'%cs':: committer date, short format (`YYYY-MM-DD`)
|
||||
'%ch':: committer date, human style (like the `--date=human` option of
|
||||
linkgit:git-rev-list[1])
|
||||
+%d+:: ref names, like the --decorate option of linkgit:git-log[1]
|
||||
+%D+:: ref names without the " (", ")" wrapping.
|
||||
++%(decorate++`[:<option>,...]`++)++::
|
||||
'%d':: ref names, like the --decorate option of linkgit:git-log[1]
|
||||
'%D':: ref names without the " (", ")" wrapping.
|
||||
'%(decorate[:<options>])'::
|
||||
ref names with custom decorations. The `decorate` string may be followed by a
|
||||
colon and zero or more comma-separated options. Option values may contain
|
||||
literal formatting codes. These must be used for commas (`%x2C`) and closing
|
||||
parentheses (`%x29`), due to their role in the option syntax.
|
||||
+
|
||||
** `prefix=<value>`: Shown before the list of ref names. Defaults to "{nbsp}+(+".
|
||||
** `suffix=<value>`: Shown after the list of ref names. Defaults to "+)+".
|
||||
** `separator=<value>`: Shown between ref names. Defaults to "+,+{nbsp}".
|
||||
** `pointer=<value>`: Shown between HEAD and the branch it points to, if any.
|
||||
Defaults to "{nbsp}+->+{nbsp}".
|
||||
** `tag=<value>`: Shown before tag names. Defaults to "`tag:`{nbsp}".
|
||||
** 'prefix=<value>': Shown before the list of ref names. Defaults to "{nbsp}`(`".
|
||||
** 'suffix=<value>': Shown after the list of ref names. Defaults to "`)`".
|
||||
** 'separator=<value>': Shown between ref names. Defaults to "`,`{nbsp}".
|
||||
** 'pointer=<value>': Shown between HEAD and the branch it points to, if any.
|
||||
Defaults to "{nbsp}`->`{nbsp}".
|
||||
** 'tag=<value>': Shown before tag names. Defaults to "`tag:`{nbsp}".
|
||||
|
||||
+
|
||||
For example, to produce decorations with no wrapping
|
||||
or tag annotations, and spaces as separators:
|
||||
+
|
||||
++%(decorate:prefix=,suffix=,tag=,separator= )++
|
||||
`%(decorate:prefix=,suffix=,tag=,separator= )`
|
||||
|
||||
++%(describe++`[:<option>,...]`++)++::
|
||||
'%(describe[:<options>])'::
|
||||
human-readable name, like linkgit:git-describe[1]; empty string for
|
||||
undescribable commits. The `describe` string may be followed by a colon and
|
||||
zero or more comma-separated options. Descriptions can be inconsistent when
|
||||
tags are added or removed at the same time.
|
||||
+
|
||||
** `tags[=<bool-value>]`: Instead of only considering annotated tags,
|
||||
** 'tags[=<bool-value>]': Instead of only considering annotated tags,
|
||||
consider lightweight tags as well.
|
||||
** `abbrev=<number>`: Instead of using the default number of hexadecimal digits
|
||||
** 'abbrev=<number>': Instead of using the default number of hexadecimal digits
|
||||
(which will vary according to the number of objects in the repository with a
|
||||
default of 7) of the abbreviated object name, use <number> digits, or as many
|
||||
digits as needed to form a unique object name.
|
||||
** `match=<pattern>`: Only consider tags matching the given
|
||||
`glob(7)` _<pattern>_, excluding the `refs/tags/` prefix.
|
||||
** `exclude=<pattern>`: Do not consider tags matching the given
|
||||
`glob(7)` _<pattern>_, excluding the `refs/tags/` prefix.
|
||||
** 'match=<pattern>': Only consider tags matching the given
|
||||
`glob(7)` pattern, excluding the "refs/tags/" prefix.
|
||||
** 'exclude=<pattern>': Do not consider tags matching the given
|
||||
`glob(7)` pattern, excluding the "refs/tags/" prefix.
|
||||
|
||||
+%S+:: ref name given on the command line by which the commit was reached
|
||||
'%S':: ref name given on the command line by which the commit was reached
|
||||
(like `git log --source`), only works with `git log`
|
||||
+%e+:: encoding
|
||||
+%s+:: subject
|
||||
+%f+:: sanitized subject line, suitable for a filename
|
||||
+%b+:: body
|
||||
+%B+:: raw body (unwrapped subject and body)
|
||||
'%e':: encoding
|
||||
'%s':: subject
|
||||
'%f':: sanitized subject line, suitable for a filename
|
||||
'%b':: body
|
||||
'%B':: raw body (unwrapped subject and body)
|
||||
ifndef::git-rev-list[]
|
||||
+%N+:: commit notes
|
||||
'%N':: commit notes
|
||||
endif::git-rev-list[]
|
||||
+%GG+:: raw verification message from GPG for a signed commit
|
||||
+%G?+:: show "G" for a good (valid) signature,
|
||||
'%GG':: raw verification message from GPG for a signed commit
|
||||
'%G?':: show "G" for a good (valid) signature,
|
||||
"B" for a bad signature,
|
||||
"U" for a good signature with unknown validity,
|
||||
"X" for a good signature that has expired,
|
||||
|
@ -282,86 +279,86 @@ endif::git-rev-list[]
|
|||
"R" for a good signature made by a revoked key,
|
||||
"E" if the signature cannot be checked (e.g. missing key)
|
||||
and "N" for no signature
|
||||
+%GS+:: show the name of the signer for a signed commit
|
||||
+%GK+:: show the key used to sign a signed commit
|
||||
+%GF+:: show the fingerprint of the key used to sign a signed commit
|
||||
+%GP+:: show the fingerprint of the primary key whose subkey was used
|
||||
'%GS':: show the name of the signer for a signed commit
|
||||
'%GK':: show the key used to sign a signed commit
|
||||
'%GF':: show the fingerprint of the key used to sign a signed commit
|
||||
'%GP':: show the fingerprint of the primary key whose subkey was used
|
||||
to sign a signed commit
|
||||
+%GT+:: show the trust level for the key used to sign a signed commit
|
||||
+%gD+:: reflog selector, e.g., `refs/stash@{1}` or `refs/stash@{2
|
||||
'%GT':: show the trust level for the key used to sign a signed commit
|
||||
'%gD':: reflog selector, e.g., `refs/stash@{1}` or `refs/stash@{2
|
||||
minutes ago}`; the format follows the rules described for the
|
||||
`-g` option. The portion before the `@` is the refname as
|
||||
given on the command line (so `git log -g refs/heads/master`
|
||||
would yield `refs/heads/master@{0}`).
|
||||
+%gd+:: shortened reflog selector; same as `%gD`, but the refname
|
||||
'%gd':: shortened reflog selector; same as `%gD`, but the refname
|
||||
portion is shortened for human readability (so
|
||||
`refs/heads/master` becomes just `master`).
|
||||
+%gn+:: reflog identity name
|
||||
+%gN+:: reflog identity name (respecting .mailmap, see
|
||||
'%gn':: reflog identity name
|
||||
'%gN':: reflog identity name (respecting .mailmap, see
|
||||
linkgit:git-shortlog[1] or linkgit:git-blame[1])
|
||||
+%ge+:: reflog identity email
|
||||
+%gE+:: reflog identity email (respecting .mailmap, see
|
||||
'%ge':: reflog identity email
|
||||
'%gE':: reflog identity email (respecting .mailmap, see
|
||||
linkgit:git-shortlog[1] or linkgit:git-blame[1])
|
||||
+%gs+:: reflog subject
|
||||
++%(trailers++`[:<option>,...]`++)++::
|
||||
'%gs':: reflog subject
|
||||
'%(trailers[:<options>])'::
|
||||
display the trailers of the body as interpreted by
|
||||
linkgit:git-interpret-trailers[1]. The `trailers` string may be followed by
|
||||
a colon and zero or more comma-separated options. If any option is provided
|
||||
multiple times, the last occurrence wins.
|
||||
+
|
||||
** `key=<key>`: only show trailers with specified <key>. Matching is done
|
||||
** 'key=<key>': only show trailers with specified <key>. Matching is done
|
||||
case-insensitively and trailing colon is optional. If option is
|
||||
given multiple times trailer lines matching any of the keys are
|
||||
shown. This option automatically enables the `only` option so that
|
||||
non-trailer lines in the trailer block are hidden. If that is not
|
||||
desired it can be disabled with `only=false`. E.g.,
|
||||
+%(trailers:key=Reviewed-by)+ shows trailer lines with key
|
||||
`%(trailers:key=Reviewed-by)` shows trailer lines with key
|
||||
`Reviewed-by`.
|
||||
** `only[=<bool>]`: select whether non-trailer lines from the trailer
|
||||
** 'only[=<bool>]': select whether non-trailer lines from the trailer
|
||||
block should be included.
|
||||
** `separator=<sep>`: specify the separator inserted between trailer
|
||||
** 'separator=<sep>': specify the separator inserted between trailer
|
||||
lines. Defaults to a line feed character. The string <sep> may contain
|
||||
the literal formatting codes described above. To use comma as
|
||||
separator one must use `%x2C` as it would otherwise be parsed as
|
||||
next option. E.g., +%(trailers:key=Ticket,separator=%x2C )+
|
||||
next option. E.g., `%(trailers:key=Ticket,separator=%x2C )`
|
||||
shows all trailer lines whose key is "Ticket" separated by a comma
|
||||
and a space.
|
||||
** `unfold[=<bool>]`: make it behave as if interpret-trailer's `--unfold`
|
||||
** 'unfold[=<bool>]': make it behave as if interpret-trailer's `--unfold`
|
||||
option was given. E.g.,
|
||||
+%(trailers:only,unfold=true)+ unfolds and shows all trailer lines.
|
||||
** `keyonly[=<bool>]`: only show the key part of the trailer.
|
||||
** `valueonly[=<bool>]`: only show the value part of the trailer.
|
||||
** `key_value_separator=<sep>`: specify the separator inserted between
|
||||
`%(trailers:only,unfold=true)` unfolds and shows all trailer lines.
|
||||
** 'keyonly[=<bool>]': only show the key part of the trailer.
|
||||
** 'valueonly[=<bool>]': only show the value part of the trailer.
|
||||
** 'key_value_separator=<sep>': specify the separator inserted between
|
||||
the key and value of each trailer. Defaults to ": ". Otherwise it
|
||||
shares the same semantics as `separator=<sep>` above.
|
||||
shares the same semantics as 'separator=<sep>' above.
|
||||
|
||||
NOTE: Some placeholders may depend on other options given to the
|
||||
revision traversal engine. For example, the +%g*+ reflog options will
|
||||
revision traversal engine. For example, the `%g*` reflog options will
|
||||
insert an empty string unless we are traversing reflog entries (e.g., by
|
||||
`git log -g`). The +%d+ and +%D+ placeholders will use the "short"
|
||||
`git log -g`). The `%d` and `%D` placeholders will use the "short"
|
||||
decoration format if `--decorate` was not already provided on the command
|
||||
line.
|
||||
|
||||
The boolean options accept an optional value `[=<bool-value>]`. The
|
||||
values taken by `--type=bool` linkgit:git-config[1], like `yes` and `off`,
|
||||
values taken by `--type=bool` git-config[1], like `yes` and `off`,
|
||||
are all accepted. Giving a boolean option without `=<value>` is
|
||||
equivalent to giving it with `=true`.
|
||||
|
||||
If you add a `+` (plus sign) after +%+ of a placeholder, a line-feed
|
||||
If you add a `+` (plus sign) after '%' of a placeholder, a line-feed
|
||||
is inserted immediately before the expansion if and only if the
|
||||
placeholder expands to a non-empty string.
|
||||
|
||||
If you add a `-` (minus sign) after +%+ of a placeholder, all consecutive
|
||||
If you add a `-` (minus sign) after '%' of a placeholder, all consecutive
|
||||
line-feeds immediately preceding the expansion are deleted if and only if the
|
||||
placeholder expands to an empty string.
|
||||
|
||||
If you add a `' '` (space) after +%+ of a placeholder, a space
|
||||
If you add a ` ` (space) after '%' of a placeholder, a space
|
||||
is inserted immediately before the expansion if and only if the
|
||||
placeholder expands to a non-empty string.
|
||||
|
||||
* `tformat:`
|
||||
* 'tformat:'
|
||||
+
|
||||
The `tformat:` format works exactly like `format:`, except that it
|
||||
The 'tformat:' format works exactly like 'format:', except that it
|
||||
provides "terminator" semantics instead of "separator" semantics. In
|
||||
other words, each commit has the message terminator character (usually a
|
||||
newline) appended, rather than a separator placed between entries.
|
||||
|
@ -381,7 +378,7 @@ $ git log -2 --pretty=tformat:%h 4da45bef \
|
|||
7134973
|
||||
---------------------
|
||||
+
|
||||
In addition, any unrecognized string that has a +%+ in it is interpreted
|
||||
In addition, any unrecognized string that has a `%` in it is interpreted
|
||||
as if it has `tformat:` in front of it. For example, these two are
|
||||
equivalent:
|
||||
+
|
||||
|
|
|
@ -1,38 +1,38 @@
|
|||
`--pretty[=<format>]`::
|
||||
`--format=<format>`::
|
||||
--pretty[=<format>]::
|
||||
--format=<format>::
|
||||
|
||||
Pretty-print the contents of the commit logs in a given format,
|
||||
where '<format>' can be one of `oneline`, `short`, `medium`,
|
||||
`full`, `fuller`, `reference`, `email`, `raw`, `format:<string>`
|
||||
and `tformat:<string>`. When _<format>_ is none of the above,
|
||||
and has `%<placeholder>` in it, it acts as if
|
||||
`--pretty=tformat:<format>` were given.
|
||||
where '<format>' can be one of 'oneline', 'short', 'medium',
|
||||
'full', 'fuller', 'reference', 'email', 'raw', 'format:<string>'
|
||||
and 'tformat:<string>'. When '<format>' is none of the above,
|
||||
and has '%placeholder' in it, it acts as if
|
||||
'--pretty=tformat:<format>' were given.
|
||||
+
|
||||
See the "PRETTY FORMATS" section for some additional details for each
|
||||
format. When `=<format>` part is omitted, it defaults to `medium`.
|
||||
format. When '=<format>' part is omitted, it defaults to 'medium'.
|
||||
+
|
||||
NOTE: you can specify the default pretty format in the repository
|
||||
Note: you can specify the default pretty format in the repository
|
||||
configuration (see linkgit:git-config[1]).
|
||||
|
||||
`--abbrev-commit`::
|
||||
--abbrev-commit::
|
||||
Instead of showing the full 40-byte hexadecimal commit object
|
||||
name, show a prefix that names the object uniquely.
|
||||
`--abbrev=<n>` (which also modifies diff output, if it is displayed)
|
||||
"--abbrev=<n>" (which also modifies diff output, if it is displayed)
|
||||
option can be used to specify the minimum length of the prefix.
|
||||
+
|
||||
This should make `--pretty=oneline` a whole lot more readable for
|
||||
This should make "--pretty=oneline" a whole lot more readable for
|
||||
people using 80-column terminals.
|
||||
|
||||
`--no-abbrev-commit`::
|
||||
--no-abbrev-commit::
|
||||
Show the full 40-byte hexadecimal commit object name. This negates
|
||||
`--abbrev-commit`, either explicit or implied by other options such
|
||||
as `--oneline`. It also overrides the `log.abbrevCommit` variable.
|
||||
as "--oneline". It also overrides the `log.abbrevCommit` variable.
|
||||
|
||||
`--oneline`::
|
||||
This is a shorthand for `--pretty=oneline --abbrev-commit`
|
||||
--oneline::
|
||||
This is a shorthand for "--pretty=oneline --abbrev-commit"
|
||||
used together.
|
||||
|
||||
`--encoding=<encoding>`::
|
||||
--encoding=<encoding>::
|
||||
Commit objects record the character encoding used for the log message
|
||||
in their encoding header; this option can be used to tell the
|
||||
command to re-code the commit log message in the encoding
|
||||
|
@ -44,30 +44,25 @@ people using 80-column terminals.
|
|||
to convert the commit, we will quietly output the original
|
||||
object verbatim.
|
||||
|
||||
`--expand-tabs=<n>`::
|
||||
`--expand-tabs`::
|
||||
`--no-expand-tabs`::
|
||||
--expand-tabs=<n>::
|
||||
--expand-tabs::
|
||||
--no-expand-tabs::
|
||||
Perform a tab expansion (replace each tab with enough spaces
|
||||
to fill to the next display column that is a multiple of _<n>_)
|
||||
to fill to the next display column that is a multiple of '<n>')
|
||||
in the log message before showing it in the output.
|
||||
`--expand-tabs` is a short-hand for `--expand-tabs=8`, and
|
||||
`--no-expand-tabs` is a short-hand for `--expand-tabs=0`,
|
||||
which disables tab expansion.
|
||||
+
|
||||
By default, tabs are expanded in pretty formats that indent the log
|
||||
message by 4 spaces (i.e. `medium`, which is the default, `full`,
|
||||
and `fuller`).
|
||||
message by 4 spaces (i.e. 'medium', which is the default, 'full',
|
||||
and 'fuller').
|
||||
|
||||
ifndef::git-rev-list[]
|
||||
`--notes[=<ref>]`::
|
||||
--notes[=<ref>]::
|
||||
Show the notes (see linkgit:git-notes[1]) that annotate the
|
||||
commit, when showing the commit log message. This is the default
|
||||
ifndef::with-breaking-changes[]
|
||||
for `git log`, `git show` and `git whatchanged` commands when
|
||||
endif::with-breaking-changes[]
|
||||
ifdef::with-breaking-changes[]
|
||||
for `git log` and `git show` commands when
|
||||
endif::with-breaking-changes[]
|
||||
there is no `--pretty`, `--format`, or `--oneline` option given
|
||||
on the command line.
|
||||
+
|
||||
|
@ -80,29 +75,28 @@ to display. The ref can specify the full refname when it begins
|
|||
with `refs/notes/`; when it begins with `notes/`, `refs/` and otherwise
|
||||
`refs/notes/` is prefixed to form the full name of the ref.
|
||||
+
|
||||
Multiple `--notes` options can be combined to control which notes are
|
||||
being displayed. Examples: "`--notes=foo`" will show only notes from
|
||||
`refs/notes/foo`; "`--notes=foo --notes`" will show both notes from
|
||||
Multiple --notes options can be combined to control which notes are
|
||||
being displayed. Examples: "--notes=foo" will show only notes from
|
||||
"refs/notes/foo"; "--notes=foo --notes" will show both notes from
|
||||
"refs/notes/foo" and from the default notes ref(s).
|
||||
|
||||
`--no-notes`::
|
||||
--no-notes::
|
||||
Do not show notes. This negates the above `--notes` option, by
|
||||
resetting the list of notes refs from which notes are shown.
|
||||
Options are parsed in the order given on the command line, so e.g.
|
||||
"`--notes --notes=foo --no-notes --notes=bar`" will only show notes
|
||||
from `refs/notes/bar`.
|
||||
"--notes --notes=foo --no-notes --notes=bar" will only show notes
|
||||
from "refs/notes/bar".
|
||||
|
||||
`--show-notes-by-default`::
|
||||
--show-notes-by-default::
|
||||
Show the default notes unless options for displaying specific
|
||||
notes are given.
|
||||
|
||||
`--show-notes[=<ref>]`::
|
||||
`--standard-notes`::
|
||||
`--no-standard-notes`::
|
||||
These options are deprecated. Use the above `--notes`/`--no-notes`
|
||||
--show-notes[=<ref>]::
|
||||
--[no-]standard-notes::
|
||||
These options are deprecated. Use the above --notes/--no-notes
|
||||
options instead.
|
||||
endif::git-rev-list[]
|
||||
|
||||
`--show-signature`::
|
||||
--show-signature::
|
||||
Check the validity of a signed commit object by passing the signature
|
||||
to `gpg --verify` and show the output.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
`--rerere-autoupdate`::
|
||||
`--no-rerere-autoupdate`::
|
||||
--rerere-autoupdate::
|
||||
--no-rerere-autoupdate::
|
||||
After the rerere mechanism reuses a recorded resolution on
|
||||
the current conflict to update the files in the working
|
||||
tree, allow it to also update the index with the result of
|
||||
|
|
|
@ -26,8 +26,8 @@ endif::git-log[]
|
|||
means "list all the commits which are reachable from 'foo' or 'bar', but
|
||||
not from 'baz'".
|
||||
|
||||
A special notation "`<commit1>..<commit2>`" can be used as a
|
||||
short-hand for "`^<commit1> <commit2>`". For example, either of
|
||||
A special notation "'<commit1>'..'<commit2>'" can be used as a
|
||||
short-hand for "^'<commit1>' '<commit2>'". For example, either of
|
||||
the following may be used interchangeably:
|
||||
|
||||
ifdef::git-rev-list[]
|
||||
|
@ -43,7 +43,7 @@ $ git log HEAD ^origin
|
|||
-----------------------------------------------------------------------
|
||||
endif::git-log[]
|
||||
|
||||
Another special notation is "`<commit1>...<commit2>`" which is useful
|
||||
Another special notation is "'<commit1>'...'<commit2>'" which is useful
|
||||
for merges. The resulting set of commits is the symmetric difference
|
||||
between the two operands. The following two commands are equivalent:
|
||||
|
||||
|
|
|
@ -6,60 +6,60 @@ special notations explained in the description, additional commit
|
|||
limiting may be applied.
|
||||
|
||||
Using more options generally further limits the output (e.g.
|
||||
`--since=<date1>` limits to commits newer than _<date1>_, and using it
|
||||
`--since=<date1>` limits to commits newer than `<date1>`, and using it
|
||||
with `--grep=<pattern>` further limits to commits whose log message
|
||||
has a line that matches _<pattern>_), unless otherwise noted.
|
||||
has a line that matches `<pattern>`), unless otherwise noted.
|
||||
|
||||
Note that these are applied before commit
|
||||
ordering and formatting options, such as `--reverse`.
|
||||
|
||||
`-<number>`::
|
||||
`-n <number>`::
|
||||
`--max-count=<number>`::
|
||||
Limit the output to _<number>_ commits.
|
||||
-<number>::
|
||||
-n <number>::
|
||||
--max-count=<number>::
|
||||
Limit the number of commits to output.
|
||||
|
||||
`--skip=<number>`::
|
||||
Skip _<number>_ commits before starting to show the commit output.
|
||||
--skip=<number>::
|
||||
Skip 'number' commits before starting to show the commit output.
|
||||
|
||||
`--since=<date>`::
|
||||
`--after=<date>`::
|
||||
Show commits more recent than _<date>_.
|
||||
--since=<date>::
|
||||
--after=<date>::
|
||||
Show commits more recent than a specific date.
|
||||
|
||||
`--since-as-filter=<date>`::
|
||||
Show all commits more recent than _<date>_. This visits
|
||||
--since-as-filter=<date>::
|
||||
Show all commits more recent than a specific date. This visits
|
||||
all commits in the range, rather than stopping at the first commit which
|
||||
is older than _<date>_.
|
||||
is older than a specific date.
|
||||
|
||||
`--until=<date>`::
|
||||
`--before=<date>`::
|
||||
Show commits older than _<date>_.
|
||||
--until=<date>::
|
||||
--before=<date>::
|
||||
Show commits older than a specific date.
|
||||
|
||||
ifdef::git-rev-list[]
|
||||
`--max-age=<timestamp>`::
|
||||
`--min-age=<timestamp>`::
|
||||
--max-age=<timestamp>::
|
||||
--min-age=<timestamp>::
|
||||
Limit the commits output to specified time range.
|
||||
endif::git-rev-list[]
|
||||
|
||||
`--author=<pattern>`::
|
||||
`--committer=<pattern>`::
|
||||
--author=<pattern>::
|
||||
--committer=<pattern>::
|
||||
Limit the commits output to ones with author/committer
|
||||
header lines that match the _<pattern>_ regular
|
||||
expression. With more than one `--author=<pattern>`,
|
||||
commits whose author matches any of the _<pattern>_ are
|
||||
header lines that match the specified pattern (regular
|
||||
expression). With more than one `--author=<pattern>`,
|
||||
commits whose author matches any of the given patterns are
|
||||
chosen (similarly for multiple `--committer=<pattern>`).
|
||||
|
||||
`--grep-reflog=<pattern>`::
|
||||
--grep-reflog=<pattern>::
|
||||
Limit the commits output to ones with reflog entries that
|
||||
match the _<pattern>_ regular expression. With
|
||||
match the specified pattern (regular expression). With
|
||||
more than one `--grep-reflog`, commits whose reflog message
|
||||
matches any of the given patterns are chosen. It is an
|
||||
error to use this option unless `--walk-reflogs` is in use.
|
||||
|
||||
`--grep=<pattern>`::
|
||||
--grep=<pattern>::
|
||||
Limit the commits output to ones with a log message that
|
||||
matches the _<pattern>_ regular expression. With
|
||||
matches the specified pattern (regular expression). With
|
||||
more than one `--grep=<pattern>`, commits whose message
|
||||
matches any of the _<pattern>_ are chosen (but see
|
||||
matches any of the given patterns are chosen (but see
|
||||
`--all-match`).
|
||||
ifndef::git-rev-list[]
|
||||
+
|
||||
|
@ -67,35 +67,35 @@ When `--notes` is in effect, the message from the notes is
|
|||
matched as if it were part of the log message.
|
||||
endif::git-rev-list[]
|
||||
|
||||
`--all-match`::
|
||||
--all-match::
|
||||
Limit the commits output to ones that match all given `--grep`,
|
||||
instead of ones that match at least one.
|
||||
|
||||
`--invert-grep`::
|
||||
--invert-grep::
|
||||
Limit the commits output to ones with a log message that do not
|
||||
match the _<pattern>_ specified with `--grep=<pattern>`.
|
||||
match the pattern specified with `--grep=<pattern>`.
|
||||
|
||||
`-i`::
|
||||
`--regexp-ignore-case`::
|
||||
-i::
|
||||
--regexp-ignore-case::
|
||||
Match the regular expression limiting patterns without regard to letter
|
||||
case.
|
||||
|
||||
`--basic-regexp`::
|
||||
--basic-regexp::
|
||||
Consider the limiting patterns to be basic regular expressions;
|
||||
this is the default.
|
||||
|
||||
`-E`::
|
||||
`--extended-regexp`::
|
||||
-E::
|
||||
--extended-regexp::
|
||||
Consider the limiting patterns to be extended regular expressions
|
||||
instead of the default basic regular expressions.
|
||||
|
||||
`-F`::
|
||||
`--fixed-strings`::
|
||||
-F::
|
||||
--fixed-strings::
|
||||
Consider the limiting patterns to be fixed strings (don't interpret
|
||||
pattern as a regular expression).
|
||||
|
||||
`-P`::
|
||||
`--perl-regexp`::
|
||||
-P::
|
||||
--perl-regexp::
|
||||
Consider the limiting patterns to be Perl-compatible regular
|
||||
expressions.
|
||||
+
|
||||
|
@ -103,20 +103,20 @@ Support for these types of regular expressions is an optional
|
|||
compile-time dependency. If Git wasn't compiled with support for them
|
||||
providing this option will cause it to die.
|
||||
|
||||
`--remove-empty`::
|
||||
--remove-empty::
|
||||
Stop when a given path disappears from the tree.
|
||||
|
||||
`--merges`::
|
||||
--merges::
|
||||
Print only merge commits. This is exactly the same as `--min-parents=2`.
|
||||
|
||||
`--no-merges`::
|
||||
--no-merges::
|
||||
Do not print commits with more than one parent. This is
|
||||
exactly the same as `--max-parents=1`.
|
||||
|
||||
`--min-parents=<number>`::
|
||||
`--max-parents=<number>`::
|
||||
`--no-min-parents`::
|
||||
`--no-max-parents`::
|
||||
--min-parents=<number>::
|
||||
--max-parents=<number>::
|
||||
--no-min-parents::
|
||||
--no-max-parents::
|
||||
Show only commits which have at least (or at most) that many parent
|
||||
commits. In particular, `--max-parents=1` is the same as `--no-merges`,
|
||||
`--min-parents=2` is the same as `--merges`. `--max-parents=0`
|
||||
|
@ -126,7 +126,7 @@ providing this option will cause it to die.
|
|||
again. Equivalent forms are `--min-parents=0` (any commit has 0 or more
|
||||
parents) and `--max-parents=-1` (negative numbers denote no upper limit).
|
||||
|
||||
`--first-parent`::
|
||||
--first-parent::
|
||||
When finding commits to include, follow only the first
|
||||
parent commit upon seeing a merge commit. This option
|
||||
can give a better overview when viewing the evolution of
|
||||
|
@ -141,14 +141,14 @@ This option also changes default diff format for merge commits
|
|||
to `first-parent`, see `--diff-merges=first-parent` for details.
|
||||
endif::git-log[]
|
||||
|
||||
`--exclude-first-parent-only`::
|
||||
--exclude-first-parent-only::
|
||||
When finding commits to exclude (with a '{caret}'), follow only
|
||||
the first parent commit upon seeing a merge commit.
|
||||
This can be used to find the set of changes in a topic branch
|
||||
from the point where it diverged from the remote branch, given
|
||||
that arbitrary merges can be valid topic branch changes.
|
||||
|
||||
`--not`::
|
||||
--not::
|
||||
Reverses the meaning of the '{caret}' prefix (or lack thereof)
|
||||
for all following revision specifiers, up to the next `--not`.
|
||||
When used on the command line before --stdin, the revisions passed
|
||||
|
@ -156,37 +156,37 @@ endif::git-log[]
|
|||
via standard input, the revisions passed on the command line will
|
||||
not be affected by it.
|
||||
|
||||
`--all`::
|
||||
--all::
|
||||
Pretend as if all the refs in `refs/`, along with `HEAD`, are
|
||||
listed on the command line as _<commit>_.
|
||||
listed on the command line as '<commit>'.
|
||||
|
||||
`--branches[=<pattern>]`::
|
||||
--branches[=<pattern>]::
|
||||
Pretend as if all the refs in `refs/heads` are listed
|
||||
on the command line as _<commit>_. If _<pattern>_ is given, limit
|
||||
branches to ones matching given shell glob. If _<pattern>_ lacks '?',
|
||||
on the command line as '<commit>'. If '<pattern>' is given, limit
|
||||
branches to ones matching given shell glob. If pattern lacks '?',
|
||||
'{asterisk}', or '[', '/{asterisk}' at the end is implied.
|
||||
|
||||
`--tags[=<pattern>]`::
|
||||
--tags[=<pattern>]::
|
||||
Pretend as if all the refs in `refs/tags` are listed
|
||||
on the command line as _<commit>_. If _<pattern>_ is given, limit
|
||||
on the command line as '<commit>'. If '<pattern>' is given, limit
|
||||
tags to ones matching given shell glob. If pattern lacks '?', '{asterisk}',
|
||||
or '[', '/{asterisk}' at the end is implied.
|
||||
|
||||
`--remotes[=<pattern>]`::
|
||||
--remotes[=<pattern>]::
|
||||
Pretend as if all the refs in `refs/remotes` are listed
|
||||
on the command line as _<commit>_. If _<pattern>_ is given, limit
|
||||
on the command line as '<commit>'. If '<pattern>' is given, limit
|
||||
remote-tracking branches to ones matching given shell glob.
|
||||
If pattern lacks '?', '{asterisk}', or '[', '/{asterisk}' at the end is implied.
|
||||
|
||||
`--glob=<glob-pattern>`::
|
||||
Pretend as if all the refs matching shell glob _<glob-pattern>_
|
||||
are listed on the command line as _<commit>_. Leading 'refs/',
|
||||
--glob=<glob-pattern>::
|
||||
Pretend as if all the refs matching shell glob '<glob-pattern>'
|
||||
are listed on the command line as '<commit>'. Leading 'refs/',
|
||||
is automatically prepended if missing. If pattern lacks '?', '{asterisk}',
|
||||
or '[', '/{asterisk}' at the end is implied.
|
||||
|
||||
`--exclude=<glob-pattern>`::
|
||||
--exclude=<glob-pattern>::
|
||||
|
||||
Do not include refs matching _<glob-pattern>_ that the next `--all`,
|
||||
Do not include refs matching '<glob-pattern>' that the next `--all`,
|
||||
`--branches`, `--tags`, `--remotes`, or `--glob` would otherwise
|
||||
consider. Repetitions of this option accumulate exclusion patterns
|
||||
up to the next `--all`, `--branches`, `--tags`, `--remotes`, or
|
||||
|
@ -199,7 +199,7 @@ respectively, and they must begin with `refs/` when applied to `--glob`
|
|||
or `--all`. If a trailing '/{asterisk}' is intended, it must be given
|
||||
explicitly.
|
||||
|
||||
`--exclude-hidden=(fetch|receive|uploadpack)`::
|
||||
--exclude-hidden=[fetch|receive|uploadpack]::
|
||||
Do not include refs that would be hidden by `git-fetch`,
|
||||
`git-receive-pack` or `git-upload-pack` by consulting the appropriate
|
||||
`fetch.hideRefs`, `receive.hideRefs` or `uploadpack.hideRefs`
|
||||
|
@ -207,11 +207,11 @@ explicitly.
|
|||
linkgit:git-config[1]). This option affects the next pseudo-ref option
|
||||
`--all` or `--glob` and is cleared after processing them.
|
||||
|
||||
`--reflog`::
|
||||
--reflog::
|
||||
Pretend as if all objects mentioned by reflogs are listed on the
|
||||
command line as _<commit>_.
|
||||
command line as `<commit>`.
|
||||
|
||||
`--alternate-refs`::
|
||||
--alternate-refs::
|
||||
Pretend as if all objects mentioned as ref tips of alternate
|
||||
repositories were listed on the command line. An alternate
|
||||
repository is any repository whose object directory is specified
|
||||
|
@ -219,7 +219,7 @@ explicitly.
|
|||
be modified by `core.alternateRefsCommand`, etc. See
|
||||
linkgit:git-config[1].
|
||||
|
||||
`--single-worktree`::
|
||||
--single-worktree::
|
||||
By default, all working trees will be examined by the
|
||||
following options when there are more than one (see
|
||||
linkgit:git-worktree[1]): `--all`, `--reflog` and
|
||||
|
@ -227,19 +227,19 @@ explicitly.
|
|||
This option forces them to examine the current working tree
|
||||
only.
|
||||
|
||||
`--ignore-missing`::
|
||||
--ignore-missing::
|
||||
Upon seeing an invalid object name in the input, pretend as if
|
||||
the bad input was not given.
|
||||
|
||||
ifndef::git-rev-list[]
|
||||
`--bisect`::
|
||||
--bisect::
|
||||
Pretend as if the bad bisection ref `refs/bisect/bad`
|
||||
was listed and as if it was followed by `--not` and the good
|
||||
bisection refs `refs/bisect/good-*` on the command
|
||||
line.
|
||||
endif::git-rev-list[]
|
||||
|
||||
`--stdin`::
|
||||
--stdin::
|
||||
In addition to getting arguments from the command line, read
|
||||
them from standard input as well. This accepts commits and
|
||||
pseudo-options like `--all` and `--glob=`. When a `--` separator
|
||||
|
@ -249,15 +249,15 @@ endif::git-rev-list[]
|
|||
influence any subsequent command line arguments.
|
||||
|
||||
ifdef::git-rev-list[]
|
||||
`--quiet`::
|
||||
--quiet::
|
||||
Don't print anything to standard output. This form
|
||||
is primarily meant to allow the caller to
|
||||
test the exit status to see if a range of objects is fully
|
||||
connected (or not). It is faster than redirecting stdout
|
||||
to `/dev/null` as the output does not have to be formatted.
|
||||
|
||||
`--disk-usage`::
|
||||
`--disk-usage=human`::
|
||||
--disk-usage::
|
||||
--disk-usage=human::
|
||||
Suppress normal output; instead, print the sum of the bytes used
|
||||
for on-disk storage by the selected commits or objects. This is
|
||||
equivalent to piping the output into `git cat-file
|
||||
|
@ -269,11 +269,11 @@ ifdef::git-rev-list[]
|
|||
in human-readable string(e.g. 12.24 Kib, 3.50 Mib).
|
||||
endif::git-rev-list[]
|
||||
|
||||
`--cherry-mark`::
|
||||
--cherry-mark::
|
||||
Like `--cherry-pick` (see below) but mark equivalent commits
|
||||
with `=` rather than omitting them, and inequivalent ones with `+`.
|
||||
|
||||
`--cherry-pick`::
|
||||
--cherry-pick::
|
||||
Omit any commit that introduces the same change as
|
||||
another commit on the ``other side'' when the set of
|
||||
commits are limited with symmetric difference.
|
||||
|
@ -286,8 +286,8 @@ cherry-picked from the other branch (for example, ``3rd on b'' may be
|
|||
cherry-picked from branch A). With this option, such pairs of commits are
|
||||
excluded from the output.
|
||||
|
||||
`--left-only`::
|
||||
`--right-only`::
|
||||
--left-only::
|
||||
--right-only::
|
||||
List only commits on the respective side of a symmetric difference,
|
||||
i.e. only those which would be marked `<` resp. `>` by
|
||||
`--left-right`.
|
||||
|
@ -298,20 +298,20 @@ commits from `B` which are in `A` or are patch-equivalent to a commit in
|
|||
More precisely, `--cherry-pick --right-only --no-merges` gives the exact
|
||||
list.
|
||||
|
||||
`--cherry`::
|
||||
--cherry::
|
||||
A synonym for `--right-only --cherry-mark --no-merges`; useful to
|
||||
limit the output to the commits on our side and mark those that
|
||||
have been applied to the other side of a forked history with
|
||||
`git log --cherry upstream...mybranch`, similar to
|
||||
`git cherry upstream mybranch`.
|
||||
|
||||
`-g`::
|
||||
`--walk-reflogs`::
|
||||
-g::
|
||||
--walk-reflogs::
|
||||
Instead of walking the commit ancestry chain, walk
|
||||
reflog entries from the most recent one to older ones.
|
||||
When this option is used you cannot specify commits to
|
||||
exclude (that is, `^<commit>`, `<commit1>..<commit2>`,
|
||||
and `<commit1>...<commit2>` notations cannot be used).
|
||||
exclude (that is, '{caret}commit', 'commit1..commit2',
|
||||
and 'commit1\...commit2' notations cannot be used).
|
||||
+
|
||||
With `--pretty` format other than `oneline` and `reference` (for obvious reasons),
|
||||
this causes the output to have two extra lines of information
|
||||
|
@ -340,29 +340,29 @@ See also linkgit:git-reflog[1].
|
|||
+
|
||||
Under `--pretty=reference`, this information will not be shown at all.
|
||||
|
||||
`--merge`::
|
||||
--merge::
|
||||
Show commits touching conflicted paths in the range `HEAD...<other>`,
|
||||
where `<other>` is the first existing pseudoref in `MERGE_HEAD`,
|
||||
`CHERRY_PICK_HEAD`, `REVERT_HEAD` or `REBASE_HEAD`. Only works
|
||||
when the index has unmerged entries. This option can be used to show
|
||||
relevant commits when resolving conflicts from a 3-way merge.
|
||||
|
||||
`--boundary`::
|
||||
--boundary::
|
||||
Output excluded boundary commits. Boundary commits are
|
||||
prefixed with `-`.
|
||||
|
||||
ifdef::git-rev-list[]
|
||||
`--use-bitmap-index`::
|
||||
--use-bitmap-index::
|
||||
|
||||
Try to speed up the traversal using the pack bitmap index (if
|
||||
one is available). Note that when traversing with `--objects`,
|
||||
trees and blobs will not have their associated path printed.
|
||||
|
||||
`--progress=<header>`::
|
||||
--progress=<header>::
|
||||
Show progress reports on stderr as objects are considered. The
|
||||
`<header>` text will be printed with each progress update.
|
||||
|
||||
`-z`::
|
||||
-z::
|
||||
Instead of being newline-delimited, each outputted object and its
|
||||
accompanying metadata is delimited using NUL bytes. Output is printed
|
||||
in the following form:
|
||||
|
@ -397,56 +397,56 @@ is how to do it, as there are various strategies to simplify the history.
|
|||
|
||||
The following options select the commits to be shown:
|
||||
|
||||
`<paths>`::
|
||||
<paths>::
|
||||
Commits modifying the given <paths> are selected.
|
||||
|
||||
`--simplify-by-decoration`::
|
||||
--simplify-by-decoration::
|
||||
Commits that are referred by some branch or tag are selected.
|
||||
|
||||
Note that extra commits can be shown to give a meaningful history.
|
||||
|
||||
The following options affect the way the simplification is performed:
|
||||
|
||||
`Default mode`::
|
||||
Default mode::
|
||||
Simplifies the history to the simplest history explaining the
|
||||
final state of the tree. Simplest because it prunes some side
|
||||
branches if the end result is the same (i.e. merging branches
|
||||
with the same content)
|
||||
|
||||
`--show-pulls`::
|
||||
--show-pulls::
|
||||
Include all commits from the default mode, but also any merge
|
||||
commits that are not TREESAME to the first parent but are
|
||||
TREESAME to a later parent. This mode is helpful for showing
|
||||
the merge commits that "first introduced" a change to a branch.
|
||||
|
||||
`--full-history`::
|
||||
--full-history::
|
||||
Same as the default mode, but does not prune some history.
|
||||
|
||||
`--dense`::
|
||||
--dense::
|
||||
Only the selected commits are shown, plus some to have a
|
||||
meaningful history.
|
||||
|
||||
`--sparse`::
|
||||
--sparse::
|
||||
All commits in the simplified history are shown.
|
||||
|
||||
`--simplify-merges`::
|
||||
--simplify-merges::
|
||||
Additional option to `--full-history` to remove some needless
|
||||
merges from the resulting history, as there are no selected
|
||||
commits contributing to this merge.
|
||||
|
||||
`--ancestry-path[=<commit>]`::
|
||||
When given a range of commits to display (e.g. `<commit1>..<commit2>`
|
||||
or `<commit2> ^<commit1>`), and a commit _<commit>_ in that range,
|
||||
--ancestry-path[=<commit>]::
|
||||
When given a range of commits to display (e.g. 'commit1..commit2'
|
||||
or 'commit2 {caret}commit1'), and a commit <commit> in that range,
|
||||
only display commits in that range
|
||||
that are ancestors of _<commit>_, descendants of _<commit>_, or
|
||||
_<commit>_ itself. If no commit is specified, use _<commit1>_ (the
|
||||
excluded part of the range) as _<commit>_. Can be passed multiple
|
||||
that are ancestors of <commit>, descendants of <commit>, or
|
||||
<commit> itself. If no commit is specified, use 'commit1' (the
|
||||
excluded part of the range) as <commit>. Can be passed multiple
|
||||
times; if so, a commit is included if it is any of the commits
|
||||
given or if it is an ancestor or descendant of one of them.
|
||||
|
||||
A more detailed explanation follows.
|
||||
|
||||
Suppose you specified `foo` as the _<paths>_. We shall call commits
|
||||
Suppose you specified `foo` as the <paths>. We shall call commits
|
||||
that modify `foo` !TREESAME, and the rest TREESAME. (In a diff
|
||||
filtered for `foo`, they look different and equal, respectively.)
|
||||
|
||||
|
@ -466,22 +466,22 @@ The horizontal line of history A---Q is taken to be the first parent of
|
|||
each merge. The commits are:
|
||||
|
||||
* `I` is the initial commit, in which `foo` exists with contents
|
||||
`asdf`, and a file `quux` exists with contents `quux`. Initial
|
||||
``asdf'', and a file `quux` exists with contents ``quux''. Initial
|
||||
commits are compared to an empty tree, so `I` is !TREESAME.
|
||||
|
||||
* In `A`, `foo` contains just `foo`.
|
||||
* In `A`, `foo` contains just ``foo''.
|
||||
|
||||
* `B` contains the same change as `A`. Its merge `M` is trivial and
|
||||
hence TREESAME to all parents.
|
||||
|
||||
* `C` does not change `foo`, but its merge `N` changes it to `foobar`,
|
||||
* `C` does not change `foo`, but its merge `N` changes it to ``foobar'',
|
||||
so it is not TREESAME to any parent.
|
||||
|
||||
* `D` sets `foo` to `baz`. Its merge `O` combines the strings from
|
||||
`N` and `D` to `foobarbaz`; i.e., it is not TREESAME to any parent.
|
||||
* `D` sets `foo` to ``baz''. Its merge `O` combines the strings from
|
||||
`N` and `D` to ``foobarbaz''; i.e., it is not TREESAME to any parent.
|
||||
|
||||
* `E` changes `quux` to `xyzzy`, and its merge `P` combines the
|
||||
strings to `quux xyzzy`. `P` is TREESAME to `O`, but not to `E`.
|
||||
* `E` changes `quux` to ``xyzzy'', and its merge `P` combines the
|
||||
strings to ``quux xyzzy''. `P` is TREESAME to `O`, but not to `E`.
|
||||
|
||||
* `X` is an independent root commit that added a new file `side`, and `Y`
|
||||
modified it. `Y` is TREESAME to `X`. Its merge `Q` added `side` to `P`, and
|
||||
|
@ -517,7 +517,7 @@ Parent/child relations are only visible with `--parents`, but that does
|
|||
not affect the commits selected in default mode, so we have shown the
|
||||
parent lines.
|
||||
|
||||
`--full-history` without parent rewriting::
|
||||
--full-history without parent rewriting::
|
||||
This mode differs from the default in one point: always follow
|
||||
all parents of a merge, even if it is TREESAME to one of them.
|
||||
Even if more than one side of the merge has commits that are
|
||||
|
@ -536,7 +536,7 @@ Note that without parent rewriting, it is not really possible to talk
|
|||
about the parent/child relationships between the commits, so we show
|
||||
them disconnected.
|
||||
|
||||
`--full-history` with parent rewriting::
|
||||
--full-history with parent rewriting::
|
||||
Ordinary commits are only included if they are !TREESAME
|
||||
(though this can be changed, see `--sparse` below).
|
||||
+
|
||||
|
@ -560,18 +560,18 @@ rewritten to contain `E`'s parent `I`. The same happened for `C` and
|
|||
In addition to the above settings, you can change whether TREESAME
|
||||
affects inclusion:
|
||||
|
||||
`--dense`::
|
||||
--dense::
|
||||
Commits that are walked are included if they are not TREESAME
|
||||
to any parent.
|
||||
|
||||
`--sparse`::
|
||||
--sparse::
|
||||
All commits that are walked are included.
|
||||
+
|
||||
Note that without `--full-history`, this still simplifies merges: if
|
||||
one of the parents is TREESAME, we follow only that one, so the other
|
||||
sides of the merge are never walked.
|
||||
|
||||
`--simplify-merges`::
|
||||
--simplify-merges::
|
||||
First, build a history graph in the same way that
|
||||
`--full-history` with parent rewriting does (see above).
|
||||
+
|
||||
|
@ -618,9 +618,9 @@ Note the major differences in `N`, `P`, and `Q` over `--full-history`:
|
|||
|
||||
There is another simplification mode available:
|
||||
|
||||
`--ancestry-path[=<commit>]`::
|
||||
--ancestry-path[=<commit>]::
|
||||
Limit the displayed commits to those which are an ancestor of
|
||||
_<commit>_, or which are a descendant of _<commit>_, or are _<commit>_
|
||||
<commit>, or which are a descendant of <commit>, or are <commit>
|
||||
itself.
|
||||
+
|
||||
As an example use case, consider the following commit history:
|
||||
|
@ -636,15 +636,15 @@ As an example use case, consider the following commit history:
|
|||
A regular 'D..M' computes the set of commits that are ancestors of `M`,
|
||||
but excludes the ones that are ancestors of `D`. This is useful to see
|
||||
what happened to the history leading to `M` since `D`, in the sense
|
||||
that "what does `M` have that did not exist in `D`". The result in this
|
||||
that ``what does `M` have that did not exist in `D`''. The result in this
|
||||
example would be all the commits, except `A` and `B` (and `D` itself,
|
||||
of course).
|
||||
+
|
||||
When we want to find out what commits in `M` are contaminated with the
|
||||
bug introduced by `D` and need fixing, however, we might want to view
|
||||
only the subset of `D..M` that are actually descendants of `D`, i.e.
|
||||
only the subset of 'D..M' that are actually descendants of `D`, i.e.
|
||||
excluding `C` and `K`. This is exactly what the `--ancestry-path`
|
||||
option does. Applied to the `D..M` range, it results in:
|
||||
option does. Applied to the 'D..M' range, it results in:
|
||||
+
|
||||
-----------------------------------------------------------------------
|
||||
E-------F
|
||||
|
@ -655,7 +655,7 @@ option does. Applied to the `D..M` range, it results in:
|
|||
-----------------------------------------------------------------------
|
||||
+
|
||||
We can also use `--ancestry-path=D` instead of `--ancestry-path` which
|
||||
means the same thing when applied to the `D..M` range but is just more
|
||||
means the same thing when applied to the 'D..M' range but is just more
|
||||
explicit.
|
||||
+
|
||||
If we instead are interested in a given topic within this range, and all
|
||||
|
@ -770,7 +770,7 @@ into the important branch. This commit may have information about why
|
|||
the change `X` came to override the changes from `A` and `B` in its
|
||||
commit message.
|
||||
|
||||
`--show-pulls`::
|
||||
--show-pulls::
|
||||
In addition to the commits shown in the default history, show
|
||||
each merge commit that is not TREESAME to its first parent but
|
||||
is TREESAME to a later parent.
|
||||
|
@ -819,7 +819,7 @@ ifdef::git-rev-list[]
|
|||
Bisection Helpers
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
`--bisect`::
|
||||
--bisect::
|
||||
Limit output to the one commit object which is roughly halfway between
|
||||
included and excluded commits. Note that the bad bisection ref
|
||||
`refs/bisect/bad` is added to the included commits (if it
|
||||
|
@ -843,7 +843,7 @@ introduces a regression is thus reduced to a binary search: repeatedly
|
|||
generate and test new 'midpoint's until the commit chain is of length
|
||||
one.
|
||||
|
||||
`--bisect-vars`::
|
||||
--bisect-vars::
|
||||
This calculates the same as `--bisect`, except that refs in
|
||||
`refs/bisect/` are not used, and except that this outputs
|
||||
text ready to be eval'ed by the shell. These lines will assign the
|
||||
|
@ -855,7 +855,7 @@ one.
|
|||
`bisect_bad`, and the number of commits we are bisecting right now to
|
||||
`bisect_all`.
|
||||
|
||||
`--bisect-all`::
|
||||
--bisect-all::
|
||||
This outputs all the commit objects between the included and excluded
|
||||
commits, ordered by their distance to the included and excluded
|
||||
commits. Refs in `refs/bisect/` are not used. The farthest
|
||||
|
@ -878,15 +878,15 @@ Commit Ordering
|
|||
|
||||
By default, the commits are shown in reverse chronological order.
|
||||
|
||||
`--date-order`::
|
||||
--date-order::
|
||||
Show no parents before all of its children are shown, but
|
||||
otherwise show commits in the commit timestamp order.
|
||||
|
||||
`--author-date-order`::
|
||||
--author-date-order::
|
||||
Show no parents before all of its children are shown, but
|
||||
otherwise show commits in the author timestamp order.
|
||||
|
||||
`--topo-order`::
|
||||
--topo-order::
|
||||
Show no parents before all of its children are shown, and
|
||||
avoid showing commits on multiple lines of history
|
||||
intermixed.
|
||||
|
@ -910,8 +910,8 @@ With `--topo-order`, they would show 8 6 5 3 7 4 2 1 (or 8 7 4 2 6 5
|
|||
avoid showing the commits from two parallel development track mixed
|
||||
together.
|
||||
|
||||
`--reverse`::
|
||||
Output the commits chosen to be shown (see 'Commit Limiting'
|
||||
--reverse::
|
||||
Output the commits chosen to be shown (see Commit Limiting
|
||||
section above) in reverse order. Cannot be combined with
|
||||
`--walk-reflogs`.
|
||||
endif::git-shortlog[]
|
||||
|
@ -923,39 +923,39 @@ Object Traversal
|
|||
These options are mostly targeted for packing of Git repositories.
|
||||
|
||||
ifdef::git-rev-list[]
|
||||
`--objects`::
|
||||
--objects::
|
||||
Print the object IDs of any object referenced by the listed
|
||||
commits. `--objects foo ^bar` thus means "send me
|
||||
commits. `--objects foo ^bar` thus means ``send me
|
||||
all object IDs which I need to download if I have the commit
|
||||
object `bar` but not `foo`". See also `--object-names` below.
|
||||
object _bar_ but not _foo_''. See also `--object-names` below.
|
||||
|
||||
`--in-commit-order`::
|
||||
--in-commit-order::
|
||||
Print tree and blob ids in order of the commits. The tree
|
||||
and blob ids are printed after they are first referenced
|
||||
by a commit.
|
||||
|
||||
`--objects-edge`::
|
||||
--objects-edge::
|
||||
Similar to `--objects`, but also print the IDs of excluded
|
||||
commits prefixed with a "`-`" character. This is used by
|
||||
commits prefixed with a ``-'' character. This is used by
|
||||
linkgit:git-pack-objects[1] to build a ``thin'' pack, which records
|
||||
objects in deltified form based on objects contained in these
|
||||
excluded commits to reduce network traffic.
|
||||
|
||||
`--objects-edge-aggressive`::
|
||||
--objects-edge-aggressive::
|
||||
Similar to `--objects-edge`, but it tries harder to find excluded
|
||||
commits at the cost of increased time. This is used instead of
|
||||
`--objects-edge` to build ``thin'' packs for shallow repositories.
|
||||
|
||||
`--indexed-objects`::
|
||||
--indexed-objects::
|
||||
Pretend as if all trees and blobs used by the index are listed
|
||||
on the command line. Note that you probably want to use
|
||||
`--objects`, too.
|
||||
|
||||
`--unpacked`::
|
||||
--unpacked::
|
||||
Only useful with `--objects`; print the object IDs that are not
|
||||
in packs.
|
||||
|
||||
`--object-names`::
|
||||
--object-names::
|
||||
Only useful with `--objects`; print the names of the object IDs
|
||||
that are found. This is the default behavior. Note that the
|
||||
"name" of each object is ambiguous, and mostly intended as a
|
||||
|
@ -964,52 +964,52 @@ ifdef::git-rev-list[]
|
|||
to remove newlines; and if an object would appear multiple times
|
||||
with different names, only one name is shown.
|
||||
|
||||
`--no-object-names`::
|
||||
--no-object-names::
|
||||
Only useful with `--objects`; does not print the names of the object
|
||||
IDs that are found. This inverts `--object-names`. This flag allows
|
||||
the output to be more easily parsed by commands such as
|
||||
linkgit:git-cat-file[1].
|
||||
|
||||
`--filter=<filter-spec>`::
|
||||
--filter=<filter-spec>::
|
||||
Only useful with one of the `--objects*`; omits objects (usually
|
||||
blobs) from the list of printed objects. The _<filter-spec>_
|
||||
blobs) from the list of printed objects. The '<filter-spec>'
|
||||
may be one of the following:
|
||||
+
|
||||
The form `--filter=blob:none` omits all blobs.
|
||||
The form '--filter=blob:none' omits all blobs.
|
||||
+
|
||||
The form `--filter=blob:limit=<n>[kmg]` omits blobs of size at least _<n>_
|
||||
bytes or units. _<n>_ may be zero. The suffixes `k`, `m`, and `g` can be used
|
||||
to name units in KiB, MiB, or GiB. For example, `blob:limit=1k`
|
||||
The form '--filter=blob:limit=<n>[kmg]' omits blobs of size at least n
|
||||
bytes or units. n may be zero. The suffixes k, m, and g can be used
|
||||
to name units in KiB, MiB, or GiB. For example, 'blob:limit=1k'
|
||||
is the same as 'blob:limit=1024'.
|
||||
+
|
||||
The form `--filter=object:type=(tag|commit|tree|blob)` omits all objects
|
||||
The form '--filter=object:type=(tag|commit|tree|blob)' omits all objects
|
||||
which are not of the requested type.
|
||||
+
|
||||
The form `--filter=sparse:oid=<blob-ish>` uses a sparse-checkout
|
||||
specification contained in the blob (or blob-expression) _<blob-ish>_
|
||||
The form '--filter=sparse:oid=<blob-ish>' uses a sparse-checkout
|
||||
specification contained in the blob (or blob-expression) '<blob-ish>'
|
||||
to omit blobs that would not be required for a sparse checkout on
|
||||
the requested refs.
|
||||
+
|
||||
The form `--filter=tree:<depth>` omits all blobs and trees whose depth
|
||||
from the root tree is >= _<depth>_ (minimum depth if an object is located
|
||||
at multiple depths in the commits traversed). _<depth>_=0 will not include
|
||||
The form '--filter=tree:<depth>' omits all blobs and trees whose depth
|
||||
from the root tree is >= <depth> (minimum depth if an object is located
|
||||
at multiple depths in the commits traversed). <depth>=0 will not include
|
||||
any trees or blobs unless included explicitly in the command-line (or
|
||||
standard input when `--stdin` is used). _<depth>_=1 will include only the
|
||||
standard input when --stdin is used). <depth>=1 will include only the
|
||||
tree and blobs which are referenced directly by a commit reachable from
|
||||
_<commit>_ or an explicitly-given object. _<depth>_=2 is like <depth>=1
|
||||
<commit> or an explicitly-given object. <depth>=2 is like <depth>=1
|
||||
while also including trees and blobs one more level removed from an
|
||||
explicitly-given commit or tree.
|
||||
+
|
||||
Note that the form `--filter=sparse:path=<path>` that wants to read
|
||||
Note that the form '--filter=sparse:path=<path>' that wants to read
|
||||
from an arbitrary path on the filesystem has been dropped for security
|
||||
reasons.
|
||||
+
|
||||
Multiple `--filter=` flags can be specified to combine filters. Only
|
||||
Multiple '--filter=' flags can be specified to combine filters. Only
|
||||
objects which are accepted by every filter are included.
|
||||
+
|
||||
The form `--filter=combine:<filter1>+<filter2>+...<filterN>` can also be
|
||||
The form '--filter=combine:<filter1>+<filter2>+...<filterN>' can also be
|
||||
used to combined several filters, but this is harder than just repeating
|
||||
the `--filter` flag and is usually not necessary. Filters are joined by
|
||||
the '--filter' flag and is usually not necessary. Filters are joined by
|
||||
'{plus}' and individual filters are %-encoded (i.e. URL-encoded).
|
||||
Besides the '{plus}' and '%' characters, the following characters are
|
||||
reserved and also must be encoded: `~!@#$^&*()[]{}\;",<>?`+'`+
|
||||
|
@ -1017,52 +1017,52 @@ as well as all characters with ASCII code <= `0x20`, which includes
|
|||
space and newline.
|
||||
+
|
||||
Other arbitrary characters can also be encoded. For instance,
|
||||
`combine:tree:3+blob:none` and `combine:tree%3A3+blob%3Anone` are
|
||||
'combine:tree:3+blob:none' and 'combine:tree%3A3+blob%3Anone' are
|
||||
equivalent.
|
||||
|
||||
`--no-filter`::
|
||||
--no-filter::
|
||||
Turn off any previous `--filter=` argument.
|
||||
|
||||
`--filter-provided-objects`::
|
||||
--filter-provided-objects::
|
||||
Filter the list of explicitly provided objects, which would otherwise
|
||||
always be printed even if they did not match any of the filters. Only
|
||||
useful with `--filter=`.
|
||||
|
||||
`--filter-print-omitted`::
|
||||
--filter-print-omitted::
|
||||
Only useful with `--filter=`; prints a list of the objects omitted
|
||||
by the filter. Object IDs are prefixed with a ``~'' character.
|
||||
|
||||
`--missing=<missing-action>`::
|
||||
--missing=<missing-action>::
|
||||
A debug option to help with future "partial clone" development.
|
||||
This option specifies how missing objects are handled.
|
||||
+
|
||||
The form `--missing=error` requests that rev-list stop with an error if
|
||||
The form '--missing=error' requests that rev-list stop with an error if
|
||||
a missing object is encountered. This is the default action.
|
||||
+
|
||||
The form `--missing=allow-any` will allow object traversal to continue
|
||||
The form '--missing=allow-any' will allow object traversal to continue
|
||||
if a missing object is encountered. Missing objects will silently be
|
||||
omitted from the results.
|
||||
+
|
||||
The form `--missing=allow-promisor` is like `allow-any`, but will only
|
||||
The form '--missing=allow-promisor' is like 'allow-any', but will only
|
||||
allow object traversal to continue for EXPECTED promisor missing objects.
|
||||
Unexpected missing objects will raise an error.
|
||||
+
|
||||
The form `--missing=print` is like `allow-any`, but will also print a
|
||||
The form '--missing=print' is like 'allow-any', but will also print a
|
||||
list of the missing objects. Object IDs are prefixed with a ``?'' character.
|
||||
+
|
||||
The form `--missing=print-info` is like `print`, but will also print additional
|
||||
The form '--missing=print-info' is like 'print', but will also print additional
|
||||
information about the missing object inferred from its containing object. The
|
||||
information is all printed on the same line with the missing object ID in the
|
||||
form: `?<oid> [<token>=<value>]...`. The `<token>=<value>` pairs containing
|
||||
additional information are separated from each other by a _SP_. The value is
|
||||
encoded in a token specific fashion, but _SP_ or _LF_ contained in value are always
|
||||
additional information are separated from each other by a SP. The value is
|
||||
encoded in a token specific fashion, but SP or LF contained in value are always
|
||||
expected to be represented in such a way that the resulting encoded value does
|
||||
not have either of these two problematic bytes. Each `<token>=<value>` may be
|
||||
one of the following:
|
||||
+
|
||||
--
|
||||
* The `path=<path>` shows the path of the missing object inferred from a
|
||||
containing object. A path containing _SP_ or special characters is enclosed in
|
||||
containing object. A path containing SP or special characters is enclosed in
|
||||
double-quotes in the C style as needed.
|
||||
+
|
||||
* The `type=<type>` shows the type of the missing object inferred from a
|
||||
|
@ -1073,7 +1073,7 @@ If some tips passed to the traversal are missing, they will be
|
|||
considered as missing too, and the traversal will ignore them. In case
|
||||
we cannot get their Object ID though, an error will be raised.
|
||||
|
||||
`--exclude-promisor-objects`::
|
||||
--exclude-promisor-objects::
|
||||
(For internal use only.) Prefilter object traversal at
|
||||
promisor boundary. This is used with partial clone. This is
|
||||
stronger than `--missing=allow-promisor` because it limits the
|
||||
|
@ -1081,7 +1081,7 @@ we cannot get their Object ID though, an error will be raised.
|
|||
objects.
|
||||
endif::git-rev-list[]
|
||||
|
||||
`--no-walk[=(sorted|unsorted)]`::
|
||||
--no-walk[=(sorted|unsorted)]::
|
||||
Only show the given commits, but do not traverse their ancestors.
|
||||
This has no effect if a range is specified. If the argument
|
||||
`unsorted` is given, the commits are shown in the order they were
|
||||
|
@ -1090,7 +1090,7 @@ endif::git-rev-list[]
|
|||
by commit time.
|
||||
Cannot be combined with `--graph`.
|
||||
|
||||
`--do-walk`::
|
||||
--do-walk::
|
||||
Overrides a previous `--no-walk`.
|
||||
endif::git-shortlog[]
|
||||
|
||||
|
@ -1100,21 +1100,16 @@ Commit Formatting
|
|||
|
||||
ifdef::git-rev-list[]
|
||||
Using these options, linkgit:git-rev-list[1] will act similar to the
|
||||
more specialized family of commit log tools:
|
||||
ifndef::with-breaking-changes[]
|
||||
linkgit:git-log[1], linkgit:git-show[1], and linkgit:git-whatchanged[1].
|
||||
endif::with-breaking-changes[]
|
||||
ifdef::with-breaking-changes[]
|
||||
linkgit:git-log[1] and linkgit:git-show[1].
|
||||
endif::with-breaking-changes[]
|
||||
more specialized family of commit log tools: linkgit:git-log[1],
|
||||
linkgit:git-show[1], and linkgit:git-whatchanged[1]
|
||||
endif::git-rev-list[]
|
||||
|
||||
include::pretty-options.adoc[]
|
||||
|
||||
`--relative-date`::
|
||||
--relative-date::
|
||||
Synonym for `--date=relative`.
|
||||
|
||||
`--date=<format>`::
|
||||
--date=<format>::
|
||||
Only takes effect for dates shown in human-readable format, such
|
||||
as when using `--pretty`. `log.date` config variable sets a default
|
||||
value for the log command's `--date` option. By default, dates
|
||||
|
@ -1164,12 +1159,12 @@ omitted.
|
|||
1970). As with `--raw`, this is always in UTC and therefore `-local`
|
||||
has no effect.
|
||||
|
||||
`--date=format:<format>` feeds the _<format>_ to your system `strftime`,
|
||||
except for `%s`, `%z`, and `%Z`, which are handled internally.
|
||||
`--date=format:...` feeds the format `...` to your system `strftime`,
|
||||
except for %s, %z, and %Z, which are handled internally.
|
||||
Use `--date=format:%c` to show the date in your system locale's
|
||||
preferred format. See the `strftime`(3) manual for a complete list of
|
||||
preferred format. See the `strftime` manual for a complete list of
|
||||
format placeholders. When using `-local`, the correct syntax is
|
||||
`--date=format-local:<format>`.
|
||||
`--date=format-local:...`.
|
||||
|
||||
`--date=default` is the default format, and is based on ctime(3)
|
||||
output. It shows a single line with three-letter day of the week,
|
||||
|
@ -1179,33 +1174,33 @@ the local time zone is used, e.g. `Thu Jan 1 00:00:00 1970 +0000`.
|
|||
--
|
||||
|
||||
ifdef::git-rev-list[]
|
||||
`--header`::
|
||||
--header::
|
||||
Print the contents of the commit in raw-format; each record is
|
||||
separated with a NUL character.
|
||||
|
||||
`--no-commit-header`::
|
||||
--no-commit-header::
|
||||
Suppress the header line containing "commit" and the object ID printed before
|
||||
the specified format. This has no effect on the built-in formats; only custom
|
||||
formats are affected.
|
||||
|
||||
`--commit-header`::
|
||||
--commit-header::
|
||||
Overrides a previous `--no-commit-header`.
|
||||
endif::git-rev-list[]
|
||||
|
||||
`--parents`::
|
||||
--parents::
|
||||
Print also the parents of the commit (in the form "commit parent...").
|
||||
Also enables parent rewriting, see 'History Simplification' above.
|
||||
|
||||
`--children`::
|
||||
--children::
|
||||
Print also the children of the commit (in the form "commit child...").
|
||||
Also enables parent rewriting, see 'History Simplification' above.
|
||||
|
||||
ifdef::git-rev-list[]
|
||||
`--timestamp`::
|
||||
--timestamp::
|
||||
Print the raw commit timestamp.
|
||||
endif::git-rev-list[]
|
||||
|
||||
`--left-right`::
|
||||
--left-right::
|
||||
Mark which side of a symmetric difference a commit is reachable from.
|
||||
Commits from the left side are prefixed with `<` and those from
|
||||
the right with `>`. If combined with `--boundary`, those
|
||||
|
@ -1234,7 +1229,7 @@ you would get an output like this:
|
|||
-xxxxxxx... 1st on a
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
`--graph`::
|
||||
--graph::
|
||||
Draw a text-based graphical representation of the commit history
|
||||
on the left hand side of the output. This may cause extra lines
|
||||
to be printed in between commits, in order for the graph history
|
||||
|
@ -1246,15 +1241,15 @@ This enables parent rewriting, see 'History Simplification' above.
|
|||
This implies the `--topo-order` option by default, but the
|
||||
`--date-order` option may also be specified.
|
||||
|
||||
`--show-linear-break[=<barrier>]`::
|
||||
When `--graph` is not used, all history branches are flattened
|
||||
--show-linear-break[=<barrier>]::
|
||||
When --graph is not used, all history branches are flattened
|
||||
which can make it hard to see that the two consecutive commits
|
||||
do not belong to a linear branch. This option puts a barrier
|
||||
in between them in that case. If _<barrier>_ is specified, it
|
||||
in between them in that case. If `<barrier>` is specified, it
|
||||
is the string that will be shown instead of the default one.
|
||||
|
||||
ifdef::git-rev-list[]
|
||||
`--count`::
|
||||
--count::
|
||||
Print a number stating how many commits would have been
|
||||
listed, and suppress all other output. When used together
|
||||
with `--left-right`, instead print the counts for left and
|
||||
|
|
|
@ -56,14 +56,6 @@ better off using the revision walk API instead.
|
|||
the revision walk so that the walk emits commits marked with the
|
||||
`UNINTERESTING` flag.
|
||||
|
||||
`edge_aggressive`::
|
||||
For performance reasons, usually only the boundary commits are
|
||||
explored to find UNINTERESTING objects. However, in the case of
|
||||
shallow clones it can be helpful to mark all trees and blobs
|
||||
reachable from UNINTERESTING tip commits as UNINTERESTING. This
|
||||
matches the behavior of `--objects-edge-aggressive` in the
|
||||
revision API.
|
||||
|
||||
`pl`::
|
||||
This pattern list pointer allows focusing the path-walk search to
|
||||
a set of patterns, only emitting paths that match the given
|
||||
|
@ -77,5 +69,4 @@ Examples
|
|||
|
||||
See example usages in:
|
||||
`t/helper/test-path-walk.c`,
|
||||
`builtin/pack-objects.c`,
|
||||
`builtin/backfill.c`
|
||||
|
|
|
@ -32,10 +32,7 @@ that generally have somebody running test pipelines against regularly:
|
|||
- OpenBSD
|
||||
|
||||
The platforms which must be supported by the tool should be aligned with our
|
||||
platform support policy (see platform-support.adoc).
|
||||
// once we lose AsciiDoc compatibility, we can start writing the above as:
|
||||
// xref:platform-support.adoc#platform-support-policy[platform support policy]
|
||||
// or something like that, but until then....
|
||||
[platform support policy](platform-support.txt).
|
||||
|
||||
=== Auto-detection of supported features
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ sparsity patterns: patterns from $GIT_DIR/info/sparse-checkout used to
|
|||
reasons: (1) users in cone mode specify directories rather than
|
||||
patterns (their directories are transformed into patterns, but
|
||||
users may think you are talking about non-cone mode if you use the
|
||||
word "patterns"), and (2) the sparse specification might
|
||||
word "patterns"), and (b) the sparse specification might
|
||||
transiently differ in the working tree or index from the sparsity
|
||||
patterns (see "Sparse specification vs. sparsity patterns").
|
||||
|
||||
|
@ -440,7 +440,7 @@ understanding these differences can be beneficial.
|
|||
* blame (only matters when one or more -C flags are passed)
|
||||
* and annotate
|
||||
* log
|
||||
* whatchanged (may not exist anymore)
|
||||
* whatchanged
|
||||
* ls-files
|
||||
* diff-index
|
||||
* diff-tree
|
||||
|
|
|
@ -4240,7 +4240,7 @@ command `git`. The source side of a builtin is
|
|||
- an entry in `BUILTIN_OBJECTS` in the `Makefile`.
|
||||
|
||||
Sometimes, more than one builtin is contained in one source file. For
|
||||
example, `cmd_show()` and `cmd_log()` both reside in `builtin/log.c`,
|
||||
example, `cmd_whatchanged()` and `cmd_log()` both reside in `builtin/log.c`,
|
||||
since they share quite a bit of code. In that case, the commands which are
|
||||
_not_ named like the `.c` file in which they live have to be listed in
|
||||
`BUILT_INS` in the `Makefile`.
|
||||
|
@ -4301,11 +4301,11 @@ Now, for the meat:
|
|||
|
||||
-----------------------------------------------------------------------------
|
||||
case 0:
|
||||
buf = odb_read_object_peeled(r->objects, sha1, argv[1], &size, NULL);
|
||||
buf = read_object_with_reference(sha1, argv[1], &size, NULL);
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
This is how you read a blob (actually, not only a blob, but any type of
|
||||
object). To know how the function `odb_read_object_peeled()` actually
|
||||
object). To know how the function `read_object_with_reference()` actually
|
||||
works, find the source code for it (something like `git grep
|
||||
read_object_with | grep ":[a-z]"` in the Git repository), and read
|
||||
the source.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
DEF_VER=v2.50.GIT
|
||||
DEF_VER=v2.50.0-rc0
|
||||
|
||||
LF='
|
||||
'
|
||||
|
@ -82,7 +82,7 @@ read GIT_MAJOR_VERSION GIT_MINOR_VERSION GIT_MICRO_VERSION GIT_PATCH_LEVEL trail
|
|||
$(echo "$GIT_VERSION" 0 0 0 0 | tr '.a-zA-Z-' ' ')
|
||||
EOF
|
||||
|
||||
REPLACED=$(printf "%s\n" "$INPUT" | sed -e "s|@GIT_VERSION@|$GIT_VERSION|" \
|
||||
REPLACED=$(printf "%s" "$INPUT" | sed -e "s|@GIT_VERSION@|$GIT_VERSION|" \
|
||||
-e "s|@GIT_MAJOR_VERSION@|$GIT_MAJOR_VERSION|" \
|
||||
-e "s|@GIT_MINOR_VERSION@|$GIT_MINOR_VERSION|" \
|
||||
-e "s|@GIT_MICRO_VERSION@|$GIT_MICRO_VERSION|" \
|
||||
|
|
15
Makefile
15
Makefile
|
@ -114,6 +114,8 @@ include shared.mak
|
|||
#
|
||||
# Define NO_INTPTR_T if you don't have intptr_t or uintptr_t.
|
||||
#
|
||||
# Define NO_UINTMAX_T if you don't have uintmax_t.
|
||||
#
|
||||
# Define NEEDS_SOCKET if linking with libc is not enough (SunOS,
|
||||
# Patrick Mauritz).
|
||||
#
|
||||
|
@ -1083,8 +1085,8 @@ LIB_OBJS += notes.o
|
|||
LIB_OBJS += object-file-convert.o
|
||||
LIB_OBJS += object-file.o
|
||||
LIB_OBJS += object-name.o
|
||||
LIB_OBJS += object-store.o
|
||||
LIB_OBJS += object.o
|
||||
LIB_OBJS += odb.o
|
||||
LIB_OBJS += oid-array.o
|
||||
LIB_OBJS += oidmap.o
|
||||
LIB_OBJS += oidset.o
|
||||
|
@ -1365,7 +1367,6 @@ CLAR_TEST_SUITES += u-prio-queue
|
|||
CLAR_TEST_SUITES += u-reftable-tree
|
||||
CLAR_TEST_SUITES += u-strbuf
|
||||
CLAR_TEST_SUITES += u-strcmp-offset
|
||||
CLAR_TEST_SUITES += u-string-list
|
||||
CLAR_TEST_SUITES += u-strvec
|
||||
CLAR_TEST_SUITES += u-trailer
|
||||
CLAR_TEST_SUITES += u-urlmatch-normalization
|
||||
|
@ -1917,6 +1918,9 @@ endif
|
|||
ifdef NO_INTPTR_T
|
||||
COMPAT_CFLAGS += -DNO_INTPTR_T
|
||||
endif
|
||||
ifdef NO_UINTMAX_T
|
||||
BASIC_CFLAGS += -Duintmax_t=uint32_t
|
||||
endif
|
||||
ifdef NO_SOCKADDR_STORAGE
|
||||
ifdef NO_IPV6
|
||||
BASIC_CFLAGS += -Dsockaddr_storage=sockaddr_in
|
||||
|
@ -3469,14 +3473,11 @@ endif
|
|||
coccicheck-test: $(COCCI_TEST_RES_GEN)
|
||||
|
||||
coccicheck: coccicheck-test
|
||||
|
||||
ifdef SPATCH_CONCAT_COCCI
|
||||
COCCICHECK_PATCH_MUST_BE_EMPTY_FILES = contrib/coccinelle/ALL.cocci.patch
|
||||
coccicheck: contrib/coccinelle/ALL.cocci.patch
|
||||
else
|
||||
COCCICHECK_PATCH_MUST_BE_EMPTY_FILES = $(COCCICHECK_PATCHES_INTREE)
|
||||
coccicheck: $(COCCICHECK_PATCHES_INTREE)
|
||||
endif
|
||||
coccicheck: $(COCCICHECK_PATCH_MUST_BE_EMPTY_FILES)
|
||||
! grep -q ^ $(COCCICHECK_PATCH_MUST_BE_EMPTY_FILES) /dev/null
|
||||
|
||||
# See contrib/coccinelle/README
|
||||
coccicheck-pending: coccicheck-test
|
||||
|
|
2
RelNotes
2
RelNotes
|
@ -1 +1 @@
|
|||
Documentation/RelNotes/2.51.0.adoc
|
||||
Documentation/RelNotes/2.50.0.adoc
|
20
apply.c
20
apply.c
|
@ -14,7 +14,7 @@
|
|||
#include "abspath.h"
|
||||
#include "base85.h"
|
||||
#include "config.h"
|
||||
#include "odb.h"
|
||||
#include "object-store.h"
|
||||
#include "delta.h"
|
||||
#include "diff.h"
|
||||
#include "dir.h"
|
||||
|
@ -2219,7 +2219,7 @@ static void reverse_patches(struct patch *p)
|
|||
struct fragment *frag = p->fragments;
|
||||
|
||||
SWAP(p->new_name, p->old_name);
|
||||
if (p->new_mode || p->is_delete)
|
||||
if (p->new_mode)
|
||||
SWAP(p->new_mode, p->old_mode);
|
||||
SWAP(p->is_new, p->is_delete);
|
||||
SWAP(p->lines_added, p->lines_deleted);
|
||||
|
@ -3204,14 +3204,14 @@ static int apply_binary(struct apply_state *state,
|
|||
return 0; /* deletion patch */
|
||||
}
|
||||
|
||||
if (odb_has_object(the_repository->objects, &oid, 0)) {
|
||||
if (has_object(the_repository, &oid, 0)) {
|
||||
/* We already have the postimage */
|
||||
enum object_type type;
|
||||
unsigned long size;
|
||||
char *result;
|
||||
|
||||
result = odb_read_object(the_repository->objects, &oid,
|
||||
&type, &size);
|
||||
result = repo_read_object_file(the_repository, &oid, &type,
|
||||
&size);
|
||||
if (!result)
|
||||
return error(_("the necessary postimage %s for "
|
||||
"'%s' cannot be read"),
|
||||
|
@ -3273,8 +3273,8 @@ static int read_blob_object(struct strbuf *buf, const struct object_id *oid, uns
|
|||
unsigned long sz;
|
||||
char *result;
|
||||
|
||||
result = odb_read_object(the_repository->objects, oid,
|
||||
&type, &sz);
|
||||
result = repo_read_object_file(the_repository, oid, &type,
|
||||
&sz);
|
||||
if (!result)
|
||||
return -1;
|
||||
/* XXX read_sha1_file NUL-terminates */
|
||||
|
@ -3503,7 +3503,7 @@ static int resolve_to(struct image *image, const struct object_id *result_id)
|
|||
|
||||
image_clear(image);
|
||||
|
||||
data = odb_read_object(the_repository->objects, result_id, &type, &size);
|
||||
data = repo_read_object_file(the_repository, result_id, &type, &size);
|
||||
if (!data || type != OBJ_BLOB)
|
||||
die("unable to read blob object %s", oid_to_hex(result_id));
|
||||
strbuf_attach(&image->buf, data, size, size + 1);
|
||||
|
@ -4565,7 +4565,7 @@ static int create_file(struct apply_state *state, struct patch *patch)
|
|||
|
||||
if (patch->conflicted_threeway)
|
||||
return add_conflicted_stages_file(state, patch);
|
||||
else if (state->check_index || (state->ita_only && patch->is_new > 0))
|
||||
else if (state->update_index)
|
||||
return add_index_file(state, path, mode, buf, size);
|
||||
return 0;
|
||||
}
|
||||
|
@ -4833,7 +4833,7 @@ static int apply_patch(struct apply_state *state,
|
|||
LOCK_DIE_ON_ERROR);
|
||||
}
|
||||
|
||||
if ((state->check_index || state->update_index) && read_apply_cache(state) < 0) {
|
||||
if (state->check_index && read_apply_cache(state) < 0) {
|
||||
error(_("unable to read index file"));
|
||||
res = -128;
|
||||
goto end;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "hex.h"
|
||||
#include "tar.h"
|
||||
#include "archive.h"
|
||||
#include "odb.h"
|
||||
#include "object-store.h"
|
||||
#include "strbuf.h"
|
||||
#include "streaming.h"
|
||||
#include "run-command.h"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "hex.h"
|
||||
#include "streaming.h"
|
||||
#include "utf8.h"
|
||||
#include "odb.h"
|
||||
#include "object-store.h"
|
||||
#include "strbuf.h"
|
||||
#include "userdiff.h"
|
||||
#include "write-or-die.h"
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "pretty.h"
|
||||
#include "setup.h"
|
||||
#include "refs.h"
|
||||
#include "odb.h"
|
||||
#include "object-store.h"
|
||||
#include "commit.h"
|
||||
#include "tree.h"
|
||||
#include "tree-walk.h"
|
||||
|
@ -98,7 +98,7 @@ static void *object_file_to_archive(const struct archiver_args *args,
|
|||
(args->tree ? &args->tree->object.oid : NULL), oid);
|
||||
|
||||
path += args->baselen;
|
||||
buffer = odb_read_object(the_repository->objects, oid, type, sizep);
|
||||
buffer = repo_read_object_file(the_repository, oid, type, sizep);
|
||||
if (buffer && S_ISREG(mode)) {
|
||||
struct strbuf buf = STRBUF_INIT;
|
||||
size_t size = 0;
|
||||
|
@ -215,7 +215,7 @@ static int write_archive_entry(const struct object_id *oid, const char *base,
|
|||
|
||||
/* Stream it? */
|
||||
if (S_ISREG(mode) && !args->convert &&
|
||||
odb_read_object_info(args->repo->objects, oid, &size) == OBJ_BLOB &&
|
||||
oid_object_info(args->repo, oid, &size) == OBJ_BLOB &&
|
||||
size > repo_settings_get_big_file_threshold(the_repository))
|
||||
return write_entry(args, oid, path.buf, path.len, mode, NULL, size);
|
||||
|
||||
|
|
4
attr.c
4
attr.c
|
@ -22,7 +22,7 @@
|
|||
#include "read-cache-ll.h"
|
||||
#include "refs.h"
|
||||
#include "revision.h"
|
||||
#include "odb.h"
|
||||
#include "object-store.h"
|
||||
#include "setup.h"
|
||||
#include "thread-utils.h"
|
||||
#include "tree-walk.h"
|
||||
|
@ -779,7 +779,7 @@ static struct attr_stack *read_attr_from_blob(struct index_state *istate,
|
|||
if (get_tree_entry(istate->repo, tree_oid, path, &oid, &mode))
|
||||
return NULL;
|
||||
|
||||
buf = odb_read_object(istate->repo->objects, &oid, &type, &sz);
|
||||
buf = repo_read_object_file(istate->repo, &oid, &type, &sz);
|
||||
if (!buf || type != OBJ_BLOB) {
|
||||
free(buf);
|
||||
return NULL;
|
||||
|
|
8
bisect.c
8
bisect.c
|
@ -20,7 +20,7 @@
|
|||
#include "commit-slab.h"
|
||||
#include "commit-reach.h"
|
||||
#include "object-name.h"
|
||||
#include "odb.h"
|
||||
#include "object-store.h"
|
||||
#include "path.h"
|
||||
#include "dir.h"
|
||||
|
||||
|
@ -155,9 +155,9 @@ static void show_list(const char *debug, int counted, int nr,
|
|||
unsigned commit_flags = commit->object.flags;
|
||||
enum object_type type;
|
||||
unsigned long size;
|
||||
char *buf = odb_read_object(the_repository->objects,
|
||||
&commit->object.oid, &type,
|
||||
&size);
|
||||
char *buf = repo_read_object_file(the_repository,
|
||||
&commit->object.oid, &type,
|
||||
&size);
|
||||
const char *subject_start;
|
||||
int subject_len;
|
||||
|
||||
|
|
22
blame.c
22
blame.c
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "git-compat-util.h"
|
||||
#include "refs.h"
|
||||
#include "odb.h"
|
||||
#include "object-store.h"
|
||||
#include "cache-tree.h"
|
||||
#include "mergesort.h"
|
||||
#include "commit.h"
|
||||
|
@ -116,7 +116,7 @@ static void verify_working_tree_path(struct repository *r,
|
|||
unsigned short mode;
|
||||
|
||||
if (!get_tree_entry(r, commit_oid, path, &blob_oid, &mode) &&
|
||||
odb_read_object_info(r->objects, &blob_oid, NULL) == OBJ_BLOB)
|
||||
oid_object_info(r, &blob_oid, NULL) == OBJ_BLOB)
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -277,8 +277,7 @@ static struct commit *fake_working_tree_commit(struct repository *r,
|
|||
convert_to_git(r->index, path, buf.buf, buf.len, &buf, 0);
|
||||
origin->file.ptr = buf.buf;
|
||||
origin->file.size = buf.len;
|
||||
odb_pretend_object(the_repository->objects, buf.buf, buf.len,
|
||||
OBJ_BLOB, &origin->blob_oid);
|
||||
pretend_object_file(the_repository, buf.buf, buf.len, OBJ_BLOB, &origin->blob_oid);
|
||||
|
||||
/*
|
||||
* Read the current index, replace the path entry with
|
||||
|
@ -1042,9 +1041,9 @@ static void fill_origin_blob(struct diff_options *opt,
|
|||
&o->blob_oid, 1, &file->ptr, &file_size))
|
||||
;
|
||||
else
|
||||
file->ptr = odb_read_object(the_repository->objects,
|
||||
&o->blob_oid, &type,
|
||||
&file_size);
|
||||
file->ptr = repo_read_object_file(the_repository,
|
||||
&o->blob_oid, &type,
|
||||
&file_size);
|
||||
file->size = file_size;
|
||||
|
||||
if (!file->ptr)
|
||||
|
@ -1246,7 +1245,7 @@ static int fill_blob_sha1_and_mode(struct repository *r,
|
|||
return 0;
|
||||
if (get_tree_entry(r, &origin->commit->object.oid, origin->path, &origin->blob_oid, &origin->mode))
|
||||
goto error_out;
|
||||
if (odb_read_object_info(r->objects, &origin->blob_oid, NULL) != OBJ_BLOB)
|
||||
if (oid_object_info(r, &origin->blob_oid, NULL) != OBJ_BLOB)
|
||||
goto error_out;
|
||||
return 0;
|
||||
error_out:
|
||||
|
@ -2870,9 +2869,10 @@ void setup_scoreboard(struct blame_scoreboard *sb,
|
|||
&sb->final_buf_size))
|
||||
;
|
||||
else
|
||||
sb->final_buf = odb_read_object(the_repository->objects,
|
||||
&o->blob_oid, &type,
|
||||
&sb->final_buf_size);
|
||||
sb->final_buf = repo_read_object_file(the_repository,
|
||||
&o->blob_oid,
|
||||
&type,
|
||||
&sb->final_buf_size);
|
||||
|
||||
if (!sb->final_buf)
|
||||
die(_("cannot read blob %s for path %s"),
|
||||
|
|
4
branch.c
4
branch.c
|
@ -230,7 +230,7 @@ static int inherit_tracking(struct tracking *tracking, const char *orig_ref)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (branch->merge_nr < 1 || !branch->merge || !branch->merge[0] || !branch->merge[0]->src) {
|
||||
if (branch->merge_nr < 1 || !branch->merge_name || !branch->merge_name[0]) {
|
||||
warning(_("asked to inherit tracking from '%s', but no merge configuration is set"),
|
||||
bare_ref);
|
||||
return -1;
|
||||
|
@ -238,7 +238,7 @@ static int inherit_tracking(struct tracking *tracking, const char *orig_ref)
|
|||
|
||||
tracking->remote = branch->remote_name;
|
||||
for (i = 0; i < branch->merge_nr; i++)
|
||||
string_list_append(tracking->srcs, branch->merge[i]->src);
|
||||
string_list_append(tracking->srcs, branch->merge_name[i]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1000,7 +1000,7 @@ static void am_setup(struct am_state *state, enum patch_format patch_format,
|
|||
|
||||
if (!patch_format) {
|
||||
fprintf_ln(stderr, _("Patch format detection failed."));
|
||||
die(NULL);
|
||||
exit(128);
|
||||
}
|
||||
|
||||
if (mkdir(state->dir, 0777) < 0 && errno != EEXIST)
|
||||
|
@ -1178,7 +1178,7 @@ static void NORETURN die_user_resolve(const struct am_state *state)
|
|||
strbuf_release(&sb);
|
||||
}
|
||||
|
||||
die(NULL);
|
||||
exit(128);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2406,7 +2406,6 @@ int cmd_am(int argc,
|
|||
.type = OPTION_CALLBACK,
|
||||
.long_name = "show-current-patch",
|
||||
.value = &resume_mode,
|
||||
.precision = sizeof(resume_mode),
|
||||
.argh = "(diff|raw)",
|
||||
.help = N_("show the patch being applied"),
|
||||
.flags = PARSE_OPT_CMDMODE | PARSE_OPT_OPTARG | PARSE_OPT_NONEG | PARSE_OPT_LITERAL_ARGHELP,
|
||||
|
|
|
@ -29,7 +29,7 @@ int cmd_apply(int argc,
|
|||
* cf. https://lore.kernel.org/git/xmqqcypfcmn4.fsf@gitster.g/
|
||||
*/
|
||||
if (!the_hash_algo)
|
||||
repo_set_hash_algo(the_repository, GIT_HASH_DEFAULT);
|
||||
repo_set_hash_algo(the_repository, GIT_HASH_SHA1);
|
||||
|
||||
argc = apply_parse_options(argc, argv,
|
||||
&state, &force_apply, &options,
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "tree.h"
|
||||
#include "tree-walk.h"
|
||||
#include "object.h"
|
||||
#include "odb.h"
|
||||
#include "object-store.h"
|
||||
#include "oid-array.h"
|
||||
#include "oidset.h"
|
||||
#include "promisor-remote.h"
|
||||
|
@ -67,8 +67,8 @@ static int fill_missing_blobs(const char *path UNUSED,
|
|||
return 0;
|
||||
|
||||
for (size_t i = 0; i < list->nr; i++) {
|
||||
if (!odb_has_object(ctx->repo->objects, &list->oid[i],
|
||||
OBJECT_INFO_FOR_PREFETCH))
|
||||
if (!has_object(ctx->repo, &list->oid[i],
|
||||
OBJECT_INFO_FOR_PREFETCH))
|
||||
oid_array_append(&ctx->current_batch, &list->oid[i]);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "line-log.h"
|
||||
#include "progress.h"
|
||||
#include "object-name.h"
|
||||
#include "odb.h"
|
||||
#include "object-store.h"
|
||||
#include "pager.h"
|
||||
#include "blame.h"
|
||||
#include "refs.h"
|
||||
|
@ -837,7 +837,7 @@ static int is_a_rev(const char *name)
|
|||
|
||||
if (repo_get_oid(the_repository, name, &oid))
|
||||
return 0;
|
||||
return OBJ_NONE < odb_read_object_info(the_repository->objects, &oid, NULL);
|
||||
return OBJ_NONE < oid_object_info(the_repository, &oid, NULL);
|
||||
}
|
||||
|
||||
static int peel_to_commit_oid(struct object_id *oid_ret, void *cbdata)
|
||||
|
@ -848,7 +848,7 @@ static int peel_to_commit_oid(struct object_id *oid_ret, void *cbdata)
|
|||
oidcpy(&oid, oid_ret);
|
||||
while (1) {
|
||||
struct object *obj;
|
||||
int kind = odb_read_object_info(r->objects, &oid, NULL);
|
||||
int kind = oid_object_info(r, &oid, NULL);
|
||||
if (kind == OBJ_COMMIT) {
|
||||
oidcpy(oid_ret, &oid);
|
||||
return 0;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "pack-bitmap.h"
|
||||
#include "object-file.h"
|
||||
#include "object-name.h"
|
||||
#include "odb.h"
|
||||
#include "object-store.h"
|
||||
#include "replace-object.h"
|
||||
#include "promisor-remote.h"
|
||||
#include "mailmap.h"
|
||||
|
@ -74,7 +74,7 @@ static int filter_object(const char *path, unsigned mode,
|
|||
{
|
||||
enum object_type type;
|
||||
|
||||
*buf = odb_read_object(the_repository->objects, oid, &type, size);
|
||||
*buf = repo_read_object_file(the_repository, oid, &type, size);
|
||||
if (!*buf)
|
||||
return error(_("cannot read object %s '%s'"),
|
||||
oid_to_hex(oid), path);
|
||||
|
@ -132,7 +132,7 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
|
|||
switch (opt) {
|
||||
case 't':
|
||||
oi.typep = &type;
|
||||
if (odb_read_object_info_extended(the_repository->objects, &oid, &oi, flags) < 0)
|
||||
if (oid_object_info_extended(the_repository, &oid, &oi, flags) < 0)
|
||||
die("git cat-file: could not get object info");
|
||||
printf("%s\n", type_name(type));
|
||||
ret = 0;
|
||||
|
@ -146,7 +146,7 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
|
|||
oi.contentp = (void**)&buf;
|
||||
}
|
||||
|
||||
if (odb_read_object_info_extended(the_repository->objects, &oid, &oi, flags) < 0)
|
||||
if (oid_object_info_extended(the_repository, &oid, &oi, flags) < 0)
|
||||
die("git cat-file: could not get object info");
|
||||
|
||||
if (use_mailmap && (type == OBJ_COMMIT || type == OBJ_TAG)) {
|
||||
|
@ -160,8 +160,8 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
|
|||
goto cleanup;
|
||||
|
||||
case 'e':
|
||||
ret = !odb_has_object(the_repository->objects, &oid,
|
||||
HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR);
|
||||
ret = !has_object(the_repository, &oid,
|
||||
HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR);
|
||||
goto cleanup;
|
||||
|
||||
case 'w':
|
||||
|
@ -180,7 +180,7 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
|
|||
/* else fallthrough */
|
||||
|
||||
case 'p':
|
||||
type = odb_read_object_info(the_repository->objects, &oid, NULL);
|
||||
type = oid_object_info(the_repository, &oid, NULL);
|
||||
if (type < 0)
|
||||
die("Not a valid object name %s", obj_name);
|
||||
|
||||
|
@ -197,8 +197,8 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
|
|||
ret = stream_blob(&oid);
|
||||
goto cleanup;
|
||||
}
|
||||
buf = odb_read_object(the_repository->objects, &oid,
|
||||
&type, &size);
|
||||
buf = repo_read_object_file(the_repository, &oid, &type,
|
||||
&size);
|
||||
if (!buf)
|
||||
die("Cannot read object %s", obj_name);
|
||||
|
||||
|
@ -217,10 +217,11 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
|
|||
|
||||
if (exp_type_id == OBJ_BLOB) {
|
||||
struct object_id blob_oid;
|
||||
if (odb_read_object_info(the_repository->objects,
|
||||
&oid, NULL) == OBJ_TAG) {
|
||||
char *buffer = odb_read_object(the_repository->objects,
|
||||
&oid, &type, &size);
|
||||
if (oid_object_info(the_repository, &oid, NULL) == OBJ_TAG) {
|
||||
char *buffer = repo_read_object_file(the_repository,
|
||||
&oid,
|
||||
&type,
|
||||
&size);
|
||||
const char *target;
|
||||
|
||||
if (!buffer)
|
||||
|
@ -234,8 +235,7 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
|
|||
} else
|
||||
oidcpy(&blob_oid, &oid);
|
||||
|
||||
if (odb_read_object_info(the_repository->objects,
|
||||
&blob_oid, NULL) == OBJ_BLOB) {
|
||||
if (oid_object_info(the_repository, &blob_oid, NULL) == OBJ_BLOB) {
|
||||
ret = stream_blob(&blob_oid);
|
||||
goto cleanup;
|
||||
}
|
||||
|
@ -246,8 +246,8 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
|
|||
* fall-back to the usual case.
|
||||
*/
|
||||
}
|
||||
buf = odb_read_object_peeled(the_repository->objects, &oid,
|
||||
exp_type_id, &size, NULL);
|
||||
buf = read_object_with_reference(the_repository, &oid,
|
||||
exp_type_id, &size, NULL);
|
||||
|
||||
if (use_mailmap) {
|
||||
size_t s = size;
|
||||
|
@ -275,7 +275,6 @@ struct expand_data {
|
|||
struct object_id oid;
|
||||
enum object_type type;
|
||||
unsigned long size;
|
||||
unsigned short mode;
|
||||
off_t disk_size;
|
||||
const char *rest;
|
||||
struct object_id delta_base_oid;
|
||||
|
@ -295,7 +294,7 @@ struct expand_data {
|
|||
|
||||
/*
|
||||
* After a mark_query run, this object_info is set up to be
|
||||
* passed to odb_read_object_info_extended. It will point to the data
|
||||
* passed to oid_object_info_extended. It will point to the data
|
||||
* elements above, so you can retrieve the response from there.
|
||||
*/
|
||||
struct object_info info;
|
||||
|
@ -307,7 +306,6 @@ struct expand_data {
|
|||
*/
|
||||
unsigned skip_object_info : 1;
|
||||
};
|
||||
#define EXPAND_DATA_INIT { .mode = S_IFINVALID }
|
||||
|
||||
static int is_atom(const char *atom, const char *s, int slen)
|
||||
{
|
||||
|
@ -347,9 +345,6 @@ static int expand_atom(struct strbuf *sb, const char *atom, int len,
|
|||
else
|
||||
strbuf_addstr(sb,
|
||||
oid_to_hex(&data->delta_base_oid));
|
||||
} else if (is_atom("objectmode", atom, len)) {
|
||||
if (!data->mark_query && !(S_IFINVALID == data->mode))
|
||||
strbuf_addf(sb, "%06o", data->mode);
|
||||
} else
|
||||
return 0;
|
||||
return 1;
|
||||
|
@ -406,8 +401,10 @@ static void print_object_or_die(struct batch_options *opt, struct expand_data *d
|
|||
if (!textconv_object(the_repository,
|
||||
data->rest, 0100644, oid,
|
||||
1, &contents, &size))
|
||||
contents = odb_read_object(the_repository->objects,
|
||||
oid, &type, &size);
|
||||
contents = repo_read_object_file(the_repository,
|
||||
oid,
|
||||
&type,
|
||||
&size);
|
||||
if (!contents)
|
||||
die("could not convert '%s' %s",
|
||||
oid_to_hex(oid), data->rest);
|
||||
|
@ -424,8 +421,8 @@ static void print_object_or_die(struct batch_options *opt, struct expand_data *d
|
|||
unsigned long size;
|
||||
void *contents;
|
||||
|
||||
contents = odb_read_object(the_repository->objects, oid,
|
||||
&type, &size);
|
||||
contents = repo_read_object_file(the_repository, oid, &type,
|
||||
&size);
|
||||
if (!contents)
|
||||
die("object %s disappeared", oid_to_hex(oid));
|
||||
|
||||
|
@ -487,17 +484,14 @@ static void batch_object_write(const char *obj_name,
|
|||
data->info.sizep = &data->size;
|
||||
|
||||
if (pack)
|
||||
ret = packed_object_info(the_repository, pack,
|
||||
offset, &data->info);
|
||||
ret = packed_object_info(the_repository, pack, offset,
|
||||
&data->info);
|
||||
else
|
||||
ret = odb_read_object_info_extended(the_repository->objects,
|
||||
&data->oid, &data->info,
|
||||
OBJECT_INFO_LOOKUP_REPLACE);
|
||||
ret = oid_object_info_extended(the_repository,
|
||||
&data->oid, &data->info,
|
||||
OBJECT_INFO_LOOKUP_REPLACE);
|
||||
if (ret < 0) {
|
||||
if (data->mode == S_IFGITLINK)
|
||||
report_object_status(opt, oid_to_hex(&data->oid), &data->oid, "submodule");
|
||||
else
|
||||
report_object_status(opt, obj_name, &data->oid, "missing");
|
||||
report_object_status(opt, obj_name, &data->oid, "missing");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -537,8 +531,8 @@ static void batch_object_write(const char *obj_name,
|
|||
size_t s = data->size;
|
||||
char *buf = NULL;
|
||||
|
||||
buf = odb_read_object(the_repository->objects, &data->oid,
|
||||
&data->type, &data->size);
|
||||
buf = repo_read_object_file(the_repository, &data->oid, &data->type,
|
||||
&data->size);
|
||||
if (!buf)
|
||||
die(_("unable to read %s"), oid_to_hex(&data->oid));
|
||||
buf = replace_idents_using_mailmap(buf, &s);
|
||||
|
@ -619,7 +613,6 @@ static void batch_one_object(const char *obj_name,
|
|||
goto out;
|
||||
}
|
||||
|
||||
data->mode = ctx.mode;
|
||||
batch_object_write(obj_name, scratch, opt, data, NULL, 0);
|
||||
|
||||
out:
|
||||
|
@ -873,15 +866,16 @@ static int batch_objects(struct batch_options *opt)
|
|||
{
|
||||
struct strbuf input = STRBUF_INIT;
|
||||
struct strbuf output = STRBUF_INIT;
|
||||
struct expand_data data = EXPAND_DATA_INIT;
|
||||
struct expand_data data;
|
||||
int save_warning;
|
||||
int retval = 0;
|
||||
|
||||
/*
|
||||
* Expand once with our special mark_query flag, which will prime the
|
||||
* object_info to be handed to odb_read_object_info_extended for each
|
||||
* object_info to be handed to oid_object_info_extended for each
|
||||
* object.
|
||||
*/
|
||||
memset(&data, 0, sizeof(data));
|
||||
data.mark_query = 1;
|
||||
expand_format(&output,
|
||||
opt->format ? opt->format : DEFAULT_FORMAT,
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "merge-ort-wrappers.h"
|
||||
#include "object-file.h"
|
||||
#include "object-name.h"
|
||||
#include "odb.h"
|
||||
#include "object-store.h"
|
||||
#include "parse-options.h"
|
||||
#include "path.h"
|
||||
#include "preload-index.h"
|
||||
|
@ -838,7 +838,7 @@ static int merge_working_tree(const struct checkout_opts *opts,
|
|||
init_tree_desc(&trees[0], &tree->object.oid,
|
||||
tree->buffer, tree->size);
|
||||
if (parse_tree(new_tree) < 0)
|
||||
die(NULL);
|
||||
exit(128);
|
||||
tree = new_tree;
|
||||
init_tree_desc(&trees[1], &tree->object.oid,
|
||||
tree->buffer, tree->size);
|
||||
|
@ -913,7 +913,7 @@ static int merge_working_tree(const struct checkout_opts *opts,
|
|||
work,
|
||||
old_tree);
|
||||
if (ret < 0)
|
||||
die(NULL);
|
||||
exit(128);
|
||||
ret = reset_tree(new_tree,
|
||||
opts, 0,
|
||||
writeout_error, new_branch_info);
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "refs.h"
|
||||
#include "refspec.h"
|
||||
#include "object-file.h"
|
||||
#include "odb.h"
|
||||
#include "object-store.h"
|
||||
#include "tree.h"
|
||||
#include "tree-walk.h"
|
||||
#include "unpack-trees.h"
|
||||
|
@ -171,7 +171,7 @@ static int add_one_reference(struct string_list_item *item, void *cb_data)
|
|||
} else {
|
||||
struct strbuf sb = STRBUF_INIT;
|
||||
strbuf_addf(&sb, "%s/objects", ref_git);
|
||||
odb_add_to_alternates_file(the_repository->objects, sb.buf);
|
||||
add_to_alternates_file(sb.buf);
|
||||
strbuf_release(&sb);
|
||||
}
|
||||
|
||||
|
@ -212,14 +212,12 @@ static void copy_alternates(struct strbuf *src, const char *src_repo)
|
|||
if (!line.len || line.buf[0] == '#')
|
||||
continue;
|
||||
if (is_absolute_path(line.buf)) {
|
||||
odb_add_to_alternates_file(the_repository->objects,
|
||||
line.buf);
|
||||
add_to_alternates_file(line.buf);
|
||||
continue;
|
||||
}
|
||||
abs_path = mkpathdup("%s/objects/%s", src_repo, line.buf);
|
||||
if (!normalize_path_copy(abs_path, abs_path))
|
||||
odb_add_to_alternates_file(the_repository->objects,
|
||||
abs_path);
|
||||
add_to_alternates_file(abs_path);
|
||||
else
|
||||
warning("skipping invalid relative alternate: %s/%s",
|
||||
src_repo, line.buf);
|
||||
|
@ -354,7 +352,7 @@ static void clone_local(const char *src_repo, const char *dest_repo)
|
|||
struct strbuf alt = STRBUF_INIT;
|
||||
get_common_dir(&alt, src_repo);
|
||||
strbuf_addstr(&alt, "/objects");
|
||||
odb_add_to_alternates_file(the_repository->objects, alt.buf);
|
||||
add_to_alternates_file(alt.buf);
|
||||
strbuf_release(&alt);
|
||||
} else {
|
||||
struct strbuf src = STRBUF_INIT;
|
||||
|
@ -506,7 +504,7 @@ static void write_followtags(const struct ref *refs, const char *msg)
|
|||
continue;
|
||||
if (ends_with(ref->name, "^{}"))
|
||||
continue;
|
||||
if (!odb_has_object(the_repository->objects, &ref->old_oid, 0))
|
||||
if (!has_object(the_repository, &ref->old_oid, 0))
|
||||
continue;
|
||||
refs_update_ref(get_main_ref_store(the_repository), msg,
|
||||
ref->name, &ref->old_oid, NULL, 0,
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "hex.h"
|
||||
#include "parse-options.h"
|
||||
#include "commit-graph.h"
|
||||
#include "odb.h"
|
||||
#include "object-store.h"
|
||||
#include "progress.h"
|
||||
#include "replace-object.h"
|
||||
#include "strbuf.h"
|
||||
|
@ -66,7 +66,7 @@ static int graph_verify(int argc, const char **argv, const char *prefix,
|
|||
struct repository *repo UNUSED)
|
||||
{
|
||||
struct commit_graph *graph = NULL;
|
||||
struct odb_source *source = NULL;
|
||||
struct object_directory *odb = NULL;
|
||||
char *graph_name;
|
||||
char *chain_name;
|
||||
enum { OPENED_NONE, OPENED_GRAPH, OPENED_CHAIN } opened = OPENED_NONE;
|
||||
|
@ -101,9 +101,9 @@ static int graph_verify(int argc, const char **argv, const char *prefix,
|
|||
if (opts.progress)
|
||||
flags |= COMMIT_GRAPH_WRITE_PROGRESS;
|
||||
|
||||
source = odb_find_source(the_repository->objects, opts.obj_dir);
|
||||
graph_name = get_commit_graph_filename(source);
|
||||
chain_name = get_commit_graph_chain_filename(source);
|
||||
odb = find_odb(the_repository, opts.obj_dir);
|
||||
graph_name = get_commit_graph_filename(odb);
|
||||
chain_name = get_commit_graph_chain_filename(odb);
|
||||
if (open_commit_graph(graph_name, &fd, &st))
|
||||
opened = OPENED_GRAPH;
|
||||
else if (errno != ENOENT)
|
||||
|
@ -120,7 +120,7 @@ static int graph_verify(int argc, const char **argv, const char *prefix,
|
|||
if (opened == OPENED_NONE)
|
||||
return 0;
|
||||
else if (opened == OPENED_GRAPH)
|
||||
graph = load_commit_graph_one_fd_st(the_repository, fd, &st, source);
|
||||
graph = load_commit_graph_one_fd_st(the_repository, fd, &st, odb);
|
||||
else
|
||||
graph = load_commit_graph_chain_fd_st(the_repository, fd, &st,
|
||||
&incomplete_chain);
|
||||
|
@ -221,7 +221,7 @@ static int graph_write(int argc, const char **argv, const char *prefix,
|
|||
struct string_list pack_indexes = STRING_LIST_INIT_DUP;
|
||||
struct strbuf buf = STRBUF_INIT;
|
||||
struct oidset commits = OIDSET_INIT;
|
||||
struct odb_source *source = NULL;
|
||||
struct object_directory *odb = NULL;
|
||||
int result = 0;
|
||||
enum commit_graph_write_flags flags = 0;
|
||||
struct progress *progress = NULL;
|
||||
|
@ -289,10 +289,10 @@ static int graph_write(int argc, const char **argv, const char *prefix,
|
|||
git_env_bool(GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS, 0))
|
||||
flags |= COMMIT_GRAPH_WRITE_BLOOM_FILTERS;
|
||||
|
||||
source = odb_find_source(the_repository->objects, opts.obj_dir);
|
||||
odb = find_odb(the_repository, opts.obj_dir);
|
||||
|
||||
if (opts.reachable) {
|
||||
if (write_commit_graph_reachable(source, flags, &write_opts))
|
||||
if (write_commit_graph_reachable(odb, flags, &write_opts))
|
||||
result = 1;
|
||||
goto cleanup;
|
||||
}
|
||||
|
@ -311,7 +311,6 @@ static int graph_write(int argc, const char **argv, const char *prefix,
|
|||
while (strbuf_getline(&buf, stdin) != EOF) {
|
||||
if (read_one_commit(&commits, progress, buf.buf)) {
|
||||
result = 1;
|
||||
stop_progress(&progress);
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
@ -319,7 +318,7 @@ static int graph_write(int argc, const char **argv, const char *prefix,
|
|||
stop_progress(&progress);
|
||||
}
|
||||
|
||||
if (write_commit_graph(source,
|
||||
if (write_commit_graph(odb,
|
||||
opts.stdin_packs ? &pack_indexes : NULL,
|
||||
opts.stdin_commits ? &commits : NULL,
|
||||
flags,
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue