Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
441c4a4017 | |||
f54cb059b1 | |||
78f23bdf68 | |||
5015f01c12 | |||
c29edfefb6 | |||
f514ef9787 |
1
.mailmap
1
.mailmap
@ -13,7 +13,6 @@ Alex Riesen <raa.lkml@gmail.com> <raa@limbo.localdomain>
|
||||
Alex Riesen <raa.lkml@gmail.com> <raa@steel.home>
|
||||
Alex Vandiver <alex@chmrr.net> <alexmv@MIT.EDU>
|
||||
Alexander Gavrilov <angavrilov@gmail.com>
|
||||
Alexander Kuleshov <kuleshovmail@gmail.com>
|
||||
Alexey Shumkin <alex.crezoff@gmail.com> <zapped@mail.ru>
|
||||
Alexey Shumkin <alex.crezoff@gmail.com> <Alex.Crezoff@gmail.com>
|
||||
Anders Kaseorg <andersk@MIT.EDU> <andersk@ksplice.com>
|
||||
|
@ -1,5 +1,5 @@
|
||||
Like other projects, we also have some guidelines to keep to the
|
||||
code. For Git in general, a few rough rules are:
|
||||
code. For Git in general, three rough rules are:
|
||||
|
||||
- Most importantly, we never say "It's in POSIX; we'll happily
|
||||
ignore your needs should your system not conform to it."
|
||||
@ -328,14 +328,9 @@ For C programs:
|
||||
|
||||
- When you come up with an API, document it.
|
||||
|
||||
- The first #include in C files, except in platform specific compat/
|
||||
implementations, must be either "git-compat-util.h", "cache.h" or
|
||||
"builtin.h". You do not have to include more than one of these.
|
||||
|
||||
- A C file must directly include the header files that declare the
|
||||
functions and the types it uses, except for the functions and types
|
||||
that are made available to it by including one of the header files
|
||||
it must include by the previous rule.
|
||||
- The first #include in C files, except in platform specific
|
||||
compat/ implementations, should be git-compat-util.h or another
|
||||
header file that includes it, such as cache.h or builtin.h.
|
||||
|
||||
- If you are planning a new command, consider writing it in shell
|
||||
or perl first, so that changes in semantics can be easily
|
||||
@ -418,29 +413,6 @@ Error Messages
|
||||
- Say what the error is first ("cannot open %s", not "%s: cannot open")
|
||||
|
||||
|
||||
Externally Visible Names
|
||||
|
||||
- For configuration variable names, follow the existing convention:
|
||||
|
||||
. The section name indicates the affected subsystem.
|
||||
|
||||
. The subsection name, if any, indicates which of an unbounded set
|
||||
of things to set the value for.
|
||||
|
||||
. The variable name describes the effect of tweaking this knob.
|
||||
|
||||
The section and variable names that consist of multiple words are
|
||||
formed by concatenating the words without punctuations (e.g. `-`),
|
||||
and are broken using bumpyCaps in documentation as a hint to the
|
||||
reader.
|
||||
|
||||
When choosing the variable namespace, do not use variable name for
|
||||
specifying possibly unbounded set of things, most notably anything
|
||||
an end user can freely come up with (e.g. branch names). Instead,
|
||||
use subsection names or variable values, like the existing variable
|
||||
branch.<name>.description does.
|
||||
|
||||
|
||||
Writing Documentation:
|
||||
|
||||
Most (if not all) of the documentation pages are written in the
|
||||
@ -469,10 +441,6 @@ Writing Documentation:
|
||||
--sort=<key>
|
||||
--abbrev[=<n>]
|
||||
|
||||
If a placeholder has multiple words, they are separated by dashes:
|
||||
<new-branch-name>
|
||||
--template=<template-directory>
|
||||
|
||||
Possibility of multiple occurrences is indicated by three dots:
|
||||
<file>...
|
||||
(One or more of <file>.)
|
||||
@ -489,12 +457,12 @@ Writing Documentation:
|
||||
(Zero or more of <patch>. Note that the dots are inside, not
|
||||
outside the brackets.)
|
||||
|
||||
Multiple alternatives are indicated with vertical bars:
|
||||
Multiple alternatives are indicated with vertical bar:
|
||||
[-q | --quiet]
|
||||
[--utf8 | --no-utf8]
|
||||
|
||||
Parentheses are used for grouping:
|
||||
[(<rev> | <range>)...]
|
||||
[(<rev>|<range>)...]
|
||||
(Any number of either <rev> or <range>. Parens are needed to make
|
||||
it clear that "..." pertains to both <rev> and <range>.)
|
||||
|
||||
@ -526,7 +494,7 @@ Writing Documentation:
|
||||
`backticks around word phrases`, do so.
|
||||
`--pretty=oneline`
|
||||
`git rev-list`
|
||||
`remote.pushDefault`
|
||||
`remote.pushdefault`
|
||||
|
||||
Word phrases enclosed in `backtick characters` are rendered literally
|
||||
and will not be further expanded. The use of `backticks` to achieve the
|
||||
|
@ -103,7 +103,7 @@ ASCIIDOC_HTML = xhtml11
|
||||
ASCIIDOC_DOCBOOK = docbook
|
||||
ASCIIDOC_CONF = -f asciidoc.conf
|
||||
ASCIIDOC_COMMON = $(ASCIIDOC) $(ASCIIDOC_EXTRA) $(ASCIIDOC_CONF) \
|
||||
-agit_version=$(GIT_VERSION)
|
||||
-agit-version=$(GIT_VERSION)
|
||||
TXT_TO_HTML = $(ASCIIDOC_COMMON) -b $(ASCIIDOC_HTML)
|
||||
TXT_TO_XML = $(ASCIIDOC_COMMON) -b $(ASCIIDOC_DOCBOOK)
|
||||
MANPAGE_XSL = manpage-normal.xsl
|
||||
|
9
Documentation/RelNotes/2.2.3.txt
Normal file
9
Documentation/RelNotes/2.2.3.txt
Normal file
@ -0,0 +1,9 @@
|
||||
Git v2.2.3 Release Notes
|
||||
========================
|
||||
|
||||
Fixes since v2.2.2
|
||||
------------------
|
||||
|
||||
* A handful of codepaths that used to use fixed-sized arrays to hold
|
||||
pathnames have been corrected to use strbuf and other mechanisms to
|
||||
allow longer pathnames without fearing overflows.
|
@ -1,300 +0,0 @@
|
||||
Git v2.3 Release Notes
|
||||
======================
|
||||
|
||||
This one ended up to be a release with lots of small corrections and
|
||||
improvements without big uncomfortably exciting features. The recent
|
||||
security fix that went to 2.2.1 and older maintenance tracks is also
|
||||
contained in this update.
|
||||
|
||||
|
||||
Updates since v2.2
|
||||
------------------
|
||||
|
||||
Ports
|
||||
|
||||
* Recent gcc toolchain on Cygwin started throwing compilation warning,
|
||||
which has been squelched.
|
||||
|
||||
* A few updates to build on platforms that lack tv_nsec,
|
||||
clock_gettime, CLOCK_MONOTONIC and HMAC_CTX_cleanup (e.g. older
|
||||
RHEL) have been added.
|
||||
|
||||
|
||||
UI, Workflows & Features
|
||||
|
||||
* It was cumbersome to use "GIT_SSH" mechanism when the user wanted
|
||||
to pass an extra set of arguments to the underlying ssh. A new
|
||||
environment variable GIT_SSH_COMMAND can be used for this.
|
||||
|
||||
* A request to store an empty note via "git notes" meant to remove
|
||||
note from the object but with --allow-empty we will store a
|
||||
(surprise!) note that is empty.
|
||||
|
||||
* "git interpret-trailers" learned to properly handle the
|
||||
"Conflicts:" block at the end.
|
||||
|
||||
* "git am" learned "--message-id" option to copy the message ID of
|
||||
the incoming e-mail to the log message of resulting commit.
|
||||
|
||||
* "git clone --reference=<over there>" learned the "--dissociate"
|
||||
option to go with it; it borrows objects from the reference object
|
||||
store while cloning only to reduce network traffic and then
|
||||
dissociates the resulting clone from the reference by performing
|
||||
local copies of borrowed objects.
|
||||
|
||||
* "git send-email" learned "--transfer-encoding" option to force a
|
||||
non-fault Content-Transfer-Encoding header (e.g. base64).
|
||||
|
||||
* "git send-email" normally identifies itself via X-Mailer: header in
|
||||
the message it sends out. A new command line flag --no-xmailer
|
||||
allows the user to squelch the header.
|
||||
|
||||
* "git push" into a repository with a working tree normally refuses
|
||||
to modify the branch that is checked out. The command learned to
|
||||
optionally do an equivalent of "git reset --hard" only when there
|
||||
is no change to the working tree and the index instead, which would
|
||||
be useful to "deploy" by pushing into a repository.
|
||||
|
||||
* "git new-workdir" (in contrib/) can be used to populate an empty
|
||||
and existing directory now.
|
||||
|
||||
* Credential helpers are asked in turn until one of them give
|
||||
positive response, which is cumbersome to turn off when you need to
|
||||
run Git in an automated setting. The credential helper interface
|
||||
learned to allow a helper to say "stop, don't ask other helpers."
|
||||
Also GIT_TERMINAL_PROMPT environment can be set to false to disable
|
||||
our built-in prompt mechanism for passwords.
|
||||
|
||||
* "git branch -d" (delete) and "git branch -m" (move) learned to
|
||||
honor "-f" (force) flag; unlike many other subcommands, the way to
|
||||
force these have been with separate "-D/-M" options, which was
|
||||
inconsistent.
|
||||
|
||||
* "diff-highlight" filter (in contrib/) allows its color output to be
|
||||
customized via configuration variables.
|
||||
|
||||
* "git imap-send" learned to take "-v" (verbose) and "-q" (quiet)
|
||||
command line options.
|
||||
|
||||
* "git remote add $name $URL" is now allowed when "url.$URL.insteadOf"
|
||||
is already defined.
|
||||
|
||||
* "git imap-send" now can be built to use cURL library to talk to
|
||||
IMAP servers (if the library is recent enough, of course).
|
||||
This allows you to use authenticate method other than CRAM-MD5,
|
||||
among other things.
|
||||
|
||||
* "git imap-send" now allows GIT_CURL_VERBOSE environment variable to
|
||||
control the verbosity when talking via the cURL library.
|
||||
|
||||
* The prompt script (in contrib/) learned to optionally hide prompt
|
||||
when in an ignored directory by setting GIT_PS1_HIDE_IF_PWD_IGNORED
|
||||
shell variable.
|
||||
|
||||
|
||||
Performance, Internal Implementation, Development Support etc.
|
||||
|
||||
* Earlier we made "rev-list --object-edge" more aggressively list the
|
||||
objects at the edge commits, in order to reduce number of objects
|
||||
fetched into a shallow repository, but the change affected cases
|
||||
other than "fetching into a shallow repository" and made it
|
||||
unusably slow (e.g. fetching into a normal repository should not
|
||||
have to suffer the overhead from extra processing). Limit it to a
|
||||
more specific case by introducing --objects-edge-aggressive, a new
|
||||
option to rev-list.
|
||||
|
||||
* Squelched useless compiler warnings on Mac OS X regarding the
|
||||
crypto API.
|
||||
|
||||
* The procedure to generate unicode table has been simplified.
|
||||
|
||||
* Some filesystems assign filemodes in a strange way, fooling then
|
||||
automatic "filemode trustability" check done during a new
|
||||
repository creation. The initialization codepath has been hardened
|
||||
against this issue.
|
||||
|
||||
* The codepath in "git remote update --prune" to drop many refs has
|
||||
been optimized.
|
||||
|
||||
* The API into get_merge_bases*() family of functions was easy to
|
||||
misuse, which has been corrected to make it harder to do so.
|
||||
|
||||
* Long overdue departure from the assumption that S_IFMT is shared by
|
||||
everybody made in 2005, which was necessary to port to z/OS.
|
||||
|
||||
* "git push" and "git fetch" did not communicate an overlong refname
|
||||
correctly. Now it uses 64kB sideband to accommodate longer ones.
|
||||
|
||||
* Recent GPG changes the keyring format and drops support for RFC1991
|
||||
formatted signatures, breaking our existing tests.
|
||||
|
||||
* "git-prompt" (in contrib/) used a variable from the global scope,
|
||||
possibly contaminating end-user's namespace.
|
||||
|
||||
|
||||
Also contains various documentation updates and code clean-ups.
|
||||
|
||||
|
||||
Fixes since v2.2
|
||||
----------------
|
||||
|
||||
Unless otherwise noted, all the fixes since v2.2 in the maintenance
|
||||
track are contained in this release (see the maintenance releases'
|
||||
notes for details).
|
||||
|
||||
* "git http-push" over WebDAV (aka dumb http-push) was broken in
|
||||
v2.2.2 when parsing a symbolic ref, resulting in a bogus request
|
||||
that gets rejected by recent versions of cURL library.
|
||||
(merge f6786c8 jk/http-push-symref-fix later to maint).
|
||||
|
||||
* The logic in "git bisect bad HEAD" etc. to avoid forcing the test
|
||||
of the common ancestor of bad and good commits was broken.
|
||||
(merge 07913d5 cc/bisect-rev-parsing later to maint).
|
||||
|
||||
* "git checkout-index --temp=$target $path" did not work correctly
|
||||
for paths outside the current subdirectory in the project.
|
||||
(merge 74c4de5 es/checkout-index-temp later to maint).
|
||||
|
||||
* The report from "git checkout" on a branch that builds on another
|
||||
local branch by setting its branch.*.merge to branch name (not a
|
||||
full refname) incorrectly said that the upstream is gone.
|
||||
(merge 05e7368 jc/checkout-local-track-report later to maint).
|
||||
|
||||
* With The git-prompt support (in contrib/), using the exit status of
|
||||
the last command in the prompt, e.g. PS1='$(__git_ps1) $? ', did
|
||||
not work well, because the helper function stomped on the exit
|
||||
status.
|
||||
(merge 6babe76 tf/prompt-preserve-exit-status later to maint).
|
||||
|
||||
* Recent update to "git commit" broke amending an existing commit
|
||||
with bogus author/committer lines without a valid e-mail address.
|
||||
(merge c83a509 jk/commit-date-approxidate later to maint).
|
||||
|
||||
* The lockfile API used to get confused which file to clean up when
|
||||
the process moved the $cwd after creating a lockfile.
|
||||
(merge fa137f6 nd/lockfile-absolute later to maint).
|
||||
|
||||
* Traditionally we tried to avoid interpreting date strings given by
|
||||
the user as future dates, e.g. GIT_COMMITTER_DATE=2014-12-10 when
|
||||
used early November 2014 was taken as "October 12, 2014" because it
|
||||
is likely that a date in the future, December 10, is a mistake.
|
||||
This heuristics has been loosened to allow people to express future
|
||||
dates (most notably, --until=<date> may want to be far in the
|
||||
future) and we no longer tiebreak by future-ness of the date when
|
||||
|
||||
(1) ISO-like format is used, and
|
||||
(2) the string can make sense interpreted as both y-m-d and y-d-m.
|
||||
|
||||
Git may still have to use the heuristics to tiebreak between dd/mm/yy
|
||||
and mm/dd/yy, though.
|
||||
(merge d372395 jk/approxidate-avoid-y-d-m-over-future-dates later to maint).
|
||||
|
||||
* Git did not correctly read an overlong refname from a packed refs
|
||||
file.
|
||||
(merge ea41783 jk/read-packed-refs-without-path-max later to maint).
|
||||
|
||||
* "git apply" was described in the documentation to take --ignore-date
|
||||
option, which it does not.
|
||||
(merge 0cef4e7 rw/apply-does-not-take-ignore-date later to maint).
|
||||
|
||||
* "git add -i" did not notice when the interactive command input
|
||||
stream went away and kept asking the same question.
|
||||
(merge a8bec7a jk/add-i-read-error later to maint).
|
||||
|
||||
* "git send-email" did not handle RFC 2047 encoded headers quite
|
||||
right.
|
||||
(merge ab47e2a rd/send-email-2047-fix later to maint).
|
||||
|
||||
* New tag object format validation added in 2.2 showed garbage after
|
||||
a tagname it reported in its error message.
|
||||
(merge a1e920a js/fsck-tag-validation later to maint).
|
||||
|
||||
* The code that reads the reflog from the newer to the older entries
|
||||
did not handle an entry that crosses a boundary of block it uses to
|
||||
read them correctly.
|
||||
(merge 69216bf jk/for-each-reflog-ent-reverse later to maint).
|
||||
|
||||
* "git diff -B -M" after making a new copy B out of an existing file
|
||||
A and then editing A extensively ought to report that B was created
|
||||
by copying A and A was modified, which is what "git diff -C"
|
||||
reports, but it instead said A was renamed to B and A was edited
|
||||
heavily in place. This was not just incoherent but also failed to
|
||||
apply with "git apply". The report has been corrected to match what
|
||||
"git diff -C" produces for this case.
|
||||
(merge 6936b58 jc/diff-b-m later to maint).
|
||||
|
||||
* In files we pre-populate for the user to edit with commented hints,
|
||||
a line of hint that is indented with a tab used to show as '#' (or
|
||||
any comment char), ' ' (space), and then the hint text that began
|
||||
with the tab, which some editors flag as an indentation error (tab
|
||||
following space). We now omit the space after the comment char in
|
||||
such a case.
|
||||
(merge d55aeb7 jc/strbuf-add-lines-avoid-sp-ht-sequence later to maint).
|
||||
|
||||
* "git ls-tree" does not support path selection based on negative
|
||||
pathspecs, but did not error out when negative pathspecs are given.
|
||||
(merge f1f6224 nd/ls-tree-pathspec later to maint).
|
||||
|
||||
* The function sometimes returned a non-freeable memory and some
|
||||
other times returned a piece of memory that must be freed, leading
|
||||
to inevitable leaks.
|
||||
(merge 59362e5 jc/exec-cmd-system-path-leak-fix later to maint).
|
||||
|
||||
* The code to abbreviate an object name to its short unique prefix
|
||||
has been optimized when no abbreviation was requested.
|
||||
(merge 61e704e mh/find-uniq-abbrev later to maint).
|
||||
|
||||
* "git add --ignore-errors ..." did not ignore an error to
|
||||
give a file that did not exist.
|
||||
(merge 1d31e5a mg/add-ignore-errors later to maint).
|
||||
|
||||
* "git checkout $treeish $path", when $path in the index and the
|
||||
working tree already matched what is in $treeish at the $path,
|
||||
still overwrote the $path unnecessarily.
|
||||
(merge c5326bd jk/checkout-from-tree later to maint).
|
||||
|
||||
* "git config --get-color" did not parse its command line arguments
|
||||
carefully.
|
||||
(merge cb35722 jk/colors-fix later to maint).
|
||||
|
||||
* open() emulated on Windows platforms did not give EISDIR upon
|
||||
an attempt to open a directory for writing.
|
||||
(merge ba6fad0 js/windows-open-eisdir-error later to maint).
|
||||
|
||||
* A few code paths used abs() when they should have used labs() on
|
||||
long integers.
|
||||
(merge 83915ba rs/maint-config-use-labs later to maint).
|
||||
(merge 31a8aa1 rs/receive-pack-use-labs later to maint).
|
||||
|
||||
* "gitweb" used to depend on a behaviour recent CGI.pm deprecated.
|
||||
(merge 13dbf46 jk/gitweb-with-newer-cgi-multi-param later to maint).
|
||||
|
||||
* "git init" (hence "git clone") initialized the per-repository
|
||||
configuration file .git/config with x-bit by mistake.
|
||||
(merge 1f32ecf mh/config-flip-xbit-back-after-checking later to maint).
|
||||
|
||||
* Recent update in Git 2.2 started creating objects/info/packs and
|
||||
info/refs files with permission bits tighter than user's umask.
|
||||
(merge d91175b jk/prune-packed-server-info later to maint).
|
||||
|
||||
* Git 2.0 was supposed to make the "simple" mode for the default of
|
||||
"git push", but it didn't.
|
||||
(merge 00a6fa0 jk/push-simple later to maint).
|
||||
|
||||
* "Everyday" document had a broken link.
|
||||
(merge 366c8d4 po/everyday-doc later to maint).
|
||||
|
||||
* A few test fixes.
|
||||
(merge 880ef58 jk/no-perl-tests later to maint).
|
||||
|
||||
* The build procedure did not bother fixing perl and python scripts
|
||||
when NO_PERL and NO_PYTHON build-time configuration changed.
|
||||
(merge ca2051d jk/rebuild-perl-scripts-with-no-perl-seting-change later to maint).
|
||||
|
||||
* The usage string of "git log" command was marked incorrectly for
|
||||
l10n.
|
||||
(merge e66dc0c km/log-usage-string-i18n later to maint).
|
||||
|
||||
* "git for-each-ref" mishandled --format="%(upstream:track)" when a
|
||||
branch is marked to have forked from a non-existing branch.
|
||||
(merge b6160d9 rc/for-each-ref-tracking later to maint).
|
@ -1,52 +0,0 @@
|
||||
Git v2.3.1 Release Notes
|
||||
========================
|
||||
|
||||
Fixes since v2.3
|
||||
----------------
|
||||
|
||||
* The interactive "show a list and let the user choose from it"
|
||||
interface "add -i" used showed and prompted to the user even when
|
||||
the candidate list was empty, against which the only "choice" the
|
||||
user could have made was to choose nothing.
|
||||
|
||||
* "git apply --whitespace=fix" used to under-allocate the memory
|
||||
when the fix resulted in a longer text than the original patch.
|
||||
|
||||
* "git log --help" used to show rev-list options that are irrelevant
|
||||
to the "log" command.
|
||||
|
||||
* The error message from "git commit", when a non-existing author
|
||||
name was given as value to the "--author=" parameter, has been
|
||||
reworded to avoid misunderstanding.
|
||||
|
||||
* A broken pack .idx file in the receiving repository prevented the
|
||||
dumb http transport from fetching a good copy of it from the other
|
||||
side.
|
||||
|
||||
* The documentation incorrectly said that C(opy) and R(ename) are the
|
||||
only ones that can be followed by the score number in the output in
|
||||
the --raw format.
|
||||
|
||||
* Fix a misspelled conditional that is always true.
|
||||
|
||||
* Code to read branch name from various files in .git/ directory
|
||||
would have misbehaved if the code to write them left an empty file.
|
||||
|
||||
* The "git push" documentation made the "--repo=<there>" option
|
||||
easily misunderstood.
|
||||
|
||||
* After attempting and failing a password-less authentication
|
||||
(e.g. kerberos), libcURL refuses to fall back to password based
|
||||
Basic authentication without a bit of help/encouragement.
|
||||
|
||||
* Setting diff.submodule to 'log' made "git format-patch" produce
|
||||
broken patches.
|
||||
|
||||
* "git rerere" (invoked internally from many mergy operations) did
|
||||
not correctly signal errors when told to update the working tree
|
||||
files and failed to do so for whatever reason.
|
||||
|
||||
* "git blame HEAD -- missing" failed to correctly say "HEAD" when it
|
||||
tried to say "No such path 'missing' in HEAD".
|
||||
|
||||
Also contains typofixes, documentation updates and trivial code clean-ups.
|
@ -1,79 +0,0 @@
|
||||
Git v2.3.2 Release Notes
|
||||
========================
|
||||
|
||||
Fixes since v2.3.1
|
||||
------------------
|
||||
|
||||
* "update-index --refresh" used to leak when an entry cannot be
|
||||
refreshed for whatever reason.
|
||||
|
||||
* "git fast-import" used to crash when it could not close and
|
||||
conclude the resulting packfile cleanly.
|
||||
|
||||
* "git blame" died, trying to free an uninitialized piece of memory.
|
||||
|
||||
* "git merge-file" did not work correctly in a subdirectory.
|
||||
|
||||
* "git submodule add" failed to squash "path/to/././submodule" to
|
||||
"path/to/submodule".
|
||||
|
||||
* In v2.2.0, we broke "git prune" that runs in a repository that
|
||||
borrows from an alternate object store.
|
||||
|
||||
* Certain older vintages of cURL give irregular output from
|
||||
"curl-config --vernum", which confused our build system.
|
||||
|
||||
* An earlier workaround to squelch unhelpful deprecation warnings
|
||||
from the compiler on Mac OSX unnecessarily set minimum required
|
||||
version of the OS, which the user might want to raise (or lower)
|
||||
for other reasons.
|
||||
|
||||
* Longstanding configuration variable naming rules has been added to
|
||||
the documentation.
|
||||
|
||||
* The credential helper for Windows (in contrib/) used to mishandle
|
||||
a user name with an at-sign in it.
|
||||
|
||||
* Older GnuPG implementations may not correctly import the keyring
|
||||
material we prepare for the tests to use.
|
||||
|
||||
* Clarify in the documentation that "remote.<nick>.pushURL" and
|
||||
"remote.<nick>.URL" are there to name the same repository accessed
|
||||
via different transports, not two separate repositories.
|
||||
|
||||
* The pack bitmap support did not build with older versions of GCC.
|
||||
|
||||
* Reading configuration from a blob object, when it ends with a lone
|
||||
CR, use to confuse the configuration parser.
|
||||
|
||||
* We didn't format an integer that wouldn't fit in "int" but in
|
||||
"uintmax_t" correctly.
|
||||
|
||||
* "git push --signed" gave an incorrectly worded error message when
|
||||
the other side did not support the capability.
|
||||
|
||||
* "git fetch" over a remote-helper that cannot respond to "list"
|
||||
command could not fetch from a symbolic reference e.g. HEAD.
|
||||
|
||||
* The insn sheet "git rebase -i" creates did not fully honor
|
||||
core.abbrev settings.
|
||||
|
||||
* The tests that wanted to see that file becomes unreadable after
|
||||
running "chmod a-r file", and the tests that wanted to make sure it
|
||||
is not run as root, we used "can we write into the / directory?" as
|
||||
a cheap substitute, but on some platforms that is not a good
|
||||
heuristics. The tests and their prerequisites have been updated to
|
||||
check what they really require.
|
||||
|
||||
* The configuration variable 'mailinfo.scissors' was hard to
|
||||
discover in the documentation.
|
||||
|
||||
* Correct a breakage to git-svn around v2.2 era that triggers
|
||||
premature closing of FileHandle.
|
||||
|
||||
* Even though we officially haven't dropped Perl 5.8 support, the
|
||||
Getopt::Long package that came with it does not support "--no-"
|
||||
prefix to negate a boolean option; manually add support to help
|
||||
people with older Getopt::Long package.
|
||||
|
||||
Also contains typofixes, documentation updates and trivial code clean-ups.
|
@ -1,39 +0,0 @@
|
||||
Git v2.3.3 Release Notes
|
||||
========================
|
||||
|
||||
Fixes since v2.3.2
|
||||
------------------
|
||||
|
||||
* A corrupt input to "git diff -M" used cause us to segfault.
|
||||
|
||||
* The borrowed code in kwset API did not follow our usual convention
|
||||
to use "unsigned char" to store values that range from 0-255.
|
||||
|
||||
* Description given by "grep -h" for its --exclude-standard option
|
||||
was phrased poorly.
|
||||
|
||||
* Documentaton for "git remote add" mentioned "--tags" and
|
||||
"--no-tags" and it was not clear that fetch from the remote in
|
||||
the future will use the default behaviour when neither is given
|
||||
to override it.
|
||||
|
||||
* "git diff --shortstat --dirstat=changes" showed a dirstat based on
|
||||
lines that was never asked by the end user in addition to the
|
||||
dirstat that the user asked for.
|
||||
|
||||
* The interaction between "git submodule update" and the
|
||||
submodule.*.update configuration was not clearly documented.
|
||||
|
||||
* "git apply" was not very careful about reading from, removing,
|
||||
updating and creating paths outside the working tree (under
|
||||
--index/--cached) or the current directory (when used as a
|
||||
replacement for GNU patch).
|
||||
|
||||
* "git daemon" looked up the hostname even when "%CH" and "%IP"
|
||||
interpolations are not requested, which was unnecessary.
|
||||
|
||||
* The "interpolated-path" option of "git daemon" inserted any string
|
||||
client declared on the "host=" capability request without checking.
|
||||
Sanitize and limit %H and %CH to a saner and a valid DNS name.
|
||||
|
||||
Also contains typofixes, documentation updates and trivial code clean-ups.
|
@ -1,32 +0,0 @@
|
||||
Git v2.3.4 Release Notes
|
||||
========================
|
||||
|
||||
Fixes since v2.3.3
|
||||
------------------
|
||||
|
||||
* The 'color.status.unmerged' configuration was not described.
|
||||
|
||||
* "git log --decorate" did not reset colors correctly around the
|
||||
branch names.
|
||||
|
||||
* "git -C '' subcmd" refused to work in the current directory, unlike
|
||||
"cd ''" which silently behaves as a no-op.
|
||||
|
||||
* "git imap-send" learned to optionally talk with an IMAP server via
|
||||
libcURL; because there is no other option when Git is built with
|
||||
NO_OPENSSL option, use that codepath by default under such
|
||||
configuration.
|
||||
|
||||
* A workaround for certain build of GPG that triggered false breakage
|
||||
in a test has been added.
|
||||
|
||||
* "git rebase -i" recently started to include the number of
|
||||
commits in the insn sheet to be processed, but on a platform
|
||||
that prepends leading whitespaces to "wc -l" output, the numbers
|
||||
are shown with extra whitespaces that aren't necessary.
|
||||
|
||||
* We did not parse username followed by literal IPv6 address in SSH
|
||||
transport URLs, e.g. ssh://user@[2001:db8::1]:22/repo.git
|
||||
correctly.
|
||||
|
||||
Also contains typofixes, documentation updates and trivial code clean-ups.
|
@ -1,44 +0,0 @@
|
||||
Git v2.3.5 Release Notes
|
||||
========================
|
||||
|
||||
Fixes since v2.3.4
|
||||
------------------
|
||||
|
||||
* The prompt script (in contrib/) did not show the untracked sign
|
||||
when working in a subdirectory without any untracked files.
|
||||
|
||||
* Even though "git grep --quiet" is run merely to ask for the exit
|
||||
status, we spawned the pager regardless. Stop doing that.
|
||||
|
||||
* Recommend format-patch and send-email for those who want to submit
|
||||
patches to this project.
|
||||
|
||||
* An failure early in the "git clone" that started creating the
|
||||
working tree and repository could have resulted in some directories
|
||||
and files left without getting cleaned up.
|
||||
|
||||
* "git fetch" that fetches a commit using the allow-tip-sha1-in-want
|
||||
extension could have failed to fetch all the requested refs.
|
||||
|
||||
* The split-index mode introduced at v2.3.0-rc0~41 was broken in the
|
||||
codepath to protect us against a broken reimplementation of Git
|
||||
that writes an invalid index with duplicated index entries, etc.
|
||||
|
||||
* "git prune" used to largely ignore broken refs when deciding which
|
||||
objects are still being used, which could spread an existing small
|
||||
damage and make it a larger one.
|
||||
|
||||
* "git tag -h" used to show the "--column" and "--sort" options
|
||||
that are about listing in a wrong section.
|
||||
|
||||
* The transfer.hiderefs support did not quite work for smart-http
|
||||
transport.
|
||||
|
||||
* The code that reads from the ctags file in the completion script
|
||||
(in contrib/) did not spell ${param/pattern/string} substitution
|
||||
correctly, which happened to work with bash but not with zsh.
|
||||
|
||||
* The explanation on "rebase --preserve-merges", "pull --rebase=preserve",
|
||||
and "push --force-with-lease" in the documentation was unclear.
|
||||
|
||||
Also contains typofixes, documentation updates and trivial code clean-ups.
|
@ -1,13 +0,0 @@
|
||||
Git v2.3.6 Release Notes
|
||||
========================
|
||||
|
||||
Fixes since v2.3.5
|
||||
------------------
|
||||
|
||||
* "diff-highlight" (in contrib/) used to show byte-by-byte
|
||||
differences, which meant that multi-byte characters can be chopped
|
||||
in the middle. It learned to pay attention to character boundaries
|
||||
(assuming the UTF-8 payload).
|
||||
|
||||
Also contains typofixes, documentation updates and trivial code
|
||||
clean-ups.
|
@ -1,21 +0,0 @@
|
||||
Git v2.3.7 Release Notes
|
||||
========================
|
||||
|
||||
Fixes since v2.3.6
|
||||
------------------
|
||||
|
||||
* An earlier update to the parser that disects a URL broke an
|
||||
address, followed by a colon, followed by an empty string (instead
|
||||
of the port number), e.g. ssh://example.com:/path/to/repo.
|
||||
|
||||
* The completion script (in contrib/) contaminated global namespace
|
||||
and clobbered on a shell variable $x.
|
||||
|
||||
* The "git push --signed" protocol extension did not limit what the
|
||||
"nonce" that is a server-chosen string can contain or how long it
|
||||
can be, which was unnecessarily lax. Limit both the length and the
|
||||
alphabet to a reasonably small space that can still have enough
|
||||
entropy.
|
||||
|
||||
Also contains typofixes, documentation updates and trivial code
|
||||
clean-ups.
|
@ -1,22 +0,0 @@
|
||||
Git v2.3.8 Release Notes
|
||||
========================
|
||||
|
||||
Fixes since v2.3.7
|
||||
------------------
|
||||
|
||||
* The usual "git diff" when seeing a file turning into a directory
|
||||
showed a patchset to remove the file and create all files in the
|
||||
directory, but "git diff --no-index" simply refused to work. Also,
|
||||
when asked to compare a file and a directory, imitate POSIX "diff"
|
||||
and compare the file with the file with the same name in the
|
||||
directory, instead of refusing to run.
|
||||
|
||||
* The default $HOME/.gitconfig file created upon "git config --global"
|
||||
that edits it had incorrectly spelled user.name and user.email
|
||||
entries in it.
|
||||
|
||||
* "git commit --date=now" or anything that relies on approxidate lost
|
||||
the daylight-saving-time offset.
|
||||
|
||||
Also contains typofixes, documentation updates and trivial code
|
||||
clean-ups.
|
@ -1,514 +0,0 @@
|
||||
Git 2.4 Release Notes
|
||||
=====================
|
||||
|
||||
Backward compatibility warning(s)
|
||||
---------------------------------
|
||||
|
||||
This release has a few changes in the user-visible output from
|
||||
Porcelain commands. These are not meant to be parsed by scripts, but
|
||||
users still may want to be aware of the changes:
|
||||
|
||||
* The output from "git log --decorate" (and, more generally, the "%d"
|
||||
format specifier used in the "--format=<string>" parameter to the
|
||||
"git log" family of commands) has changed. It used to list "HEAD"
|
||||
just like other branches; e.g.,
|
||||
|
||||
$ git log --decorate -1 master
|
||||
commit bdb0f6788fa5e3cacc4315e9ff318a27b2676ff4 (HEAD, master)
|
||||
...
|
||||
|
||||
This release changes the output slightly when HEAD refers to a
|
||||
branch whose name is also shown in the output. The above is now
|
||||
shown as:
|
||||
|
||||
$ git log --decorate -1 master
|
||||
commit bdb0f6788fa5e3cacc4315e9ff318a27b2676ff4 (HEAD -> master)
|
||||
...
|
||||
|
||||
* The phrasing "git branch" uses to describe a detached HEAD has been
|
||||
updated to agree with the phrasing used by "git status":
|
||||
|
||||
- When HEAD is at the same commit as when it was originally
|
||||
detached, they now both show "detached at <commit object name>".
|
||||
|
||||
- When HEAD has moved since it was originally detached, they now
|
||||
both show "detached from <commit object name>".
|
||||
|
||||
Previously, "git branch" always used "from".
|
||||
|
||||
|
||||
Updates since v2.3
|
||||
------------------
|
||||
|
||||
Ports
|
||||
|
||||
* Our default I/O size (8 MiB) for large files was too large for some
|
||||
platforms with smaller SSIZE_MAX, leading to read(2)/write(2)
|
||||
failures.
|
||||
|
||||
* We did not check the curl library version before using the
|
||||
CURLOPT_PROXYAUTH feature, which did not exist in older versions of
|
||||
the library.
|
||||
|
||||
* We now detect number of CPUs on older BSD-derived systems.
|
||||
|
||||
* Portability fixes and workarounds for shell scripts have been added
|
||||
to help BSD-derived systems.
|
||||
|
||||
|
||||
UI, Workflows & Features
|
||||
|
||||
* The command usage info strings given by "git cmd -h" and in
|
||||
documentation have been tweaked for consistency.
|
||||
|
||||
* The "sync" subcommand of "git p4" now allows users to exclude
|
||||
subdirectories like its "clone" subcommand does.
|
||||
|
||||
* "git log --invert-grep --grep=WIP" will show only commits that do
|
||||
not have the string "WIP" in their messages.
|
||||
|
||||
* "git push" has been taught an "--atomic" option that makes a push
|
||||
that updates more than one ref an "all-or-none" affair.
|
||||
|
||||
* Extending the "push to deploy" feature that was added in 2.3, the
|
||||
behaviour of "git push" when updating the branch that is checked
|
||||
out can now be tweaked by a "push-to-checkout" hook.
|
||||
|
||||
* HTTP-based transports now send Accept-Language when making
|
||||
requests. The languages to accept are inferred from environment
|
||||
variables on the client side (LANGUAGE, etc).
|
||||
|
||||
* "git send-email" used to accept a mistaken "y" (or "yes") as an
|
||||
answer to "What encoding do you want to use [UTF-8]?" without
|
||||
questioning. Now it asks for confirmation when the answer looks too
|
||||
short to be a valid encoding name.
|
||||
|
||||
* When "git apply --whitespace=fix" fixed whitespace errors in the
|
||||
common context lines, the command reports that it did so.
|
||||
|
||||
* "git status" now allows the "-v" option to be given twice, in which
|
||||
case it also shows the differences in the working tree that are not
|
||||
staged to be committed.
|
||||
|
||||
* "git cherry-pick" used to clean up the log message even when it is
|
||||
merely replaying an existing commit. It now replays the message
|
||||
verbatim unless you are editing the message of the resulting
|
||||
commit.
|
||||
|
||||
* "git archive" can now be told to set the 'text' attribute in the
|
||||
resulting zip archive.
|
||||
|
||||
* Output from "git log --decorate" now distinguishes between a
|
||||
detached HEAD vs. a HEAD that points at a branch.
|
||||
|
||||
This is a potentially backward-incompatible change; see above for
|
||||
more information.
|
||||
|
||||
* When HEAD was detached when at commit xyz and hasn't been moved
|
||||
since it was detached, "git status" would report "detached at xyz"
|
||||
whereas "git branch" would report "detached from xyz". Now the
|
||||
output of "git branch" agrees with that of "git status".
|
||||
|
||||
This is a potentially backward-incompatible change; see above for
|
||||
more information.
|
||||
|
||||
* "git -C '' subcmd" now works in the current directory (analogously
|
||||
to "cd ''") rather than dying with an error message.
|
||||
(merge 6a536e2 kn/git-cd-to-empty later to maint).
|
||||
|
||||
* The versionsort.prereleaseSuffix configuration variable can be used
|
||||
to specify that, for example, v1.0-pre1 comes before v1.0.
|
||||
|
||||
* A new "push.followTags" configuration turns the "--follow-tags"
|
||||
option on by default for the "git push" command.
|
||||
|
||||
* "git log --graph --no-walk A B..." is a nonsensical combination of
|
||||
options: "--no-walk" requests discrete points in the history, while
|
||||
"--graph" asks to draw connections between these discrete points.
|
||||
Forbid the use of these options together.
|
||||
|
||||
* "git rev-list --bisect --first-parent" does not work (yet) and can
|
||||
even cause SEGV; forbid it. "git log --bisect --first-parent" would
|
||||
not be useful until "git bisect --first-parent" materializes, so
|
||||
also forbid it for now.
|
||||
|
||||
|
||||
Performance, Internal Implementation, Development Support etc.
|
||||
|
||||
* Slightly change the implementation of the N_() macro to help us
|
||||
detect mistakes.
|
||||
|
||||
* Restructure the implementation of "reflog expire" to fit better
|
||||
with the recently updated reference API.
|
||||
|
||||
* The transport-helper did not pass transport options such as
|
||||
verbosity, progress, cloning, etc. to import and export based
|
||||
helpers, like it did for fetch and push based helpers, robbing them
|
||||
of the chance to honor the wish of the end-users better.
|
||||
|
||||
* The tests that wanted to see that a file becomes unreadable after
|
||||
running "chmod a-r file", and the tests that wanted to make sure
|
||||
that they are not run as root, used "can we write into the /
|
||||
directory?" as a cheap substitute. But on some platforms that is
|
||||
not a good heuristic. The tests and their prerequisites have been
|
||||
updated to check what they really require.
|
||||
(merge f400e51 jk/sanity later to maint).
|
||||
|
||||
* Various issues around "reflog expire", e.g. using --updateref when
|
||||
expiring a reflog for a symbolic reference, have been corrected
|
||||
and/or made saner.
|
||||
|
||||
* The documentation for the strbuf API had been split between the API
|
||||
documentation and the header file. Consolidate the documentation in
|
||||
strbuf.h.
|
||||
|
||||
* The error handling functions and conventions are now documented in
|
||||
the API manual (in api-error-handling.txt).
|
||||
|
||||
* Optimize gitattribute look-up, mostly useful in "git grep" on a
|
||||
project that does not use many attributes, by avoiding it when we
|
||||
(should) know that the attributes are not defined in the first
|
||||
place.
|
||||
|
||||
* Typofix in comments.
|
||||
(merge ef2956a ak/git-pm-typofix later to maint).
|
||||
|
||||
* Code clean-up.
|
||||
(merge 0b868f0 sb/hex-object-name-is-at-most-41-bytes-long later to maint).
|
||||
(merge 5d30851 dp/remove-duplicated-header-inclusion later to maint).
|
||||
|
||||
* Simplify the ref transaction API for verifying that "the ref should
|
||||
be pointing at this object".
|
||||
|
||||
* Simplify the code in "git daemon" that parses out and holds
|
||||
hostnames used in request interpolation.
|
||||
|
||||
* Restructure the "git push" codepath to make it easier to add new
|
||||
configuration bits.
|
||||
|
||||
* The run-command interface made it easy to make a pipe for us to
|
||||
read from a process, wait for the process to finish, and then
|
||||
attempt to read its output. But this pattern can lead to deadlock.
|
||||
So introduce a helper to do this correctly (i.e., first read, and
|
||||
then wait the process to finish) and also add code to prevent such
|
||||
abuse in the run-command helper.
|
||||
|
||||
* People often forget to chain the commands in their test together
|
||||
with &&, letting a failure from an earlier command in the test go
|
||||
unnoticed. The new GIT_TEST_CHAIN_LINT mechanism allows you to
|
||||
catch such a mistake more easily.
|
||||
|
||||
|
||||
Also contains various documentation updates and code clean-ups.
|
||||
|
||||
|
||||
Fixes since v2.3
|
||||
----------------
|
||||
|
||||
Unless otherwise noted, all the fixes since v2.3 in the maintenance
|
||||
track are contained in this release (see the maintenance releases'
|
||||
notes for details).
|
||||
|
||||
* "git blame HEAD -- missing" failed to correctly say "HEAD" when it
|
||||
tried to say "No such path 'missing' in HEAD".
|
||||
(merge a46442f jk/blame-commit-label later to maint).
|
||||
|
||||
* "git rerere" (invoked internally from many mergy operations) did
|
||||
not correctly signal errors when it attempted to update the working
|
||||
tree files but failed for whatever reason.
|
||||
(merge 89ea903 jn/rerere-fail-on-auto-update-failure later to maint).
|
||||
|
||||
* Setting diff.submodule to 'log' made "git format-patch" produce
|
||||
broken patches.
|
||||
(merge 339de50 dk/format-patch-ignore-diff-submodule later to maint).
|
||||
|
||||
* After attempting and failing a password-less authentication (e.g.,
|
||||
Kerberos), libcURL refuses to fall back to password-based Basic
|
||||
authentication without a bit of help/encouragement.
|
||||
(merge 4dbe664 bc/http-fallback-to-password-after-krb-fails later to maint).
|
||||
|
||||
* The "git push" documentation for the "--repo=<there>" option was
|
||||
easily misunderstood.
|
||||
(merge 57b92a7 mg/push-repo-option-doc later to maint).
|
||||
|
||||
* Code to read a branch name from various files in the .git/
|
||||
directory would have overrun array limits if asked to read an empty
|
||||
file.
|
||||
(merge 66ec904 jk/status-read-branch-name-fix later to maint).
|
||||
|
||||
* Remove a superfluous conditional that is always true.
|
||||
(merge 94ee8e2 jk/remote-curl-an-array-in-struct-cannot-be-null later to maint).
|
||||
|
||||
* The "git diff --raw" documentation incorrectly implied that C(opy)
|
||||
and R(ename) are the only statuses that can be followed by a score
|
||||
number.
|
||||
(merge ac1c2d9 jc/diff-format-doc later to maint).
|
||||
|
||||
* A broken pack .idx file in the receiving repository prevented the
|
||||
dumb http transport from fetching a good copy of it from the other
|
||||
side.
|
||||
(merge 8b9c2dd jk/dumb-http-idx-fetch-fix later to maint).
|
||||
|
||||
* The error message from "git commit", when a non-existing author
|
||||
name was given as value to the "--author=" parameter, has been
|
||||
reworded to avoid misunderstanding.
|
||||
(merge 1044b1f mg/commit-author-no-match-malformed-message later to maint).
|
||||
|
||||
* "git log --help" used to show rev-list options that are irrelevant
|
||||
to the "log" command.
|
||||
(merge 3cab02d jc/doc-log-rev-list-options later to maint).
|
||||
|
||||
* "git apply --whitespace=fix" used to under-allocate memory when the
|
||||
fix resulted in a longer text than the original patch.
|
||||
(merge 407a792 jc/apply-ws-fix-expands later to maint).
|
||||
|
||||
* The interactive "show a list and let the user choose from it"
|
||||
interface used by "git add -i" unnecessarily prompted the user even
|
||||
when the candidate list was empty, against which the only "choice"
|
||||
the user could have made was to choose nothing.
|
||||
(merge a9c4641 ak/add-i-empty-candidates later to maint).
|
||||
|
||||
* The todo list created by "git rebase -i" did not fully honor
|
||||
core.abbrev settings.
|
||||
(merge edb72d5 ks/rebase-i-abbrev later to maint).
|
||||
|
||||
* "git fetch" over a remote-helper that cannot respond to the "list"
|
||||
command could not fetch from a symbolic reference (e.g., HEAD).
|
||||
(merge 33cae54 mh/deref-symref-over-helper-transport later to maint).
|
||||
|
||||
* "git push --signed" gave an incorrectly worded error message when
|
||||
the other side did not support the capability.
|
||||
|
||||
* The "git push --signed" protocol extension did not limit what the
|
||||
"nonce" (a server-chosen string) could contain nor how long it
|
||||
could be, which was unnecessarily lax. Limit both the length and
|
||||
the alphabet to a reasonably small space that can still have enough
|
||||
entropy.
|
||||
(merge afcb6ee jc/push-cert later to maint).
|
||||
|
||||
* The completion script (in contrib/) clobbered the shell variable $x
|
||||
in the global shell namespace.
|
||||
(merge 852ff1c ma/bash-completion-leaking-x later to maint).
|
||||
|
||||
* We incorrectly formatted a "uintmax_t" integer that doesn't fit in
|
||||
"int".
|
||||
(merge d306f3d jk/decimal-width-for-uintmax later to maint).
|
||||
|
||||
* The configuration parser used to be confused when reading
|
||||
configuration from a blob object that ends with a lone CR.
|
||||
(merge 1d0655c jk/config-no-ungetc-eof later to maint).
|
||||
|
||||
* The pack bitmap support did not build with older versions of GCC.
|
||||
(merge bd4e882 jk/pack-bitmap later to maint).
|
||||
|
||||
* The documentation wasn't clear that "remote.<nick>.pushURL" and
|
||||
"remote.<nick>.URL" are there to name the same repository accessed
|
||||
via different transports, not two separate repositories.
|
||||
(merge 697f652 jc/remote-set-url-doc later to maint).
|
||||
|
||||
* Older GnuPG implementations may not correctly import the keyring
|
||||
material we prepare for the tests to use.
|
||||
(merge 1f985d6 ch/new-gpg-drops-rfc-1991 later to maint).
|
||||
|
||||
* The credential helper for Windows (in contrib/) used to mishandle
|
||||
user names that contain an at-sign.
|
||||
(merge 13d261e av/wincred-with-at-in-username-fix later to maint).
|
||||
|
||||
* "diff-highlight" (in contrib/) used to show byte-by-byte
|
||||
differences, which could cause multi-byte characters to be chopped
|
||||
in the middle. It learned to pay attention to character boundaries
|
||||
(assuming UTF-8).
|
||||
(merge 8d00662 jk/colors later to maint).
|
||||
|
||||
* Document longstanding configuration variable naming rules in
|
||||
CodingGuidelines.
|
||||
(merge 35840a3 jc/conf-var-doc later to maint).
|
||||
|
||||
* An earlier workaround to squelch unhelpful deprecation warnings
|
||||
from the compiler on OS X unnecessarily set a minimum required
|
||||
version of the OS, which the user might want to raise (or lower)
|
||||
for other reasons.
|
||||
(merge 88c03eb es/squelch-openssl-warnings-on-macosx later to maint).
|
||||
|
||||
* Certain older vintages of cURL give irregular output from
|
||||
"curl-config --vernum", which confused our build system.
|
||||
(merge 3af6792 tc/curl-vernum-output-broken-in-7.11 later to maint).
|
||||
|
||||
* In v2.2.0, we broke "git prune" that runs in a repository that
|
||||
borrows from an alternate object store.
|
||||
(merge b0a4264 jk/prune-mtime later to maint).
|
||||
|
||||
* "git submodule add" failed to squash "path/to/././submodule" to
|
||||
"path/to/submodule".
|
||||
(merge 8196e72 ps/submodule-sanitize-path-upon-add later to maint).
|
||||
|
||||
* "git merge-file" did not work correctly when invoked in a
|
||||
subdirectory.
|
||||
(merge 204a8ff ab/merge-file-prefix later to maint).
|
||||
|
||||
* "git blame" could die trying to free an uninitialized piece of
|
||||
memory.
|
||||
(merge e600592 es/blame-commit-info-fix later to maint).
|
||||
|
||||
* "git fast-import" used to crash when it could not close and
|
||||
finalize the resulting packfile cleanly.
|
||||
(merge 5e915f3 jk/fast-import-die-nicely-fix later to maint).
|
||||
|
||||
* "update-index --refresh" used to leak memory when an entry could
|
||||
not be refreshed for whatever reason.
|
||||
(merge bc1c2ca sb/plug-leak-in-make-cache-entry later to maint).
|
||||
|
||||
* The "interpolated-path" option of "git daemon" inserted any string
|
||||
the client declared on the "host=" capability request without
|
||||
checking. Sanitize and limit %H and %CH to a saner and a valid DNS
|
||||
name.
|
||||
(merge b485373 jk/daemon-interpolate later to maint).
|
||||
|
||||
* "git daemon" unnecessarily looked up the hostname even when "%CH"
|
||||
and "%IP" interpolations were not requested.
|
||||
(merge dc8edc8 rs/daemon-interpolate later to maint).
|
||||
|
||||
* We relied on "--no-" prefix handling in Perl's Getopt::Long
|
||||
package, even though that support didn't exist in Perl 5.8 (which
|
||||
we still support). Manually add support to help people with older
|
||||
Getopt::Long packages.
|
||||
(merge f471494 km/send-email-getopt-long-workarounds later to maint).
|
||||
|
||||
* "git apply" was not very careful about reading from, removing,
|
||||
updating and creating paths outside the working tree (under
|
||||
--index/--cached) or the current directory (when used as a
|
||||
replacement for GNU patch).
|
||||
(merge e0d201b jc/apply-beyond-symlink later to maint).
|
||||
|
||||
* Correct a breakage in git-svn, introduced around the v2.2 era, that
|
||||
can cause FileHandles to be closed prematurely.
|
||||
(merge e426311 ew/svn-maint-fixes later to maint).
|
||||
|
||||
* We did not parse usernames followed by literal IPv6 addresses
|
||||
correctly in SSH transport URLs; e.g.,
|
||||
ssh://user@[2001:db8::1]:22/repo.git.
|
||||
(merge 6b6c5f7 tb/connect-ipv6-parse-fix later to maint).
|
||||
|
||||
* The configuration variable 'mailinfo.scissors' was hard to
|
||||
discover in the documentation.
|
||||
(merge afb5de7 mm/am-c-doc later to maint).
|
||||
|
||||
* The interaction between "git submodule update" and the
|
||||
submodule.*.update configuration was not clearly documented.
|
||||
(merge 5c31acf ms/submodule-update-config-doc later to maint).
|
||||
|
||||
* "git diff --shortstat" used together with "--dirstat=changes" or
|
||||
"--dirstat=files" incorrectly output dirstat information twice.
|
||||
(merge ab27389 mk/diff-shortstat-dirstat-fix later to maint).
|
||||
|
||||
* The manpage for "git remote add" mentioned "--tags" and "--no-tags"
|
||||
but did not explain what happens if neither option is provided.
|
||||
(merge aaba0ab mg/doc-remote-tags-or-not later to maint).
|
||||
|
||||
* The description of "--exclude-standard option" in the output of
|
||||
"git grep -h" was phrased poorly.
|
||||
(merge 77fdb8a nd/grep-exclude-standard-help-fix later to maint).
|
||||
|
||||
* "git rebase -i" recently started to include the number of commits
|
||||
in the todo list, but that output included extraneous whitespace on
|
||||
a platform that prepends leading whitespaces to its "wc -l" output.
|
||||
(merge 2185d3b es/rebase-i-count-todo later to maint).
|
||||
|
||||
* The borrowed code in the kwset API did not follow our usual
|
||||
convention to use "unsigned char" to store values that range from
|
||||
0-255.
|
||||
(merge 189c860 bw/kwset-use-unsigned later to maint).
|
||||
|
||||
* A corrupt input to "git diff -M" used to cause it to segfault.
|
||||
(merge 4d6be03 jk/diffcore-rename-duplicate later to maint).
|
||||
|
||||
* Certain builds of GPG triggered false breakages in a test.
|
||||
(merge 3f88c1b mg/verify-commit later to maint).
|
||||
|
||||
* "git imap-send" learned to optionally talk with an IMAP server via
|
||||
libcURL. Because there is no other option when Git is built with
|
||||
the NO_OPENSSL option, use libcURL by default in that case.
|
||||
(merge dcd01ea km/imap-send-libcurl-options later to maint).
|
||||
|
||||
* "git log --decorate" did not reset colors correctly around the
|
||||
branch names.
|
||||
(merge 5ee8758 jc/decorate-leaky-separator-color later to maint).
|
||||
|
||||
* The code that reads from the ctags file in the completion script
|
||||
(in contrib/) did not spell ${param/pattern/string} substitution
|
||||
correctly, which happened to work with bash but not with zsh.
|
||||
(merge db8d750 js/completion-ctags-pattern-substitution-fix later to maint).
|
||||
|
||||
* The transfer.hiderefs support did not quite work for smart-http
|
||||
transport.
|
||||
(merge 8ddf3ca jk/smart-http-hide-refs later to maint).
|
||||
|
||||
* In the "git tag -h" output, move the documentation for the
|
||||
"--column" and "--sort" options to the "Tag listing options"
|
||||
section.
|
||||
(merge dd059c6 jk/tag-h-column-is-a-listing-option later to maint).
|
||||
|
||||
* "git prune" used to largely ignore broken refs when deciding which
|
||||
objects are still being used, which could cause reference
|
||||
corruption to lead to object loss.
|
||||
(merge ea56c4e jk/prune-with-corrupt-refs later to maint).
|
||||
|
||||
* The split-index mode introduced in v2.3.0-rc0~41 was broken in the
|
||||
codepath to protect us against a broken reimplementation of Git
|
||||
that writes an invalid index with duplicated index entries, etc.
|
||||
(merge 03f15a7 tg/fix-check-order-with-split-index later to maint).
|
||||
|
||||
* "git fetch", when fetching a commit using the
|
||||
allow-tip-sha1-in-want extension, could have failed to fetch all of
|
||||
the requested refs.
|
||||
(merge 32d0462 jk/fetch-pack later to maint).
|
||||
|
||||
* An failure early in the "git clone" that started creating the
|
||||
working tree and repository could have resulted in the failure to
|
||||
clean up some directories and files.
|
||||
(merge 16eff6c jk/cleanup-failed-clone later to maint).
|
||||
|
||||
* Recommend format-patch and send-email for those who want to submit
|
||||
patches to this project.
|
||||
(merge b25c469 jc/submitting-patches-mention-send-email later to maint).
|
||||
|
||||
* Do not spawn the pager when "git grep" is run with "--quiet".
|
||||
(merge c2048f0 ws/grep-quiet-no-pager later to maint).
|
||||
|
||||
* The prompt script (in contrib/) did not show the untracked sign
|
||||
when working in a subdirectory without any untracked files.
|
||||
(merge 9bdc517 ct/prompt-untracked-fix later to maint).
|
||||
|
||||
* An earlier update to the URL parser broke an address that contains
|
||||
a colon but an empty string for the port number, like
|
||||
ssh://example.com:/path/to/repo.
|
||||
(merge 6b6c5f7 tb/connect-ipv6-parse-fix later to maint).
|
||||
|
||||
* Code cleanups and documentation updates.
|
||||
(merge 2ce63e9 rs/simple-cleanups later to maint).
|
||||
(merge 33baa69 rj/no-xopen-source-for-cygwin later to maint).
|
||||
(merge 817d03e jc/diff-test-updates later to maint).
|
||||
(merge eb32c66 ak/t5516-typofix later to maint).
|
||||
(merge bcd57cb mr/doc-clean-f-f later to maint).
|
||||
(merge 0d6accc mg/doc-status-color-slot later to maint).
|
||||
(merge 53e53c7 sg/completion-remote later to maint).
|
||||
(merge 8fa7975 ak/git-done-help-cleanup later to maint).
|
||||
(merge 9a6f128 rs/deflate-init-cleanup later to maint).
|
||||
(merge 6f75d45 rs/use-isxdigit later to maint).
|
||||
(merge 376e4b3 jk/test-annoyances later to maint).
|
||||
(merge 7032054 nd/doc-git-index-version later to maint).
|
||||
(merge e869c5e tg/test-index-v4 later to maint).
|
||||
(merge 599d223 jk/simplify-csum-file-sha1fd-check later to maint).
|
||||
(merge 260d585 sg/completion-gitcomp-nl-for-refs later to maint).
|
||||
(merge 777c55a jc/report-path-error-to-dir later to maint).
|
||||
(merge fddfaf8 ph/push-doc-cas later to maint).
|
||||
(merge d50d31e ss/pull-rebase-preserve later to maint).
|
||||
(merge c8c3f1d pt/enter-repo-comment-fix later to maint).
|
||||
(merge d7bfb9e jz/gitweb-conf-doc-fix later to maint).
|
||||
(merge f907282 jk/cherry-pick-docfix later to maint).
|
||||
(merge d3c0811 iu/fix-parse-options-h-comment later to maint).
|
||||
(merge 6c3b2af jg/cguide-we-cannot-count later to maint).
|
||||
(merge 2b8bd44 jk/pack-corruption-post-mortem later to maint).
|
||||
(merge 9585cb8 jn/doc-fast-import-no-16-octopus-limit later to maint).
|
||||
(merge 5dcd1b1 ps/grep-help-all-callback-arg later to maint).
|
||||
(merge f1f4c84 va/fix-git-p4-tests later to maint).
|
@ -1,40 +0,0 @@
|
||||
Git v2.4.1 Release Notes
|
||||
========================
|
||||
|
||||
Fixes since v2.4
|
||||
----------------
|
||||
|
||||
* The usual "git diff" when seeing a file turning into a directory
|
||||
showed a patchset to remove the file and create all files in the
|
||||
directory, but "git diff --no-index" simply refused to work. Also,
|
||||
when asked to compare a file and a directory, imitate POSIX "diff"
|
||||
and compare the file with the file with the same name in the
|
||||
directory, instead of refusing to run.
|
||||
|
||||
* The default $HOME/.gitconfig file created upon "git config --global"
|
||||
that edits it had incorrectly spelled user.name and user.email
|
||||
entries in it.
|
||||
|
||||
* "git commit --date=now" or anything that relies on approxidate lost
|
||||
the daylight-saving-time offset.
|
||||
|
||||
* "git cat-file bl $blob" failed to barf even though there is no
|
||||
object type that is "bl".
|
||||
|
||||
* Teach the codepaths that read .gitignore and .gitattributes files
|
||||
that these files encoded in UTF-8 may have UTF-8 BOM marker at the
|
||||
beginning; this makes it in line with what we do for configuration
|
||||
files already.
|
||||
|
||||
* Access to objects in repositories that borrow from another one on a
|
||||
slow NFS server unnecessarily got more expensive due to recent code
|
||||
becoming more cautious in a naive way not to lose objects to pruning.
|
||||
|
||||
* We avoid setting core.worktree when the repository location is the
|
||||
".git" directory directly at the top level of the working tree, but
|
||||
the code misdetected the case in which the working tree is at the
|
||||
root level of the filesystem (which arguably is a silly thing to
|
||||
do, but still valid).
|
||||
|
||||
Also contains typofixes, documentation updates and trivial code
|
||||
clean-ups.
|
@ -57,8 +57,7 @@ change, the approach taken by the change, and if relevant how this
|
||||
differs substantially from the prior version, are all good things
|
||||
to have.
|
||||
|
||||
Make sure that you have tests for the bug you are fixing. See
|
||||
t/README for guidance.
|
||||
Make sure that you have tests for the bug you are fixing.
|
||||
|
||||
When adding a new feature, make sure that you have new tests to show
|
||||
the feature triggers the new behaviour when it should, and to show the
|
||||
@ -136,11 +135,6 @@ that is fine, but please mark it as such.
|
||||
|
||||
(4) Sending your patches.
|
||||
|
||||
Learn to use format-patch and send-email if possible. These commands
|
||||
are optimized for the workflow of sending patches, avoiding many ways
|
||||
your existing e-mail client that is optimized for "multipart/*" mime
|
||||
type e-mails to corrupt and render your patches unusable.
|
||||
|
||||
People on the Git mailing list need to be able to read and
|
||||
comment on the changes you are submitting. It is important for
|
||||
a developer to be able to "quote" your changes, using standard
|
||||
@ -181,11 +175,8 @@ message starts, you can put a "From: " line to name that person.
|
||||
|
||||
You often want to add additional explanation about the patch,
|
||||
other than the commit message itself. Place such "cover letter"
|
||||
material between the three-dash line and the diffstat. For
|
||||
patches requiring multiple iterations of review and discussion,
|
||||
an explanation of changes between each iteration can be kept in
|
||||
Git-notes and inserted automatically following the three-dash
|
||||
line via `git format-patch --notes`.
|
||||
material between the three dash lines and the diffstat. Git-notes
|
||||
can also be inserted using the `--notes` option.
|
||||
|
||||
Do not attach the patch as a MIME attachment, compressed or not.
|
||||
Do not let your e-mail client send quoted-printable. Do not let
|
||||
@ -263,15 +254,15 @@ pretty simple: if you can certify the below:
|
||||
person who certified (a), (b) or (c) and I have not modified
|
||||
it.
|
||||
|
||||
(d) I understand and agree that this project and the contribution
|
||||
are public and that a record of the contribution (including all
|
||||
personal information I submit with it, including my sign-off) is
|
||||
maintained indefinitely and may be redistributed consistent with
|
||||
this project or the open source license(s) involved.
|
||||
(d) I understand and agree that this project and the contribution
|
||||
are public and that a record of the contribution (including all
|
||||
personal information I submit with it, including my sign-off) is
|
||||
maintained indefinitely and may be redistributed consistent with
|
||||
this project or the open source license(s) involved.
|
||||
|
||||
then you just add a line saying
|
||||
|
||||
Signed-off-by: Random J Developer <random@developer.example.org>
|
||||
Signed-off-by: Random J Developer <random@developer.example.org>
|
||||
|
||||
This line can be automatically added by Git if you run the git-commit
|
||||
command with the -s option.
|
||||
|
@ -4,13 +4,13 @@
|
||||
|
||||
--root::
|
||||
Do not treat root commits as boundaries. This can also be
|
||||
controlled via the `blame.showRoot` config option.
|
||||
controlled via the `blame.showroot` config option.
|
||||
|
||||
--show-stats::
|
||||
Include additional statistics at the end of blame output.
|
||||
|
||||
-L <start>,<end>::
|
||||
-L :<funcname>::
|
||||
-L :<regex>::
|
||||
Annotate only the given line range. May be specified multiple times.
|
||||
Overlapping ranges are allowed.
|
||||
+
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
diff.autoRefreshIndex::
|
||||
diff.autorefreshindex::
|
||||
When using 'git diff' to compare with work tree
|
||||
files, do not consider stat-only change as changed.
|
||||
Instead, silently run `git update-index --refresh` to
|
||||
@ -75,11 +75,11 @@ diff.ignoreSubmodules::
|
||||
commands such as 'git diff-files'. 'git checkout' also honors
|
||||
this setting when reporting uncommitted changes. Setting it to
|
||||
'all' disables the submodule summary normally shown by 'git commit'
|
||||
and 'git status' when 'status.submoduleSummary' is set unless it is
|
||||
and 'git status' when 'status.submodulesummary' is set unless it is
|
||||
overridden by using the --ignore-submodules command-line option.
|
||||
The 'git submodule' commands are not affected by this setting.
|
||||
|
||||
diff.mnemonicPrefix::
|
||||
diff.mnemonicprefix::
|
||||
If set, 'git diff' uses a prefix pair that is different from the
|
||||
standard "a/" and "b/" depending on what is being compared. When
|
||||
this configuration is in effect, reverse diff output also swaps
|
||||
@ -98,7 +98,7 @@ diff.mnemonicPrefix::
|
||||
diff.noprefix::
|
||||
If set, 'git diff' does not show any source or destination prefix.
|
||||
|
||||
diff.orderFile::
|
||||
diff.orderfile::
|
||||
File indicating how to order files within a diff, using
|
||||
one shell glob pattern per line.
|
||||
Can be overridden by the '-O' option to linkgit:git-diff[1].
|
||||
@ -148,7 +148,7 @@ diff.<driver>.textconv::
|
||||
conversion is used to generate a human-readable diff. See
|
||||
linkgit:gitattributes[5] for details.
|
||||
|
||||
diff.<driver>.wordRegex::
|
||||
diff.<driver>.wordregex::
|
||||
The regular expression that the diff driver should use to
|
||||
split words in a line. See linkgit:gitattributes[5] for
|
||||
details.
|
||||
|
@ -66,8 +66,7 @@ be committed)
|
||||
|
||||
Status letters C and R are always followed by a score (denoting the
|
||||
percentage of similarity between the source and target of the move or
|
||||
copy). Status letter M may be followed by a score (denoting the
|
||||
percentage of dissimilarity) for file rewrites.
|
||||
copy), and are the only ones to be so.
|
||||
|
||||
<sha1> is shown as all 0's if a file is new on the filesystem
|
||||
and it is out of sync with the index.
|
||||
|
@ -432,8 +432,8 @@ endif::git-format-patch[]
|
||||
-O<orderfile>::
|
||||
Output the patch in the order specified in the
|
||||
<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`,
|
||||
This overrides the `diff.orderfile` configuration variable
|
||||
(see linkgit:git-config[1]). To cancel `diff.orderfile`,
|
||||
use `-O/dev/null`.
|
||||
|
||||
ifndef::git-format-patch[]
|
||||
|
@ -68,7 +68,7 @@ endif::git-pull[]
|
||||
By default, tags that point at objects that are downloaded
|
||||
from the remote repository are fetched and stored locally.
|
||||
This option disables this automatic tag following. The default
|
||||
behavior for a remote may be specified with the remote.<name>.tagOpt
|
||||
behavior for a remote may be specified with the remote.<name>.tagopt
|
||||
setting. See linkgit:git-config[1].
|
||||
|
||||
ifndef::git-pull[]
|
||||
|
@ -8,7 +8,7 @@ git-add - Add file contents to the index
|
||||
SYNOPSIS
|
||||
--------
|
||||
[verse]
|
||||
'git add' [--verbose | -v] [--dry-run | -n] [--force | -f] [--interactive | -i] [--patch | -p]
|
||||
'git add' [-n] [-v] [--force | -f] [--interactive | -i] [--patch | -p]
|
||||
[--edit | -e] [--[no-]all | --[no-]ignore-removal | [--update | -u]]
|
||||
[--intent-to-add | -N] [--refresh] [--ignore-errors] [--ignore-missing]
|
||||
[--] [<pathspec>...]
|
||||
@ -173,7 +173,7 @@ for "git add --no-all <pathspec>...", i.e. ignored removed files.
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
The optional configuration variable `core.excludesFile` indicates a path to a
|
||||
The optional configuration variable `core.excludesfile` indicates a path to a
|
||||
file containing patterns of file names to exclude from git-add, similar to
|
||||
$GIT_DIR/info/exclude. Patterns in the exclude file are used in addition to
|
||||
those in info/exclude. See linkgit:gitignore[5].
|
||||
@ -317,7 +317,7 @@ After deciding the fate for all hunks, if there is any hunk
|
||||
that was chosen, the index is updated with the selected hunks.
|
||||
+
|
||||
You can omit having to type return here, by setting the configuration
|
||||
variable `interactive.singleKey` to `true`.
|
||||
variable `interactive.singlekey` to `true`.
|
||||
|
||||
diff::
|
||||
|
||||
|
@ -52,23 +52,11 @@ OPTIONS
|
||||
-c::
|
||||
--scissors::
|
||||
Remove everything in body before a scissors line (see
|
||||
linkgit:git-mailinfo[1]). Can be activated by default using
|
||||
the `mailinfo.scissors` configuration variable.
|
||||
linkgit:git-mailinfo[1]).
|
||||
|
||||
--no-scissors::
|
||||
Ignore scissors lines (see linkgit:git-mailinfo[1]).
|
||||
|
||||
-m::
|
||||
--message-id::
|
||||
Pass the `-m` flag to 'git mailinfo' (see linkgit:git-mailinfo[1]),
|
||||
so that the Message-ID header is added to the commit message.
|
||||
The `am.messageid` configuration variable can be used to specify
|
||||
the default behaviour.
|
||||
|
||||
--no-message-id::
|
||||
Do not add the Message-ID header to the commit message.
|
||||
`no-message-id` is useful to override `am.messageid`.
|
||||
|
||||
-q::
|
||||
--quiet::
|
||||
Be quiet. Only print error messages.
|
||||
|
@ -16,7 +16,7 @@ SYNOPSIS
|
||||
[--ignore-space-change | --ignore-whitespace ]
|
||||
[--whitespace=(nowarn|warn|fix|error|error-all)]
|
||||
[--exclude=<path>] [--include=<path>] [--directory=<root>]
|
||||
[--verbose] [--unsafe-paths] [<patch>...]
|
||||
[--verbose] [<patch>...]
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
@ -229,20 +229,10 @@ For example, a patch that talks about updating `a/git-gui.sh` to `b/git-gui.sh`
|
||||
can be applied to the file in the working tree `modules/git-gui/git-gui.sh` by
|
||||
running `git apply --directory=modules/git-gui`.
|
||||
|
||||
--unsafe-paths::
|
||||
By default, a patch that affects outside the working area
|
||||
(either a Git controlled working tree, or the current working
|
||||
directory when "git apply" is used as a replacement of GNU
|
||||
patch) is rejected as a mistake (or a mischief).
|
||||
+
|
||||
When `git apply` is used as a "better GNU patch", the user can pass
|
||||
the `--unsafe-paths` option to override this safety check. This option
|
||||
has no effect when `--index` or `--cached` is in use.
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
apply.ignoreWhitespace::
|
||||
apply.ignorewhitespace::
|
||||
Set to 'change' if you want changes in whitespace to be ignored by default.
|
||||
Set to one of: no, none, never, false if you want changes in
|
||||
whitespace to be significant.
|
||||
|
@ -51,7 +51,7 @@ When a local branch is started off a remote-tracking branch, Git sets up the
|
||||
branch (specifically the `branch.<name>.remote` and `branch.<name>.merge`
|
||||
configuration entries) so that 'git pull' will appropriately merge from
|
||||
the remote-tracking branch. This behavior may be changed via the global
|
||||
`branch.autoSetupMerge` configuration flag. That setting can be
|
||||
`branch.autosetupmerge` configuration flag. That setting can be
|
||||
overridden by using the `--track` and `--no-track` options, and
|
||||
changed later using `git branch --set-upstream-to`.
|
||||
|
||||
@ -166,14 +166,14 @@ This option is only applicable in non-verbose mode.
|
||||
upstream when the new branch is checked out.
|
||||
+
|
||||
This behavior is the default when the start point is a remote-tracking branch.
|
||||
Set the branch.autoSetupMerge configuration variable to `false` if you
|
||||
Set the branch.autosetupmerge configuration variable to `false` if you
|
||||
want `git checkout` and `git branch` to always behave as if '--no-track'
|
||||
were given. Set it to `always` if you want this behavior when the
|
||||
start-point is either a local or remote-tracking branch.
|
||||
|
||||
--no-track::
|
||||
Do not set up "upstream" configuration, even if the
|
||||
branch.autoSetupMerge configuration variable is true.
|
||||
branch.autosetupmerge configuration variable is true.
|
||||
|
||||
--set-upstream::
|
||||
If specified branch does not exist yet or if `--force` has been
|
||||
|
@ -21,9 +21,6 @@ the exclude mechanism) that decides if the pathname is excluded or
|
||||
included. Later patterns within a file take precedence over earlier
|
||||
ones.
|
||||
|
||||
By default, tracked files are not shown at all since they are not
|
||||
subject to exclude rules; but see `--no-index'.
|
||||
|
||||
OPTIONS
|
||||
-------
|
||||
-q, --quiet::
|
||||
@ -72,7 +69,7 @@ matching pattern, <source> is the pattern's source file, and <linenum>
|
||||
is the line number of the pattern within that source. If the pattern
|
||||
contained a `!` prefix or `/` suffix, it will be preserved in the
|
||||
output. <source> will be an absolute path when referring to the file
|
||||
configured by `core.excludesFile`, or relative to the repository root
|
||||
configured by `core.excludesfile`, or relative to the repository root
|
||||
when referring to `.git/info/exclude` or a per-directory exclude file.
|
||||
|
||||
If `-z` is specified, the pathnames in the output are delimited by the
|
||||
|
@ -144,7 +144,7 @@ explicitly give a name with '-b' in such a case.
|
||||
|
||||
--no-track::
|
||||
Do not set up "upstream" configuration, even if the
|
||||
branch.autoSetupMerge configuration variable is true.
|
||||
branch.autosetupmerge configuration variable is true.
|
||||
|
||||
-l::
|
||||
Create the new branch's reflog; see linkgit:git-branch[1] for
|
||||
@ -210,7 +210,7 @@ the conflicted merge in the specified paths.
|
||||
--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.conflictstyle configuration variable. Possible values are
|
||||
"merge" (default) and "diff3" (in addition to what is shown by
|
||||
"merge" style, shows the original contents).
|
||||
|
||||
|
@ -131,8 +131,7 @@ effect to your index in a row.
|
||||
--keep-redundant-commits::
|
||||
If a commit being cherry picked duplicates a commit already in the
|
||||
current history, it will become empty. By default these
|
||||
redundant commits cause `cherry-pick` to stop so the user can
|
||||
examine the commit. This option overrides that behavior and
|
||||
redundant commits are ignored. This option overrides that behavior and
|
||||
creates an empty commit object. Implies `--allow-empty`.
|
||||
|
||||
--strategy=<strategy>::
|
||||
|
@ -34,12 +34,8 @@ OPTIONS
|
||||
-f::
|
||||
--force::
|
||||
If the Git configuration variable clean.requireForce is not set
|
||||
to false, 'git clean' will refuse to delete files or directories
|
||||
unless given -f, -n or -i. Git will refuse to delete directories
|
||||
with .git sub directory or file unless a second -f
|
||||
is given. This affects also git submodules where the storage area
|
||||
of the removed submodule under .git/modules/ is not removed until
|
||||
-f is given twice.
|
||||
to false, 'git clean' will refuse to run unless given -f, -n or
|
||||
-i.
|
||||
|
||||
-i::
|
||||
--interactive::
|
||||
|
@ -12,7 +12,7 @@ SYNOPSIS
|
||||
'git clone' [--template=<template_directory>]
|
||||
[-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror]
|
||||
[-o <name>] [-b <name>] [-u <upload-pack>] [--reference <repository>]
|
||||
[--dissociate] [--separate-git-dir <git dir>]
|
||||
[--separate-git-dir <git dir>]
|
||||
[--depth <depth>] [--[no-]single-branch]
|
||||
[--recursive | --recurse-submodules] [--] <repository>
|
||||
[<directory>]
|
||||
@ -98,14 +98,7 @@ objects from the source repository into a pack in the cloned repository.
|
||||
require fewer objects to be copied from the repository
|
||||
being cloned, reducing network and local storage costs.
|
||||
+
|
||||
*NOTE*: see the NOTE for the `--shared` option, and also the
|
||||
`--dissociate` option.
|
||||
|
||||
--dissociate::
|
||||
Borrow the objects from reference repositories specified
|
||||
with the `--reference` options only to reduce network
|
||||
transfer and stop borrowing from them after a clone is made
|
||||
by making necessary local copies of borrowed objects.
|
||||
*NOTE*: see the NOTE for the `--shared` option.
|
||||
|
||||
--quiet::
|
||||
-q::
|
||||
|
@ -59,7 +59,7 @@ OPTIONS
|
||||
GPG-sign commit.
|
||||
|
||||
--no-gpg-sign::
|
||||
Countermand `commit.gpgSign` configuration variable that is
|
||||
Countermand `commit.gpgsign` configuration variable that is
|
||||
set to force each and every commit to be signed.
|
||||
|
||||
|
||||
|
@ -284,10 +284,6 @@ configuration variable documented in linkgit:git-config[1].
|
||||
would be committed at the bottom of the commit message
|
||||
template. Note that this diff output doesn't have its
|
||||
lines prefixed with '#'.
|
||||
+
|
||||
If specified twice, show in addition the unified diff between
|
||||
what would be committed and the worktree files, i.e. the unstaged
|
||||
changes to tracked files.
|
||||
|
||||
-q::
|
||||
--quiet::
|
||||
@ -314,7 +310,7 @@ changes to tracked files.
|
||||
GPG-sign commit.
|
||||
|
||||
--no-gpg-sign::
|
||||
Countermand `commit.gpgSign` configuration variable that is
|
||||
Countermand `commit.gpgsign` configuration variable that is
|
||||
set to force each and every commit to be signed.
|
||||
|
||||
\--::
|
||||
|
@ -405,7 +405,7 @@ true
|
||||
% git config --bool --get-urlmatch http.sslverify https://weak.example.com
|
||||
false
|
||||
% git config --get-urlmatch http https://weak.example.com
|
||||
http.cookieFile /tmp/cookie.txt
|
||||
http.cookiefile /tmp/cookie.txt
|
||||
http.sslverify false
|
||||
------------
|
||||
|
||||
|
@ -154,7 +154,7 @@ with CVS_SERVER (and shouldn't) as 'git-shell' understands `cvs` to mean
|
||||
[gitcvs]
|
||||
enabled=1
|
||||
# optional for debugging
|
||||
logFile=/path/to/logfile
|
||||
logfile=/path/to/logfile
|
||||
|
||||
------
|
||||
Note: you need to ensure each user that is going to invoke 'git-cvsserver' has
|
||||
@ -254,14 +254,14 @@ Configuring database backend
|
||||
its documentation if changing these variables, especially
|
||||
about `DBI->connect()`.
|
||||
|
||||
gitcvs.dbName::
|
||||
gitcvs.dbname::
|
||||
Database name. The exact meaning depends on the
|
||||
selected database driver, for SQLite this is a filename.
|
||||
Supports variable substitution (see below). May
|
||||
not contain semicolons (`;`).
|
||||
Default: '%Ggitcvs.%m.sqlite'
|
||||
|
||||
gitcvs.dbDriver::
|
||||
gitcvs.dbdriver::
|
||||
Used DBI driver. You can specify any available driver
|
||||
for this here, but it might not work. cvsserver is tested
|
||||
with 'DBD::SQLite', reported to work with
|
||||
@ -271,12 +271,12 @@ gitcvs.dbDriver::
|
||||
Default: 'SQLite'
|
||||
|
||||
gitcvs.dbuser::
|
||||
Database user. Only useful if setting `dbDriver`, since
|
||||
Database user. Only useful if setting `dbdriver`, since
|
||||
SQLite has no concept of database users. Supports variable
|
||||
substitution (see below).
|
||||
|
||||
gitcvs.dbPass::
|
||||
Database password. Only useful if setting `dbDriver`, since
|
||||
gitcvs.dbpass::
|
||||
Database password. Only useful if setting `dbdriver`, since
|
||||
SQLite has no concept of database passwords.
|
||||
|
||||
gitcvs.dbTableNamePrefix::
|
||||
@ -288,7 +288,7 @@ All variables can also be set per access method, see <<configaccessmethod,above>
|
||||
|
||||
Variable substitution
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
In `dbDriver` and `dbUser` you can use the following variables:
|
||||
In `dbdriver` and `dbuser` you can use the following variables:
|
||||
|
||||
%G::
|
||||
Git directory name
|
||||
@ -413,16 +413,16 @@ about end-of-line conversion.
|
||||
|
||||
Alternatively, if `gitcvs.usecrlfattr` config is not enabled
|
||||
or the attributes do not allow automatic detection for a filename, then
|
||||
the server uses the `gitcvs.allBinary` config for the default setting.
|
||||
If `gitcvs.allBinary` is set, then file not otherwise
|
||||
the server uses the `gitcvs.allbinary` config for the default setting.
|
||||
If `gitcvs.allbinary` is set, then file not otherwise
|
||||
specified will default to '-kb' mode. Otherwise the '-k' mode
|
||||
is left blank. But if `gitcvs.allBinary` is set to "guess", then
|
||||
is left blank. But if `gitcvs.allbinary` is set to "guess", then
|
||||
the correct '-k' mode will be guessed based on the contents of
|
||||
the file.
|
||||
|
||||
For best consistency with 'cvs', it is probably best to override the
|
||||
defaults by setting `gitcvs.usecrlfattr` to true,
|
||||
and `gitcvs.allBinary` to "guess".
|
||||
and `gitcvs.allbinary` to "guess".
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
@ -507,6 +507,10 @@ omitted when creating a new branch, the first `merge` commit will be
|
||||
the first ancestor of the current commit, and the branch will start
|
||||
out with no files. An unlimited number of `merge` commands per
|
||||
commit are permitted by fast-import, thereby establishing an n-way merge.
|
||||
However Git's other tools never create commits with more than 15
|
||||
additional ancestors (forming a 16-way merge). For this reason
|
||||
it is suggested that frontends do not use more than 15 `merge`
|
||||
commands per commit; 16, if starting a new, empty branch.
|
||||
|
||||
Here `<commit-ish>` is any of the commit specification expressions
|
||||
also accepted by `from` (see above).
|
||||
|
@ -26,7 +26,7 @@ By default, any tag that points into the histories being fetched is
|
||||
also fetched; the effect is to fetch tags that
|
||||
point at branches that you are interested in. This default behavior
|
||||
can be changed by using the --tags or --no-tags options or by
|
||||
configuring remote.<name>.tagOpt. By using a refspec that fetches tags
|
||||
configuring remote.<name>.tagopt. By using a refspec that fetches tags
|
||||
explicitly, you can fetch tags that do not point into branches you
|
||||
are interested in as well.
|
||||
|
||||
|
@ -273,13 +273,13 @@ attachments, and sign off patches with configuration variables.
|
||||
------------
|
||||
[format]
|
||||
headers = "Organization: git-foo\n"
|
||||
subjectPrefix = CHANGE
|
||||
subjectprefix = CHANGE
|
||||
suffix = .txt
|
||||
numbered = auto
|
||||
to = <email>
|
||||
cc = <email>
|
||||
attach [ = mime-boundary-string ]
|
||||
signOff = true
|
||||
signoff = true
|
||||
coverletter = auto
|
||||
------------
|
||||
|
||||
|
@ -54,10 +54,10 @@ all loose objects are combined into a single pack using
|
||||
`git repack -d -l`. Setting the value of `gc.auto` to 0
|
||||
disables automatic packing of loose objects.
|
||||
+
|
||||
If the number of packs exceeds the value of `gc.autoPackLimit`,
|
||||
If the number of packs exceeds the value of `gc.autopacklimit`,
|
||||
then existing packs (except those marked with a `.keep` file)
|
||||
are consolidated into a single pack by using the `-A` option of
|
||||
'git repack'. Setting `gc.autoPackLimit` to 0 disables
|
||||
'git repack'. Setting `gc.autopacklimit` to 0 disables
|
||||
automatic consolidation of packs.
|
||||
|
||||
--prune=<date>::
|
||||
@ -101,18 +101,18 @@ branches:
|
||||
------------
|
||||
[gc "refs/remotes/*"]
|
||||
reflogExpire = never
|
||||
reflogExpireUnreachable = 3 days
|
||||
reflogexpireUnreachable = 3 days
|
||||
------------
|
||||
|
||||
The optional configuration variable 'gc.rerereResolved' indicates
|
||||
The optional configuration variable 'gc.rerereresolved' indicates
|
||||
how long records of conflicted merge you resolved earlier are
|
||||
kept. This defaults to 60 days.
|
||||
|
||||
The optional configuration variable 'gc.rerereUnresolved' indicates
|
||||
The optional configuration variable 'gc.rerereunresolved' indicates
|
||||
how long records of conflicted merge you have not resolved are
|
||||
kept. This defaults to 15 days.
|
||||
|
||||
The optional configuration variable 'gc.packRefs' determines if
|
||||
The optional configuration variable 'gc.packrefs' determines if
|
||||
'git gc' runs 'git pack-refs'. This can be set to "notbare" to enable
|
||||
it within all non-bare repos or it can be set to a boolean value.
|
||||
This defaults to true.
|
||||
|
@ -9,7 +9,7 @@ git-imap-send - Send a collection of patches from stdin to an IMAP folder
|
||||
SYNOPSIS
|
||||
--------
|
||||
[verse]
|
||||
'git imap-send' [-v] [-q] [--[no-]curl]
|
||||
'git imap-send'
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
@ -26,28 +26,6 @@ Typical usage is something like:
|
||||
git format-patch --signoff --stdout --attach origin | git imap-send
|
||||
|
||||
|
||||
OPTIONS
|
||||
-------
|
||||
|
||||
-v::
|
||||
--verbose::
|
||||
Be verbose.
|
||||
|
||||
-q::
|
||||
--quiet::
|
||||
Be quiet.
|
||||
|
||||
--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
|
||||
option set.
|
||||
|
||||
--no-curl::
|
||||
Talk to the IMAP server using git's own IMAP routines instead of
|
||||
using libcurl. Ignored if Git was built with the NO_OPENSSL option
|
||||
set.
|
||||
|
||||
|
||||
CONFIGURATION
|
||||
-------------
|
||||
|
||||
@ -97,9 +75,7 @@ imap.preformattedHTML::
|
||||
|
||||
imap.authMethod::
|
||||
Specify authenticate method for authentication with 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 method is 'CRAM-MD5'. If this is not set
|
||||
Current supported method is 'CRAM-MD5' only. If this is not set
|
||||
then 'git imap-send' uses the basic IMAP plaintext LOGIN command.
|
||||
|
||||
Examples
|
||||
|
@ -125,7 +125,7 @@ The template directory will be one of the following (in order):
|
||||
|
||||
- the contents of the `$GIT_TEMPLATE_DIR` environment variable;
|
||||
|
||||
- the `init.templateDir` configuration variable; or
|
||||
- the `init.templatedir` configuration variable; or
|
||||
|
||||
- the default template directory: `/usr/share/git-core/templates`.
|
||||
|
||||
|
@ -76,7 +76,7 @@ You may specify configuration in your .git/config
|
||||
httpd = apache2 -f
|
||||
port = 4321
|
||||
browser = konqueror
|
||||
modulePath = /usr/lib/apache2/modules
|
||||
modulepath = /usr/lib/apache2/modules
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
|
@ -62,9 +62,9 @@ produced by `--stat`, etc.
|
||||
output by allowing them to allocate space in advance.
|
||||
|
||||
-L <start>,<end>:<file>::
|
||||
-L :<funcname>:<file>::
|
||||
-L :<regex>:<file>::
|
||||
Trace the evolution of the line range given by "<start>,<end>"
|
||||
(or the function name regex <funcname>) within the <file>. You may
|
||||
(or the funcname regex <regex>) 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.
|
||||
@ -184,7 +184,7 @@ log.date::
|
||||
`--date` option.) Defaults to "default", which means to write
|
||||
dates like `Sat May 8 19:35:34 2010 -0500`.
|
||||
|
||||
log.showRoot::
|
||||
log.showroot::
|
||||
If `false`, `git log` and related commands will not treat the
|
||||
initial commit as a big creation event. Any root commits in
|
||||
`git log -p` output would be shown without a diff attached.
|
||||
|
@ -66,11 +66,6 @@ conversion, even with this flag.
|
||||
-n::
|
||||
Disable all charset re-coding of the metadata.
|
||||
|
||||
-m::
|
||||
--message-id::
|
||||
Copy the Message-ID header at the end of the commit message. This
|
||||
is useful in order to associate commits with mailing list discussions.
|
||||
|
||||
--scissors::
|
||||
Remove everything in body before a scissors line. A line that
|
||||
mainly consists of scissors (either ">8" or "8<") and perforation
|
||||
|
@ -232,7 +232,7 @@ Barbie's remark on your side. The only thing you can tell is that your
|
||||
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"
|
||||
An alternative style can be used by setting the "merge.conflictstyle"
|
||||
configuration variable to "diff3". In "diff3" style, the above conflict
|
||||
may look like this:
|
||||
|
||||
@ -329,7 +329,7 @@ CONFIGURATION
|
||||
-------------
|
||||
include::merge-config.txt[]
|
||||
|
||||
branch.<name>.mergeOptions::
|
||||
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.
|
||||
|
@ -9,10 +9,10 @@ SYNOPSIS
|
||||
--------
|
||||
[verse]
|
||||
'git notes' [list [<object>]]
|
||||
'git notes' add [-f] [--allow-empty] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
|
||||
'git notes' add [-f] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
|
||||
'git notes' copy [-f] ( --stdin | <from-object> <to-object> )
|
||||
'git notes' append [--allow-empty] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
|
||||
'git notes' edit [--allow-empty] [<object>]
|
||||
'git notes' append [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
|
||||
'git notes' edit [<object>]
|
||||
'git notes' show [<object>]
|
||||
'git notes' merge [-v | -q] [-s <strategy> ] <notes-ref>
|
||||
'git notes' merge --commit [-v | -q]
|
||||
@ -155,10 +155,6 @@ OPTIONS
|
||||
Like '-C', but with '-c' the editor is invoked, so that
|
||||
the user can further edit the note message.
|
||||
|
||||
--allow-empty::
|
||||
Allow an empty note object to be stored. The default behavior is
|
||||
to automatically remove empty notes.
|
||||
|
||||
--ref <ref>::
|
||||
Manipulate the notes tree in <ref>. This overrides
|
||||
'GIT_NOTES_REF' and the "core.notesRef" configuration. The ref
|
||||
@ -291,7 +287,7 @@ arbitrary files using 'git hash-object':
|
||||
------------
|
||||
$ cc *.c
|
||||
$ blob=$(git hash-object -w a.out)
|
||||
$ git notes --ref=built add --allow-empty -C "$blob" HEAD
|
||||
$ git notes --ref=built add -C "$blob" HEAD
|
||||
------------
|
||||
|
||||
(You cannot simply use `git notes --ref=built add -F a.out HEAD`
|
||||
|
@ -241,9 +241,6 @@ Git repository:
|
||||
Use a client spec to find the list of interesting files in p4.
|
||||
See the "CLIENT SPEC" section below.
|
||||
|
||||
-/ <path>::
|
||||
Exclude selected depot paths when cloning or syncing.
|
||||
|
||||
Clone options
|
||||
~~~~~~~~~~~~~
|
||||
These options can be used in an initial 'clone', along with the 'sync'
|
||||
@ -257,6 +254,9 @@ options described above.
|
||||
--bare::
|
||||
Perform a bare clone. See linkgit:git-clone[1].
|
||||
|
||||
-/ <path>::
|
||||
Exclude selected depot paths when cloning.
|
||||
|
||||
Submit options
|
||||
~~~~~~~~~~~~~~
|
||||
These options can be used to modify 'git p4 submit' behavior.
|
||||
|
@ -13,7 +13,7 @@ SYNOPSIS
|
||||
[--no-reuse-delta] [--delta-base-offset] [--non-empty]
|
||||
[--local] [--incremental] [--window=<n>] [--depth=<n>]
|
||||
[--revs [--unpacked | --all]] [--stdout | base-name]
|
||||
[--shallow] [--keep-true-parents] < object-list
|
||||
[--keep-true-parents] < object-list
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
@ -190,11 +190,6 @@ required objects and is thus unusable by Git without making it
|
||||
self-contained. Use `git index-pack --fix-thin`
|
||||
(see linkgit:git-index-pack[1]) to restore the self-contained property.
|
||||
|
||||
--shallow::
|
||||
Optimize a pack that will be provided to a client with a shallow
|
||||
repository. This option, combined with \--thin, can result in a
|
||||
smaller pack at the cost of speed.
|
||||
|
||||
--delta-base-offset::
|
||||
A packed archive can express the base object of a delta as
|
||||
either a 20-byte object name or as an offset in the
|
||||
|
@ -111,12 +111,13 @@ include::merge-options.txt[]
|
||||
was rebased since last fetched, the rebase uses that information
|
||||
to avoid rebasing non-local changes.
|
||||
+
|
||||
When set to preserve, rebase with the `--preserve-merges` option passed
|
||||
to `git rebase` so that locally created merge commits will not be flattened.
|
||||
When preserve, also rebase the current branch on top of the upstream
|
||||
branch, but pass `--preserve-merges` along to `git rebase` so that
|
||||
locally created merge commits will not be flattened.
|
||||
+
|
||||
When false, merge the current branch into the upstream branch.
|
||||
+
|
||||
See `pull.rebase`, `branch.<name>.rebase` and `branch.autoSetupRebase` in
|
||||
See `pull.rebase`, `branch.<name>.rebase` and `branch.autosetuprebase` in
|
||||
linkgit:git-config[1] if you want to make `git pull` always use
|
||||
`--rebase` instead of merging.
|
||||
+
|
||||
|
@ -9,7 +9,7 @@ git-push - Update remote refs along with associated objects
|
||||
SYNOPSIS
|
||||
--------
|
||||
[verse]
|
||||
'git push' [--all | --mirror | --tags] [--follow-tags] [--atomic] [-n | --dry-run] [--receive-pack=<git-receive-pack>]
|
||||
'git push' [--all | --mirror | --tags] [--follow-tags] [-n | --dry-run] [--receive-pack=<git-receive-pack>]
|
||||
[--repo=<repository>] [-f | --force] [--prune] [-v | --verbose]
|
||||
[-u | --set-upstream] [--signed]
|
||||
[--force-with-lease[=<refname>[:<expect>]]]
|
||||
@ -128,10 +128,7 @@ already exists on the remote side.
|
||||
Push all the refs that would be pushed without this option,
|
||||
and also push annotated tags in `refs/tags` that are missing
|
||||
from the remote but are pointing at commit-ish that are
|
||||
reachable from the refs being pushed. This can also be specified
|
||||
with configuration variable 'push.followTags'. For more
|
||||
information, see 'push.followTags' in linkgit:git-config[1].
|
||||
|
||||
reachable from the refs being pushed.
|
||||
|
||||
--signed::
|
||||
GPG-sign the push request to update refs on the receiving
|
||||
@ -139,11 +136,6 @@ already exists on the remote side.
|
||||
logged. See linkgit:git-receive-pack[1] for the details
|
||||
on the receiving end.
|
||||
|
||||
--[no-]atomic::
|
||||
Use an atomic transaction on the remote side if available.
|
||||
Either all refs are updated, or on error, no refs are updated.
|
||||
If the server does not support atomic pushes the push will fail.
|
||||
|
||||
--receive-pack=<git-receive-pack>::
|
||||
--exec=<git-receive-pack>::
|
||||
Path to the 'git-receive-pack' program on the remote
|
||||
@ -157,8 +149,9 @@ already exists on the remote side.
|
||||
Usually, "git push" refuses to update a remote ref that is
|
||||
not an ancestor of the local ref used to overwrite it.
|
||||
+
|
||||
This option overrides this restriction if the current value of the
|
||||
remote ref is the expected value. "git push" fails otherwise.
|
||||
This option bypasses the check, but instead requires that the
|
||||
current value of the ref to be the expected value. "git push"
|
||||
fails otherwise.
|
||||
+
|
||||
Imagine that you have to rebase what you have already published.
|
||||
You will have to bypass the "must fast-forward" rule in order to
|
||||
@ -170,14 +163,15 @@ commit, and blindly pushing with `--force` will lose her work.
|
||||
This option allows you to say that you expect the history you are
|
||||
updating is what you rebased and want to replace. If the remote ref
|
||||
still points at the commit you specified, you can be sure that no
|
||||
other people did anything to the ref. It is like taking a "lease" on
|
||||
the ref without explicitly locking it, and the remote ref is updated
|
||||
only if the "lease" is still valid.
|
||||
other people did anything to the ref (it is like taking a "lease" on
|
||||
the ref without explicitly locking it, and you update the ref while
|
||||
making sure that your earlier "lease" is still valid).
|
||||
+
|
||||
`--force-with-lease` alone, without specifying the details, will protect
|
||||
all remote refs that are going to be updated by requiring their
|
||||
current value to be the same as the remote-tracking branch we have
|
||||
for them.
|
||||
for them, unless specified with a `--force-with-lease=<refname>:<expect>`
|
||||
option that explicitly states what the expected value is.
|
||||
+
|
||||
`--force-with-lease=<refname>`, without specifying the expected value, will
|
||||
protect the named ref (alone), if it is going to be updated, by
|
||||
@ -220,8 +214,22 @@ origin +master` to force a push to the `master` branch). See the
|
||||
`<refspec>...` section above for details.
|
||||
|
||||
--repo=<repository>::
|
||||
This option is equivalent to the <repository> argument. If both
|
||||
are specified, the command-line argument takes precedence.
|
||||
This option is only relevant if no <repository> argument is
|
||||
passed in the invocation. In this case, 'git push' derives the
|
||||
remote name from the current branch: If it tracks a remote
|
||||
branch, then that remote repository is pushed to. Otherwise,
|
||||
the name "origin" is used. For this latter case, this option
|
||||
can be used to override the name "origin". In other words,
|
||||
the difference between these two commands
|
||||
+
|
||||
--------------------------
|
||||
git push public #1
|
||||
git push --repo=public #2
|
||||
--------------------------
|
||||
+
|
||||
is that #1 always pushes to "public" whereas #2 pushes to "public"
|
||||
only if the current branch does not track a remote branch. This is
|
||||
useful if you write an alias or script around 'git push'.
|
||||
|
||||
-u::
|
||||
--set-upstream::
|
||||
|
@ -207,10 +207,10 @@ rebase.stat::
|
||||
Whether to show a diffstat of what changed upstream since the last
|
||||
rebase. False by default.
|
||||
|
||||
rebase.autoSquash::
|
||||
rebase.autosquash::
|
||||
If set to true enable '--autosquash' option by default.
|
||||
|
||||
rebase.autoStash::
|
||||
rebase.autostash::
|
||||
If set to true enable '--autostash' option by default.
|
||||
|
||||
OPTIONS
|
||||
@ -362,9 +362,7 @@ default is `--no-fork-point`, otherwise the default is `--fork-point`.
|
||||
|
||||
-p::
|
||||
--preserve-merges::
|
||||
Recreate merge commits instead of flattening the history by replaying
|
||||
commits a merge commit introduces. Merge conflict resolutions or manual
|
||||
amendments to merge commits are not preserved.
|
||||
Instead of ignoring merges, try to recreate them.
|
||||
+
|
||||
This uses the `--interactive` machinery internally, but combining it
|
||||
with the `--interactive` option explicitly is generally not a good
|
||||
@ -416,7 +414,7 @@ squash/fixup series.
|
||||
This option is only valid when the '--interactive' option is used.
|
||||
+
|
||||
If the '--autosquash' option is enabled by default using the
|
||||
configuration variable `rebase.autoSquash`, this option can be
|
||||
configuration variable `rebase.autosquash`, this option can be
|
||||
used to override and disable this setting.
|
||||
|
||||
--[no-]autostash::
|
||||
|
@ -100,7 +100,7 @@ the following environment variables:
|
||||
starting time is different by this many seconds from the
|
||||
current session. Only meaningful when
|
||||
`GIT_PUSH_CERT_NONCE_STATUS` says `SLOP`.
|
||||
Also read about `receive.certNonceSlop` variable in
|
||||
Also read about `receive.certnonceslop` variable in
|
||||
linkgit:git-config[1].
|
||||
|
||||
This hook is called before any refname is updated and before any
|
||||
|
@ -17,113 +17,85 @@ The command takes various subcommands, and different options
|
||||
depending on the subcommand:
|
||||
|
||||
[verse]
|
||||
'git reflog expire' [--dry-run] [--stale-fix] [--verbose]
|
||||
[--expire=<time>] [--expire-unreachable=<time>] [--all] <refs>...
|
||||
'git reflog delete' ref@\{specifier\}...
|
||||
'git reflog' ['show'] [log-options] [<ref>]
|
||||
'git reflog expire' [--expire=<time>] [--expire-unreachable=<time>]
|
||||
[--rewrite] [--updateref] [--stale-fix]
|
||||
[--dry-run] [--verbose] [--all | <refs>...]
|
||||
'git reflog delete' [--rewrite] [--updateref]
|
||||
[--dry-run] [--verbose] ref@\{specifier\}...
|
||||
|
||||
Reference logs, or "reflogs", record when the tips of branches and
|
||||
other references were updated in the local repository. Reflogs are
|
||||
useful in various Git commands, to specify the old value of a
|
||||
reference. For example, `HEAD@{2}` means "where HEAD used to be two
|
||||
moves ago", `master@{one.week.ago}` means "where master used to point
|
||||
to one week ago in this local repository", and so on. See
|
||||
linkgit:gitrevisions[7] for more details.
|
||||
Reflog is a mechanism to record when the tip of branches are
|
||||
updated. This command is to manage the information recorded in it.
|
||||
|
||||
This command manages the information recorded in the reflogs.
|
||||
The subcommand "expire" is used to prune older reflog entries.
|
||||
Entries older than `expire` time, or entries older than
|
||||
`expire-unreachable` time and not reachable from the current
|
||||
tip, are removed from the reflog. This is typically not used
|
||||
directly by the end users -- instead, see linkgit:git-gc[1].
|
||||
|
||||
The "show" subcommand (which is also the default, in the absence of
|
||||
any subcommands) shows the log of the reference provided in the
|
||||
command-line (or `HEAD`, by default). The reflog covers all recent
|
||||
actions, and in addition the `HEAD` reflog records branch switching.
|
||||
`git reflog show` is an alias for `git log -g --abbrev-commit
|
||||
--pretty=oneline`; see linkgit:git-log[1] for more information.
|
||||
The subcommand "show" (which is also the default, in the absence of any
|
||||
subcommands) will take all the normal log options, and show the log of
|
||||
the reference provided in the command-line (or `HEAD`, by default).
|
||||
The reflog will cover all recent actions (HEAD reflog records branch switching
|
||||
as well). It is an alias for `git log -g --abbrev-commit --pretty=oneline`;
|
||||
see linkgit:git-log[1].
|
||||
|
||||
The "expire" subcommand prunes older reflog entries. Entries older
|
||||
than `expire` time, or entries older than `expire-unreachable` time
|
||||
and not reachable from the current tip, are removed from the reflog.
|
||||
This is typically not used directly by end users -- instead, see
|
||||
linkgit:git-gc[1].
|
||||
The reflog is useful in various Git commands, to specify the old value
|
||||
of a reference. For example, `HEAD@{2}` means "where HEAD used to be
|
||||
two moves ago", `master@{one.week.ago}` means "where master used to
|
||||
point to one week ago", and so on. See linkgit:gitrevisions[7] for
|
||||
more details.
|
||||
|
||||
The "delete" subcommand deletes single entries from the reflog. Its
|
||||
argument must be an _exact_ entry (e.g. "`git reflog delete
|
||||
master@{2}`"). This subcommand is also typically not used directly by
|
||||
end users.
|
||||
To delete single entries from the reflog, use the subcommand "delete"
|
||||
and specify the _exact_ entry (e.g. "`git reflog delete master@{2}`").
|
||||
|
||||
|
||||
OPTIONS
|
||||
-------
|
||||
|
||||
Options for `show`
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
`git reflog show` accepts any of the options accepted by `git log`.
|
||||
|
||||
|
||||
Options for `expire`
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
--all::
|
||||
Process the reflogs of all references.
|
||||
|
||||
--expire=<time>::
|
||||
Prune entries older than the specified time. If this option is
|
||||
not specified, the expiration time is taken from the
|
||||
configuration setting `gc.reflogExpire`, which in turn
|
||||
defaults to 90 days. `--expire=all` prunes entries regardless
|
||||
of their age; `--expire=never` turns off pruning of reachable
|
||||
entries (but see `--expire-unreachable`).
|
||||
|
||||
--expire-unreachable=<time>::
|
||||
Prune entries older than `<time>` that are not reachable from
|
||||
the current tip of the branch. If this option is not
|
||||
specified, the expiration time is taken from the configuration
|
||||
setting `gc.reflogExpireUnreachable`, which in turn defaults
|
||||
to 30 days. `--expire-unreachable=all` prunes unreachable
|
||||
entries regardless of their age; `--expire-unreachable=never`
|
||||
turns off early pruning of unreachable entries (but see
|
||||
`--expire`).
|
||||
|
||||
--updateref::
|
||||
Update the reference to the value of the top reflog entry (i.e.
|
||||
<ref>@\{0\}) if the previous top entry was pruned. (This
|
||||
option is ignored for symbolic references.)
|
||||
|
||||
--rewrite::
|
||||
If a reflog entry's predecessor is pruned, adjust its "old"
|
||||
SHA-1 to be equal to the "new" SHA-1 field of the entry that
|
||||
now precedes it.
|
||||
|
||||
--stale-fix::
|
||||
Prune any reflog entries that point to "broken commits". A
|
||||
broken commit is a commit that is not reachable from any of
|
||||
the reference tips and that refers, directly or indirectly, to
|
||||
a missing commit, tree, or blob object.
|
||||
This revamps the logic -- the definition of "broken commit"
|
||||
becomes: a commit that is not reachable from any of the refs and
|
||||
there is a missing object among the commit, tree, or blob
|
||||
objects reachable from it that is not reachable from any of the
|
||||
refs.
|
||||
+
|
||||
This computation involves traversing all the reachable objects, i.e. it
|
||||
has the same cost as 'git prune'. It is primarily intended to fix
|
||||
corruption caused by garbage collecting using older versions of Git,
|
||||
which didn't protect objects referred to by reflogs.
|
||||
has the same cost as 'git prune'. Fortunately, once this is run, we
|
||||
should not have to ever worry about missing objects, because the current
|
||||
prune and pack-objects know about reflogs and protect objects referred by
|
||||
them.
|
||||
|
||||
-n::
|
||||
--dry-run::
|
||||
Do not actually prune any entries; just show what would have
|
||||
been pruned.
|
||||
--expire=<time>::
|
||||
Entries older than this time are pruned. Without the
|
||||
option it is taken from configuration `gc.reflogExpire`,
|
||||
which in turn defaults to 90 days. --expire=all prunes
|
||||
entries regardless of their age; --expire=never turns off
|
||||
pruning of reachable entries (but see --expire-unreachable).
|
||||
|
||||
--expire-unreachable=<time>::
|
||||
Entries older than this time and not reachable from
|
||||
the current tip of the branch are pruned. Without the
|
||||
option it is taken from configuration
|
||||
`gc.reflogExpireUnreachable`, which in turn defaults to
|
||||
30 days. --expire-unreachable=all prunes unreachable
|
||||
entries regardless of their age; --expire-unreachable=never
|
||||
turns off early pruning of unreachable entries (but see
|
||||
--expire).
|
||||
|
||||
--all::
|
||||
Instead of listing <refs> explicitly, prune all refs.
|
||||
|
||||
--updateref::
|
||||
Update the ref with the sha1 of the top reflog entry (i.e.
|
||||
<ref>@\{0\}) after expiring or deleting.
|
||||
|
||||
--rewrite::
|
||||
While expiring or deleting, adjust each reflog entry to ensure
|
||||
that the `old` sha1 field points to the `new` sha1 field of the
|
||||
previous entry.
|
||||
|
||||
--verbose::
|
||||
Print extra information on screen.
|
||||
|
||||
|
||||
Options for `delete`
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
`git reflog delete` accepts options `--updateref`, `--rewrite`, `-n`,
|
||||
`--dry-run`, and `--verbose`, with the same meanings as when they are
|
||||
used with `expire`.
|
||||
|
||||
|
||||
GIT
|
||||
---
|
||||
Part of the linkgit:git[1] suite
|
||||
|
@ -58,9 +58,6 @@ remote repository.
|
||||
With `--no-tags` option, `git fetch <name>` does not import tags from
|
||||
the remote repository.
|
||||
+
|
||||
By default, only tags on fetched branches are imported
|
||||
(see linkgit:git-fetch[1]).
|
||||
+
|
||||
With `-t <branch>` option, instead of the default glob
|
||||
refspec for the remote to track all branches under
|
||||
the `refs/remotes/<name>/` namespace, a refspec to track only `<branch>`
|
||||
@ -133,25 +130,17 @@ branches, adds to that list.
|
||||
|
||||
'set-url'::
|
||||
|
||||
Changes URLs for the remote. Sets first URL for remote <name> that matches
|
||||
Changes URL remote points to. Sets first URL remote points to matching
|
||||
regex <oldurl> (first URL if no <oldurl> is given) to <newurl>. If
|
||||
<oldurl> doesn't match any URL, an error occurs and nothing is changed.
|
||||
<oldurl> doesn't match any URL, error occurs and nothing is changed.
|
||||
+
|
||||
With '--push', push URLs are manipulated instead of fetch URLs.
|
||||
+
|
||||
With '--add', instead of changing existing URLs, new URL is added.
|
||||
With '--add', instead of changing some URL, new URL is added.
|
||||
+
|
||||
With '--delete', instead of changing existing URLs, all URLs matching
|
||||
regex <url> are deleted for remote <name>. Trying to delete all
|
||||
non-push URLs is an error.
|
||||
+
|
||||
Note that the push URL and the fetch URL, even though they can
|
||||
be set differently, must still refer to the same place. What you
|
||||
pushed to the push URL should be what you would see if you
|
||||
immediately fetched from the fetch URL. If you are trying to
|
||||
fetch from one place (e.g. your upstream) and push to another (e.g.
|
||||
your publishing repository), use two separate remotes.
|
||||
|
||||
With '--delete', instead of changing some URL, all URLs matching
|
||||
regex <url> are deleted. Trying to delete all non-push URLs is an
|
||||
error.
|
||||
|
||||
'show'::
|
||||
|
||||
|
@ -115,7 +115,7 @@ other objects in that pack they already have locally.
|
||||
Write a reachability bitmap index as part of the repack. This
|
||||
only makes sense when used with `-a` or `-A`, as the bitmaps
|
||||
must be able to refer to all reachable objects. This option
|
||||
overrides the setting of `pack.writeBitmaps`.
|
||||
overrides the setting of `pack.writebitmaps`.
|
||||
|
||||
--pack-kept-objects::
|
||||
Include objects in `.keep` files when repacking. Note that we
|
||||
@ -123,7 +123,7 @@ other objects in that pack they already have locally.
|
||||
This means that we may duplicate objects, but this makes the
|
||||
option safe to use when there are concurrent pushes or fetches.
|
||||
This option is generally only useful if you are writing bitmaps
|
||||
with `-b` or `pack.writeBitmaps`, as it ensures that the
|
||||
with `-b` or `pack.writebitmaps`, as it ensures that the
|
||||
bitmapped packfile has the necessary objects.
|
||||
|
||||
Configuration
|
||||
|
@ -69,7 +69,7 @@ Prune records of conflicted merges that
|
||||
occurred a long time ago. By default, unresolved conflicts older
|
||||
than 15 days and resolved conflicts older than 60
|
||||
days are pruned. These defaults are controlled via the
|
||||
`gc.rerereUnresolved` and `gc.rerereResolved` configuration
|
||||
`gc.rerereunresolved` and `gc.rerereresolved` configuration
|
||||
variables respectively.
|
||||
|
||||
|
||||
|
@ -46,8 +46,7 @@ SYNOPSIS
|
||||
[ \--extended-regexp | -E ]
|
||||
[ \--fixed-strings | -F ]
|
||||
[ \--date=(local|relative|default|iso|iso-strict|rfc|short) ]
|
||||
[ [ \--objects | \--objects-edge | \--objects-edge-aggressive ]
|
||||
[ \--unpacked ] ]
|
||||
[ [\--objects | \--objects-edge] [ \--unpacked ] ]
|
||||
[ \--pretty | \--header ]
|
||||
[ \--bisect ]
|
||||
[ \--bisect-vars ]
|
||||
|
@ -47,7 +47,7 @@ Composing
|
||||
--annotate::
|
||||
Review and edit each patch you're about to send. Default is the value
|
||||
of 'sendemail.annotate'. See the CONFIGURATION section for
|
||||
'sendemail.multiEdit'.
|
||||
'sendemail.multiedit'.
|
||||
|
||||
--bcc=<address>::
|
||||
Specify a "Bcc:" value for each email. Default is the value of
|
||||
@ -73,7 +73,7 @@ and In-Reply-To headers will be used unless they are removed.
|
||||
+
|
||||
Missing From or In-Reply-To headers will be prompted for.
|
||||
+
|
||||
See the CONFIGURATION section for 'sendemail.multiEdit'.
|
||||
See the CONFIGURATION section for 'sendemail.multiedit'.
|
||||
|
||||
--from=<address>::
|
||||
Specify the sender of the emails. If not specified on the command line,
|
||||
@ -131,21 +131,6 @@ Note that no attempts whatsoever are made to validate the encoding.
|
||||
Specify encoding of compose message. Default is the value of the
|
||||
'sendemail.composeencoding'; if that is unspecified, UTF-8 is assumed.
|
||||
|
||||
--transfer-encoding=(7bit|8bit|quoted-printable|base64)::
|
||||
Specify the transfer encoding to be used to send the message over SMTP.
|
||||
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 a MUA) much
|
||||
harder to inspect manually. base64 is even more fool proof, but also
|
||||
even more opaque. Default is the value of the 'sendemail.transferEncoding'
|
||||
configuration value; if that is unspecified, git will use 8bit and not
|
||||
add a Content-Transfer-Encoding header.
|
||||
|
||||
--xmailer::
|
||||
--no-xmailer::
|
||||
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`.
|
||||
|
||||
Sending
|
||||
~~~~~~~
|
||||
@ -156,31 +141,31 @@ Sending
|
||||
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
|
||||
'sendemail.envelopesender' configuration variable; if that is
|
||||
unspecified, choosing the envelope sender is left to your MTA.
|
||||
|
||||
--smtp-encryption=<encryption>::
|
||||
Specify the encryption to use, either 'ssl' or 'tls'. Any other
|
||||
value reverts to plain SMTP. Default is the value of
|
||||
'sendemail.smtpEncryption'.
|
||||
'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
|
||||
to determine your FQDN automatically. Default is the value of
|
||||
'sendemail.smtpDomain'.
|
||||
'sendemail.smtpdomain'.
|
||||
|
||||
--smtp-pass[=<password>]::
|
||||
Password for SMTP-AUTH. The argument is optional: If no
|
||||
argument is specified, then the empty string is used as
|
||||
the password. Default is the value of 'sendemail.smtpPass',
|
||||
the password. Default is the value of 'sendemail.smtppass',
|
||||
however '--smtp-pass' always overrides this value.
|
||||
+
|
||||
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
|
||||
'--smtp-user' or a 'sendemail.smtpuser'), but no password has been
|
||||
specified (with '--smtp-pass' or 'sendemail.smtppass'), then
|
||||
a password is obtained using 'git-credential'.
|
||||
|
||||
--smtp-server=<host>::
|
||||
@ -188,7 +173,7 @@ a password is obtained using 'git-credential'.
|
||||
`smtp.example.com` or a raw IP address). Alternatively it can
|
||||
specify a full pathname of a sendmail-like program instead;
|
||||
the program must support the `-i` option. Default value can
|
||||
be specified by the 'sendemail.smtpServer' configuration
|
||||
be specified by the 'sendemail.smtpserver' configuration
|
||||
option; the built-in default is `/usr/sbin/sendmail` or
|
||||
`/usr/lib/sendmail` if such program is available, or
|
||||
`localhost` otherwise.
|
||||
@ -199,11 +184,11 @@ a password is obtained using 'git-credential'.
|
||||
submission port 587, or the common SSL smtp port 465);
|
||||
symbolic port names (e.g. "submission" instead of 587)
|
||||
are also accepted. The port can also be set with the
|
||||
'sendemail.smtpServerPort' configuration variable.
|
||||
'sendemail.smtpserverport' configuration variable.
|
||||
|
||||
--smtp-server-option=<option>::
|
||||
If set, specifies the outgoing SMTP server option to use.
|
||||
Default value can be specified by the 'sendemail.smtpServerOption'
|
||||
Default value can be specified by the 'sendemail.smtpserveroption'
|
||||
configuration option.
|
||||
+
|
||||
The --smtp-server-option option must be repeated for each option you want
|
||||
@ -214,19 +199,14 @@ must be used for each option.
|
||||
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 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).
|
||||
Path to ca-certificates (either a directory or a single file).
|
||||
Set it to an empty string to disable certificate verification.
|
||||
Defaults to the value set to the 'sendemail.smtpsslcertpath'
|
||||
configuration variable, if set, or `/etc/ssl/certs` otherwise.
|
||||
|
||||
--smtp-user=<user>::
|
||||
Username for SMTP-AUTH. Default is the value of 'sendemail.smtpUser';
|
||||
if a username is not specified (with '--smtp-user' or 'sendemail.smtpUser'),
|
||||
Username for SMTP-AUTH. Default is the value of 'sendemail.smtpuser';
|
||||
if a username is not specified (with '--smtp-user' or 'sendemail.smtpuser'),
|
||||
then authentication is not attempted.
|
||||
|
||||
--smtp-debug=0|1::
|
||||
@ -247,14 +227,14 @@ Automating
|
||||
Specify a command to execute once per patch file which
|
||||
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.
|
||||
Default is the value of 'sendemail.cccmd' configuration value.
|
||||
|
||||
--[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
|
||||
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'
|
||||
entire patch series. Disabled by default, but the 'sendemail.chainreplyto'
|
||||
configuration variable can be used to enable it.
|
||||
|
||||
--identity=<identity>::
|
||||
@ -304,7 +284,7 @@ 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.
|
||||
Default is the value of 'sendemail.suppressFrom' configuration
|
||||
Default is the value of 'sendemail.suppressfrom' configuration
|
||||
value; if that is unspecified, default to --no-suppress-from.
|
||||
|
||||
--[no-]thread::
|
||||
@ -377,15 +357,15 @@ default to '--validate'.
|
||||
CONFIGURATION
|
||||
-------------
|
||||
|
||||
sendemail.aliasesFile::
|
||||
sendemail.aliasesfile::
|
||||
To avoid typing long email addresses, point this to one or more
|
||||
email aliases files. You must also supply 'sendemail.aliasFileType'.
|
||||
email aliases files. You must also supply 'sendemail.aliasfiletype'.
|
||||
|
||||
sendemail.aliasFileType::
|
||||
Format of the file(s) specified in sendemail.aliasesFile. Must be
|
||||
sendemail.aliasfiletype::
|
||||
Format of the file(s) specified in sendemail.aliasesfile. Must be
|
||||
one of 'mutt', 'mailrc', 'pine', 'elm', or 'gnus'.
|
||||
|
||||
sendemail.multiEdit::
|
||||
sendemail.multiedit::
|
||||
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
|
||||
@ -404,10 +384,10 @@ To use 'git send-email' to send your patches through the GMail SMTP server,
|
||||
edit ~/.gitconfig to specify your account settings:
|
||||
|
||||
[sendemail]
|
||||
smtpEncryption = tls
|
||||
smtpServer = smtp.gmail.com
|
||||
smtpUser = yourname@gmail.com
|
||||
smtpServerPort = 587
|
||||
smtpencryption = tls
|
||||
smtpserver = smtp.gmail.com
|
||||
smtpuser = yourname@gmail.com
|
||||
smtpserverport = 587
|
||||
|
||||
Once your commits are ready to be sent to the mailing list, run the
|
||||
following commands:
|
||||
|
@ -9,7 +9,7 @@ git-send-pack - Push objects over Git protocol to another repository
|
||||
SYNOPSIS
|
||||
--------
|
||||
[verse]
|
||||
'git send-pack' [--all] [--dry-run] [--force] [--receive-pack=<git-receive-pack>] [--verbose] [--thin] [--atomic] [<host>:]<directory> [<ref>...]
|
||||
'git send-pack' [--all] [--dry-run] [--force] [--receive-pack=<git-receive-pack>] [--verbose] [--thin] [<host>:]<directory> [<ref>...]
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
@ -62,11 +62,6 @@ be in a separate packet, and the list must end with a flush packet.
|
||||
Send a "thin" pack, which records objects in deltified form based
|
||||
on objects not included in the pack to reduce network traffic.
|
||||
|
||||
--atomic::
|
||||
Use an atomic transaction for updating the refs. If any of the refs
|
||||
fails to update then the entire push will fail without changing any
|
||||
refs.
|
||||
|
||||
<host>::
|
||||
A remote host to house the repository. When this
|
||||
part is specified, 'git-receive-pack' is invoked via
|
||||
|
@ -41,14 +41,6 @@ OPTIONS
|
||||
--long::
|
||||
Give the output in the long-format. This is the default.
|
||||
|
||||
-v::
|
||||
--verbose::
|
||||
In addition to the names of files that have been changed, also
|
||||
show the textual changes that are staged to be committed
|
||||
(i.e., like the output of `git diff --cached`). If `-v` is specified
|
||||
twice, then also show the changes in the working tree that
|
||||
have not yet been staged (i.e., like the output of `git diff`).
|
||||
|
||||
-u[<mode>]::
|
||||
--untracked-files[=<mode>]::
|
||||
Show untracked files.
|
||||
@ -85,7 +77,7 @@ configuration variable documented in linkgit:git-config[1].
|
||||
only changes to the commits stored in the superproject are shown (this was
|
||||
the behavior before 1.7.0). Using "all" hides all changes to submodules
|
||||
(and suppresses the output of submodule summaries when the config option
|
||||
`status.submoduleSummary` is set).
|
||||
`status.submodulesummary` is set).
|
||||
|
||||
--ignored::
|
||||
Show ignored files as well.
|
||||
@ -215,7 +207,7 @@ If the config variable `status.relativePaths` is set to false, then all
|
||||
paths shown are relative to the repository root, not to the current
|
||||
directory.
|
||||
|
||||
If `status.submoduleSummary` is set to a non zero number or true (identical
|
||||
If `status.submodulesummary` is set to a non zero number or true (identical
|
||||
to -1 or an unlimited number), the submodule summary will be enabled for
|
||||
the long format and a summary of commits for modified submodules will be
|
||||
shown (see --summary-limit option of linkgit:git-submodule[1]). Please note
|
||||
|
@ -10,7 +10,6 @@ SYNOPSIS
|
||||
--------
|
||||
[verse]
|
||||
'git stripspace' [-s | --strip-comments] < input
|
||||
'git stripspace' [-c | --comment-lines] < input
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
|
@ -154,51 +154,27 @@ If `--force` is specified, the submodule's work tree will be removed even if
|
||||
it contains local modifications.
|
||||
|
||||
update::
|
||||
Update the registered submodules, i.e. clone missing submodules and
|
||||
checkout the commit specified in the index of the containing repository.
|
||||
This will make the submodules HEAD be detached unless `--rebase` or
|
||||
`--merge` is specified or the key `submodule.$name.update` is set to
|
||||
`rebase`, `merge` or `none`. `none` can be overridden by specifying
|
||||
`--checkout`. Setting the key `submodule.$name.update` to `!command`
|
||||
will cause `command` to be run. `command` can be any arbitrary shell
|
||||
command that takes a single argument, namely the sha1 to update to.
|
||||
+
|
||||
--
|
||||
Update the registered submodules to match what the superproject
|
||||
expects by cloning missing submodules and updating the working tree of
|
||||
the submodules. The "updating" can be done in several ways depending
|
||||
on command line options and the value of `submodule.<name>.update`
|
||||
configuration variable. Supported update procedures are:
|
||||
|
||||
checkout;; the commit recorded in the superproject will be
|
||||
checked out in the submodule on a detached HEAD. This is
|
||||
done when `--checkout` option is given, or no option is
|
||||
given, and `submodule.<name>.update` is unset, or if it is
|
||||
set to 'checkout'.
|
||||
+
|
||||
If `--force` is specified, the submodule will be checked out (using
|
||||
`git checkout --force` if appropriate), even if the commit specified
|
||||
in the index of the containing repository already matches the commit
|
||||
checked out in the submodule.
|
||||
|
||||
rebase;; the current branch of the submodule will be rebased
|
||||
onto the commit recorded in the superproject. This is done
|
||||
when `--rebase` option is given, or no option is given, and
|
||||
`submodule.<name>.update` is set to 'rebase'.
|
||||
|
||||
merge;; the commit recorded in the superproject will be merged
|
||||
into the current branch in the submodule. This is done
|
||||
when `--merge` option is given, or no option is given, and
|
||||
`submodule.<name>.update` is set to 'merge'.
|
||||
|
||||
custom command;; arbitrary shell command that takes a single
|
||||
argument (the sha1 of the commit recorded in the
|
||||
superproject) is executed. This is done when no option is
|
||||
given, and `submodule.<name>.update` has the form of
|
||||
'!command'.
|
||||
|
||||
When no option is given and `submodule.<name>.update` is set to 'none',
|
||||
the submodule is not updated.
|
||||
|
||||
If the submodule is not yet initialized, and you just want to use the
|
||||
setting as stored in .gitmodules, you can automatically initialize the
|
||||
submodule with the `--init` option.
|
||||
|
||||
+
|
||||
If `--recursive` is specified, this command will recurse into the
|
||||
registered submodules, and update any nested submodules within.
|
||||
--
|
||||
+
|
||||
If `--force` is specified, the submodule will be checked out (using
|
||||
`git checkout --force` if appropriate), even if the commit specified in the
|
||||
index of the containing repository already matches the commit checked out in
|
||||
the submodule.
|
||||
|
||||
summary::
|
||||
Show commit summary between the given commit (defaults to HEAD) and
|
||||
working tree/index. For a submodule in question, a series of commits
|
||||
@ -262,12 +238,10 @@ OPTIONS
|
||||
When running add, allow adding an otherwise ignored submodule path.
|
||||
When running deinit the submodule work trees will be removed even if
|
||||
they contain local changes.
|
||||
When running update (only effective with the checkout procedure),
|
||||
throw away local changes in submodules when switching to a
|
||||
different commit; and always run a checkout operation in the
|
||||
submodule, even if the commit listed in the index of the
|
||||
containing repository matches the commit checked out in the
|
||||
submodule.
|
||||
When running update, throw away local changes in submodules when
|
||||
switching to a different commit; and always run a checkout operation
|
||||
in the submodule, even if the commit listed in the index of the
|
||||
containing repository matches the commit checked out in the submodule.
|
||||
|
||||
--cached::
|
||||
This option is only valid for status and summary commands. These
|
||||
@ -328,7 +302,7 @@ the submodule itself.
|
||||
Checkout the commit recorded in the superproject on a detached HEAD
|
||||
in the submodule. This is the default behavior, the main use of
|
||||
this option is to override `submodule.$name.update` when set to
|
||||
a value other than `checkout`.
|
||||
`merge`, `rebase` or `none`.
|
||||
If the key `submodule.$name.update` is either not explicitly set or
|
||||
set to `checkout`, this option is implicit.
|
||||
|
||||
|
@ -98,13 +98,10 @@ OPTIONS
|
||||
--sort=<type>::
|
||||
Sort in a specific order. Supported type is "refname"
|
||||
(lexicographic order), "version:refname" or "v:refname" (tag
|
||||
names are treated as versions). The "version:refname" sort
|
||||
order can also be affected by the
|
||||
"versionsort.prereleaseSuffix" configuration variable. Prepend
|
||||
"-" to reverse sort order. When this option is not given, the
|
||||
sort order defaults to the value configured for the 'tag.sort'
|
||||
variable if it exists, or lexicographic order otherwise. See
|
||||
linkgit:git-config[1].
|
||||
names are treated as versions). Prepend "-" to reverse sort
|
||||
order. When this option is not given, the sort order defaults to the
|
||||
value configured for the 'tag.sort' variable if it exists, or
|
||||
lexicographic order otherwise. See linkgit:git-config[1].
|
||||
|
||||
--column[=<options>]::
|
||||
--no-column::
|
||||
@ -164,7 +161,7 @@ it in the repository configuration as follows:
|
||||
|
||||
-------------------------------------
|
||||
[user]
|
||||
signingKey = <gpg-key-id>
|
||||
signingkey = <gpg-key-id>
|
||||
-------------------------------------
|
||||
|
||||
|
||||
|
@ -82,18 +82,20 @@ OPTIONS
|
||||
Set the execute permissions on the updated files.
|
||||
|
||||
--[no-]assume-unchanged::
|
||||
When this flag is specified, the object names recorded
|
||||
for the paths are not updated. Instead, this option
|
||||
sets/unsets the "assume unchanged" bit for the
|
||||
paths. When the "assume unchanged" bit is on, the user
|
||||
promises not to change the file and allows Git to assume
|
||||
that the working tree file matches what is recorded in
|
||||
the index. If you want to change the working tree file,
|
||||
you need to unset the bit to tell Git. This is
|
||||
When these flags are specified, the object names recorded
|
||||
for the paths are not updated. Instead, these options
|
||||
set and unset the "assume unchanged" bit for the
|
||||
paths. When the "assume unchanged" bit is on, Git stops
|
||||
checking the working tree files for possible
|
||||
modifications, so you need to manually unset the bit to
|
||||
tell Git when you change the working tree file. This is
|
||||
sometimes helpful when working with a big project on a
|
||||
filesystem that has very slow lstat(2) system call
|
||||
(e.g. cifs).
|
||||
+
|
||||
This option can be also used as a coarse file-level mechanism
|
||||
to ignore uncommitted changes in tracked files (akin to what
|
||||
`.gitignore` does for untracked files).
|
||||
Git will fail (gracefully) in case it needs to modify this file
|
||||
in the index e.g. when merging in a commit;
|
||||
thus, in case the assumed-untracked file is changed upstream,
|
||||
|
@ -43,28 +43,10 @@ unreleased) version of Git, that is available from the 'master'
|
||||
branch of the `git.git` repository.
|
||||
Documentation for older releases are available here:
|
||||
|
||||
* link:v2.4.1/git.html[documentation for release 2.4.1]
|
||||
|
||||
* release notes for
|
||||
link:RelNotes/2.4.1.txt[2.4.1],
|
||||
link:RelNotes/2.4.0.txt[2.4].
|
||||
|
||||
* link:v2.3.8/git.html[documentation for release 2.3.8]
|
||||
|
||||
* release notes for
|
||||
link:RelNotes/2.3.8.txt[2.3.8],
|
||||
link:RelNotes/2.3.7.txt[2.3.7],
|
||||
link:RelNotes/2.3.6.txt[2.3.6],
|
||||
link:RelNotes/2.3.5.txt[2.3.5],
|
||||
link:RelNotes/2.3.4.txt[2.3.4],
|
||||
link:RelNotes/2.3.3.txt[2.3.3],
|
||||
link:RelNotes/2.3.2.txt[2.3.2],
|
||||
link:RelNotes/2.3.1.txt[2.3.1],
|
||||
link:RelNotes/2.3.0.txt[2.3].
|
||||
|
||||
* link:v2.2.2/git.html[documentation for release 2.2.2]
|
||||
* link:v2.2.3/git.html[documentation for release 2.2.3]
|
||||
|
||||
* release notes for
|
||||
link:RelNotes/2.2.3.txt[2.2.3],
|
||||
link:RelNotes/2.2.2.txt[2.2.2],
|
||||
link:RelNotes/2.2.1.txt[2.2.1],
|
||||
link:RelNotes/2.2.0.txt[2.2].
|
||||
@ -779,8 +761,7 @@ Git so take care if using Cogito etc.
|
||||
'GIT_INDEX_VERSION'::
|
||||
This environment variable allows the specification of an index
|
||||
version for new repositories. It won't affect existing index
|
||||
files. By default index file version 2 or 3 is used. See
|
||||
linkgit:git-update-index[1] for more information.
|
||||
files. By default index file version [23] is used.
|
||||
|
||||
'GIT_OBJECT_DIRECTORY'::
|
||||
If the object storage directory is specified via this
|
||||
@ -907,21 +888,19 @@ other
|
||||
and the `core.editor` option in linkgit:git-config[1].
|
||||
|
||||
'GIT_SSH'::
|
||||
'GIT_SSH_COMMAND'::
|
||||
If either of these environment variables is set then 'git fetch'
|
||||
and 'git push' will use the specified command instead of 'ssh'
|
||||
when they need to connect to a remote system.
|
||||
The command will be given exactly two or four arguments: the
|
||||
'username@host' (or just 'host') from the URL and the shell
|
||||
command to execute on that remote system, optionally preceded by
|
||||
'-p' (literally) and the 'port' from the URL when it specifies
|
||||
something other than the default SSH port.
|
||||
If this environment variable is set then 'git fetch'
|
||||
and 'git push' will use this command instead
|
||||
of 'ssh' when they need to connect to a remote system.
|
||||
The '$GIT_SSH' command will be given exactly two or
|
||||
four arguments: the 'username@host' (or just 'host')
|
||||
from the URL and the shell command to execute on that
|
||||
remote system, optionally preceded by '-p' (literally) and
|
||||
the 'port' from the URL when it specifies something other
|
||||
than the default SSH port.
|
||||
+
|
||||
`$GIT_SSH_COMMAND` takes precedence over `$GIT_SSH`, and is interpreted
|
||||
by the shell, which allows additional arguments to be included.
|
||||
`$GIT_SSH` on the other hand must be just the path to a program
|
||||
(which can be a wrapper shell script, if additional arguments are
|
||||
needed).
|
||||
To pass options to the program that you want to list in GIT_SSH
|
||||
you will need to wrap the program and options into a shell script,
|
||||
then set GIT_SSH to refer to the shell script.
|
||||
+
|
||||
Usually it is easier to configure any desired options through your
|
||||
personal `.ssh/config` file. Please consult your ssh documentation
|
||||
@ -931,13 +910,9 @@ for further details.
|
||||
If this environment variable is set, then Git commands which need to
|
||||
acquire passwords or passphrases (e.g. for HTTP or IMAP authentication)
|
||||
will call this program with a suitable prompt as command-line argument
|
||||
and read the password from its STDOUT. See also the 'core.askPass'
|
||||
and read the password from its STDOUT. See also the 'core.askpass'
|
||||
option in linkgit:git-config[1].
|
||||
|
||||
'GIT_TERMINAL_PROMPT'::
|
||||
If this environment variable is set to `0`, git will not prompt
|
||||
on the terminal (e.g., when asking for HTTP authentication).
|
||||
|
||||
'GIT_CONFIG_NOSYSTEM'::
|
||||
Whether to skip reading settings from the system-wide
|
||||
`$(prefix)/etc/gitconfig` file. This environment variable can
|
||||
@ -1038,17 +1013,6 @@ GIT_ICASE_PATHSPECS::
|
||||
variable when it is invoked as the top level command by the
|
||||
end user, to be recorded in the body of the reflog.
|
||||
|
||||
`GIT_REF_PARANOIA`::
|
||||
If set to `1`, include broken or badly named refs when iterating
|
||||
over lists of refs. In a normal, non-corrupted repository, this
|
||||
does nothing. However, enabling it may help git to detect and
|
||||
abort some operations in the presence of broken refs. Git sets
|
||||
this variable automatically when performing destructive
|
||||
operations like linkgit:git-prune[1]. You should not need to set
|
||||
it yourself unless you want to be paranoid about making sure
|
||||
an operation has touched every ref (e.g., because you are
|
||||
cloning a repository to make a backup).
|
||||
|
||||
|
||||
Discussion[[Discussion]]
|
||||
------------------------
|
||||
|
@ -80,7 +80,7 @@ Attributes which should be version-controlled and distributed to other
|
||||
repositories (i.e., attributes of interest to all users) should go into
|
||||
`.gitattributes` files. Attributes that should affect all repositories
|
||||
for a single user should be placed in a file specified by the
|
||||
`core.attributesFile` configuration option (see linkgit:git-config[1]).
|
||||
`core.attributesfile` configuration option (see linkgit:git-config[1]).
|
||||
Its default value is $XDG_CONFIG_HOME/git/attributes. If $XDG_CONFIG_HOME
|
||||
is either not set or empty, $HOME/.config/git/attributes is used instead.
|
||||
Attributes for all users on a system should be placed in the
|
||||
|
@ -32,7 +32,7 @@ strategies to ask the user for usernames and passwords:
|
||||
to the program on the command line, and the user's input is read
|
||||
from its standard output.
|
||||
|
||||
2. Otherwise, if the `core.askPass` configuration variable is set, its
|
||||
2. Otherwise, if the `core.askpass` configuration variable is set, its
|
||||
value is used as above.
|
||||
|
||||
3. Otherwise, if the `SSH_ASKPASS` environment variable is set, its
|
||||
|
@ -341,36 +341,6 @@ Both standard output and standard error output are forwarded to
|
||||
'git send-pack' on the other end, so you can simply `echo` messages
|
||||
for the user.
|
||||
|
||||
push-to-checkout
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
This hook is invoked by 'git-receive-pack' on the remote repository,
|
||||
which happens when a 'git push' is done on a local repository, when
|
||||
the push tries to update the branch that is currently checked out
|
||||
and the `receive.denyCurrentBranch` configuration variable is set to
|
||||
`updateInstead`. Such a push by default is refused if the working
|
||||
tree and the index of the remote repository has any difference from
|
||||
the currently checked out commit; when both the working tree and the
|
||||
index match the current commit, they are updated to match the newly
|
||||
pushed tip of the branch. This hook is to be used to override the
|
||||
default behaviour.
|
||||
|
||||
The hook receives the commit with which the tip of the current
|
||||
branch is going to be updated. It can exit with a non-zero status
|
||||
to refuse the push (when it does so, it must not modify the index or
|
||||
the working tree). Or it can make any necessary changes to the
|
||||
working tree and to the index to bring them to the desired state
|
||||
when the tip of the current branch is updated to the new commit, and
|
||||
exit with a zero status.
|
||||
|
||||
For example, the hook can simply run `git read-tree -u -m HEAD "$1"`
|
||||
in order to emulate 'git fetch' that is run in the reverse direction
|
||||
with `git push`, as the two-tree form of `read-tree -u -m` is
|
||||
essentially the same as `git checkout` that switches branches while
|
||||
keeping the local changes in the working tree that do not interfere
|
||||
with the difference between the branches.
|
||||
|
||||
|
||||
pre-auto-gc
|
||||
~~~~~~~~~~~
|
||||
|
||||
|
@ -38,7 +38,7 @@ precedence, the last matching pattern decides the outcome):
|
||||
* Patterns read from `$GIT_DIR/info/exclude`.
|
||||
|
||||
* Patterns read from the file specified by the configuration
|
||||
variable 'core.excludesFile'.
|
||||
variable 'core.excludesfile'.
|
||||
|
||||
Which file to place a pattern in depends on how the pattern is meant to
|
||||
be used.
|
||||
@ -56,7 +56,7 @@ be used.
|
||||
* Patterns which a user wants Git to
|
||||
ignore in all situations (e.g., backup or temporary files generated by
|
||||
the user's editor of choice) generally go into a file specified by
|
||||
`core.excludesFile` in the user's `~/.gitconfig`. Its default value is
|
||||
`core.excludesfile` in the user's `~/.gitconfig`. Its default value is
|
||||
$XDG_CONFIG_HOME/git/ignore. If $XDG_CONFIG_HOME is either not set or
|
||||
empty, $HOME/.config/git/ignore is used instead.
|
||||
|
||||
@ -138,6 +138,9 @@ NOTES
|
||||
The purpose of gitignore files is to ensure that certain files
|
||||
not tracked by Git remain untracked.
|
||||
|
||||
To ignore uncommitted changes in a file that is already tracked,
|
||||
use 'git update-index {litdd}assume-unchanged'.
|
||||
|
||||
To stop tracking a file that is currently tracked, use
|
||||
'git rm --cached'.
|
||||
|
||||
@ -200,6 +203,7 @@ everything within `foo/bar`):
|
||||
SEE ALSO
|
||||
--------
|
||||
linkgit:git-rm[1],
|
||||
linkgit:git-update-index[1],
|
||||
linkgit:gitrepository-layout[5],
|
||||
linkgit:git-check-ignore[1]
|
||||
|
||||
|
@ -99,10 +99,10 @@ linkgit:git-rev-list[1] for a complete list.
|
||||
detailed explanation.)
|
||||
|
||||
-L<start>,<end>:<file>::
|
||||
-L:<funcname>:<file>::
|
||||
-L:<regex>:<file>::
|
||||
|
||||
Trace the evolution of the line range given by "<start>,<end>"
|
||||
(or the function name regex <funcname>) within the <file>. You may
|
||||
(or the funcname regex <regex>) 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.
|
||||
|
@ -38,15 +38,18 @@ submodule.<name>.url::
|
||||
In addition, there are a number of optional keys:
|
||||
|
||||
submodule.<name>.update::
|
||||
Defines the default update procedure for the named submodule,
|
||||
i.e. how the submodule is updated by "git submodule update"
|
||||
command in the superproject. This is only used by `git
|
||||
submodule init` to initialize the configuration variable of
|
||||
the same name. Allowed values here are 'checkout', 'rebase',
|
||||
'merge' or 'none'. See description of 'update' command in
|
||||
linkgit:git-submodule[1] for their meaning. Note that the
|
||||
'!command' form is intentionally ignored here for security
|
||||
reasons.
|
||||
Defines what to do when the submodule is updated by the superproject.
|
||||
If 'checkout' (the default), the new commit specified in the
|
||||
superproject will be checked out in the submodule on a detached HEAD.
|
||||
If 'rebase', the current branch of the submodule will be rebased onto
|
||||
the commit specified in the superproject. If 'merge', the commit
|
||||
specified in the superproject will be merged into the current branch
|
||||
in the submodule.
|
||||
If 'none', the submodule with name `$name` will not be updated
|
||||
by default.
|
||||
|
||||
This config option is overridden if 'git submodule update' is given
|
||||
the '--merge', '--rebase' or '--checkout' options.
|
||||
|
||||
submodule.<name>.branch::
|
||||
A remote branch name for tracking updates in the upstream submodule.
|
||||
|
@ -482,7 +482,7 @@ project config. Per-repository configuration takes precedence over value
|
||||
composed from `@git_base_url_list` elements and project name.
|
||||
+
|
||||
You can setup one single value (single entry/item in this list) at build
|
||||
time by setting the `GITWEB_BASE_URL` build-time configuration variable.
|
||||
time by setting the `GITWEB_BASE_URL` built-time configuration variable.
|
||||
By default it is set to (), i.e. an empty list. This means that gitweb
|
||||
would not try to create project URL (to fetch) from project name.
|
||||
|
||||
@ -706,7 +706,7 @@ show-sizes::
|
||||
I/O. Enabled by default.
|
||||
+
|
||||
This feature can be configured on a per-repository basis via
|
||||
repository's `gitweb.showSizes` configuration variable (boolean).
|
||||
repository's `gitweb.showsizes` configuration variable (boolean).
|
||||
|
||||
patches::
|
||||
Enable and configure "patches" view, which displays list of commits in email
|
||||
|
@ -240,240 +240,3 @@ But more importantly, git's hashing and checksumming noticed a problem
|
||||
that easily could have gone undetected in another system. The result
|
||||
still compiled, but would have caused an interesting bug (that would
|
||||
have been blamed on some random commit).
|
||||
|
||||
|
||||
The adventure continues...
|
||||
--------------------------
|
||||
|
||||
I ended up doing this again! Same entity, new hardware. The assumption
|
||||
at this point is that the old disk corrupted the packfile, and then the
|
||||
corruption was migrated to the new hardware (because it was done by
|
||||
rsync or similar, and no fsck was done at the time of migration).
|
||||
|
||||
This time, the affected blob was over 20 megabytes, which was far too
|
||||
large to do a brute-force on. I followed the instructions above to
|
||||
create the `zlib` file. I then used the `inflate` program below to pull
|
||||
the corrupted data from that. Examining that output gave me a hint about
|
||||
where in the file the corruption was. But now I was working with the
|
||||
file itself, not the zlib contents. So knowing the sha1 of the object
|
||||
and the approximate area of the corruption, I used the `sha1-munge`
|
||||
program below to brute-force the correct byte.
|
||||
|
||||
Here's the inflate program (it's essentially `gunzip` but without the
|
||||
`.gz` header processing):
|
||||
|
||||
--------------------------
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <zlib.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
/*
|
||||
* oversized so we can read the whole buffer in;
|
||||
* this could actually be switched to streaming
|
||||
* to avoid any memory limitations
|
||||
*/
|
||||
static unsigned char buf[25 * 1024 * 1024];
|
||||
static unsigned char out[25 * 1024 * 1024];
|
||||
int len;
|
||||
z_stream z;
|
||||
int ret;
|
||||
|
||||
len = read(0, buf, sizeof(buf));
|
||||
memset(&z, 0, sizeof(z));
|
||||
inflateInit(&z);
|
||||
|
||||
z.next_in = buf;
|
||||
z.avail_in = len;
|
||||
z.next_out = out;
|
||||
z.avail_out = sizeof(out);
|
||||
|
||||
ret = inflate(&z, 0);
|
||||
if (ret != Z_OK && ret != Z_STREAM_END)
|
||||
fprintf(stderr, "initial inflate failed (%d)\n", ret);
|
||||
|
||||
fprintf(stderr, "outputting %lu bytes", z.total_out);
|
||||
fwrite(out, 1, z.total_out, stdout);
|
||||
return 0;
|
||||
}
|
||||
--------------------------
|
||||
|
||||
And here is the `sha1-munge` program:
|
||||
|
||||
--------------------------
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <openssl/sha.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* eye candy */
|
||||
static int counter = 0;
|
||||
static void progress(int sig)
|
||||
{
|
||||
fprintf(stderr, "\r%d", counter);
|
||||
alarm(1);
|
||||
}
|
||||
|
||||
static const signed char hexval_table[256] = {
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* 00-07 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* 08-0f */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* 10-17 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* 18-1f */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* 20-27 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* 28-2f */
|
||||
0, 1, 2, 3, 4, 5, 6, 7, /* 30-37 */
|
||||
8, 9, -1, -1, -1, -1, -1, -1, /* 38-3f */
|
||||
-1, 10, 11, 12, 13, 14, 15, -1, /* 40-47 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* 48-4f */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* 50-57 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* 58-5f */
|
||||
-1, 10, 11, 12, 13, 14, 15, -1, /* 60-67 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* 68-67 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* 70-77 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* 78-7f */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* 80-87 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* 88-8f */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* 90-97 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* 98-9f */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* a0-a7 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* a8-af */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* b0-b7 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* b8-bf */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* c0-c7 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* c8-cf */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* d0-d7 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* d8-df */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* e0-e7 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* e8-ef */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* f0-f7 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* f8-ff */
|
||||
};
|
||||
|
||||
static inline unsigned int hexval(unsigned char c)
|
||||
{
|
||||
return hexval_table[c];
|
||||
}
|
||||
|
||||
static int get_sha1_hex(const char *hex, unsigned char *sha1)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 20; i++) {
|
||||
unsigned int val;
|
||||
/*
|
||||
* hex[1]=='\0' is caught when val is checked below,
|
||||
* but if hex[0] is NUL we have to avoid reading
|
||||
* past the end of the string:
|
||||
*/
|
||||
if (!hex[0])
|
||||
return -1;
|
||||
val = (hexval(hex[0]) << 4) | hexval(hex[1]);
|
||||
if (val & ~0xff)
|
||||
return -1;
|
||||
*sha1++ = val;
|
||||
hex += 2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
/* oversized so we can read the whole buffer in */
|
||||
static unsigned char buf[25 * 1024 * 1024];
|
||||
char header[32];
|
||||
int header_len;
|
||||
unsigned char have[20], want[20];
|
||||
int start, len;
|
||||
SHA_CTX orig;
|
||||
unsigned i, j;
|
||||
|
||||
if (!argv[1] || get_sha1_hex(argv[1], want)) {
|
||||
fprintf(stderr, "usage: sha1-munge <sha1> [start] <file.in\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (argv[2])
|
||||
start = atoi(argv[2]);
|
||||
else
|
||||
start = 0;
|
||||
|
||||
len = read(0, buf, sizeof(buf));
|
||||
header_len = sprintf(header, "blob %d", len) + 1;
|
||||
fprintf(stderr, "using header: %s\n", header);
|
||||
|
||||
/*
|
||||
* We keep a running sha1 so that if you are munging
|
||||
* near the end of the file, we do not have to re-sha1
|
||||
* the unchanged earlier bytes
|
||||
*/
|
||||
SHA1_Init(&orig);
|
||||
SHA1_Update(&orig, header, header_len);
|
||||
if (start)
|
||||
SHA1_Update(&orig, buf, start);
|
||||
|
||||
signal(SIGALRM, progress);
|
||||
alarm(1);
|
||||
|
||||
for (i = start; i < len; i++) {
|
||||
unsigned char c;
|
||||
SHA_CTX x;
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* deletion -- this would not actually work in practice,
|
||||
* I think, because we've already committed to a
|
||||
* particular size in the header. Ditto for addition
|
||||
* below. In those cases, you'd have to do the whole
|
||||
* sha1 from scratch, or possibly keep three running
|
||||
* "orig" sha1 computations going.
|
||||
*/
|
||||
memcpy(&x, &orig, sizeof(x));
|
||||
SHA1_Update(&x, buf + i + 1, len - i - 1);
|
||||
SHA1_Final(have, &x);
|
||||
if (!memcmp(have, want, 20))
|
||||
printf("i=%d, deletion\n", i);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* replacement -- note that this tries each of the 256
|
||||
* possible bytes. If you suspect a single-bit flip,
|
||||
* it would be much shorter to just try the 8
|
||||
* bit-flipped variants.
|
||||
*/
|
||||
c = buf[i];
|
||||
for (j = 0; j <= 0xff; j++) {
|
||||
buf[i] = j;
|
||||
|
||||
memcpy(&x, &orig, sizeof(x));
|
||||
SHA1_Update(&x, buf + i, len - i);
|
||||
SHA1_Final(have, &x);
|
||||
if (!memcmp(have, want, 20))
|
||||
printf("i=%d, j=%02x\n", i, j);
|
||||
}
|
||||
buf[i] = c;
|
||||
|
||||
#if 0
|
||||
/* addition */
|
||||
for (j = 0; j <= 0xff; j++) {
|
||||
unsigned char extra = j;
|
||||
memcpy(&x, &orig, sizeof(x));
|
||||
SHA1_Update(&x, &extra, 1);
|
||||
SHA1_Update(&x, buf + i, len - i);
|
||||
SHA1_Final(have, &x);
|
||||
if (!memcmp(have, want, 20))
|
||||
printf("i=%d, addition=%02x", i, j);
|
||||
}
|
||||
#endif
|
||||
|
||||
SHA1_Update(&orig, buf + i, 1);
|
||||
counter++;
|
||||
}
|
||||
|
||||
alarm(0);
|
||||
fprintf(stderr, "\r%d\n", counter);
|
||||
return 0;
|
||||
}
|
||||
--------------------------
|
||||
|
@ -22,9 +22,8 @@ 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
|
||||
regular expression that denotes the range from the first funcname line
|
||||
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.
|
||||
If ``:<regex>'' is given in place of <start> and <end>, it denotes the range
|
||||
from the first funcname line that matches <regex>, up to the next
|
||||
funcname line. ``:<regex>'' searches from the end of the previous `-L` range,
|
||||
if any, otherwise from the start of file.
|
||||
``^:<regex>'' searches from the start of file.
|
||||
|
@ -1,4 +1,4 @@
|
||||
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,
|
||||
|
@ -3,13 +3,9 @@
|
||||
|
||||
Pretty-print the contents of the commit logs in a given format,
|
||||
where '<format>' can be one of 'oneline', 'short', 'medium',
|
||||
'full', 'fuller', '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'.
|
||||
'full', 'fuller', 'email', 'raw' and 'format:<string>'. See
|
||||
the "PRETTY FORMATS" section for some additional details for each
|
||||
format. When omitted, the format defaults to 'medium'.
|
||||
+
|
||||
Note: you can specify the default pretty format in the repository
|
||||
configuration (see linkgit:git-config[1]).
|
||||
|
@ -59,17 +59,13 @@ endif::git-rev-list[]
|
||||
matches any of the given patterns are chosen (but see
|
||||
`--all-match`).
|
||||
+
|
||||
When `--show-notes` is in effect, the message from the notes is
|
||||
matched as if it were part of the log message.
|
||||
When `--show-notes` is in effect, the message from the notes as
|
||||
if it is part of the log message.
|
||||
|
||||
--all-match::
|
||||
Limit the commits output to ones that match all given `--grep`,
|
||||
instead of ones that match at least one.
|
||||
|
||||
--invert-grep::
|
||||
Limit the commits output to ones with log message that do not
|
||||
match the pattern specified with `--grep=<pattern>`.
|
||||
|
||||
-i::
|
||||
--regexp-ignore-case::
|
||||
Match the regular expression limiting patterns without regard to letter
|
||||
@ -123,8 +119,7 @@ parents) and `--max-parents=-1` (negative numbers denote no upper limit).
|
||||
because merges into a topic branch tend to be only about
|
||||
adjusting to updated upstream from time to time, and
|
||||
this option allows you to ignore the individual commits
|
||||
brought in to your history by such a merge. Cannot be
|
||||
combined with --bisect.
|
||||
brought in to your history by such a merge.
|
||||
|
||||
--not::
|
||||
Reverses the meaning of the '{caret}' prefix (or lack thereof)
|
||||
@ -177,6 +172,11 @@ explicitly.
|
||||
Pretend as if all objects mentioned by reflogs are listed on the
|
||||
command line as `<commit>`.
|
||||
|
||||
--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.
|
||||
|
||||
--ignore-missing::
|
||||
Upon seeing an invalid object name in the input, pretend as if
|
||||
the bad input was not given.
|
||||
@ -186,7 +186,7 @@ ifndef::git-rev-list[]
|
||||
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. Cannot be combined with --first-parent.
|
||||
line.
|
||||
endif::git-rev-list[]
|
||||
|
||||
--stdin::
|
||||
@ -567,7 +567,7 @@ outputs 'midpoint', the output of the two commands
|
||||
would be of roughly the same length. Finding the change which
|
||||
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. Cannot be combined with --first-parent.
|
||||
one.
|
||||
|
||||
--bisect-vars::
|
||||
This calculates the same as `--bisect`, except that refs in
|
||||
@ -644,7 +644,6 @@ Object Traversal
|
||||
|
||||
These options are mostly targeted for packing of Git repositories.
|
||||
|
||||
ifdef::git-rev-list[]
|
||||
--objects::
|
||||
Print the object IDs of any object referenced by the listed
|
||||
commits. `--objects foo ^bar` thus means ``send me
|
||||
@ -654,24 +653,13 @@ ifdef::git-rev-list[]
|
||||
--objects-edge::
|
||||
Similar to `--objects`, but also print the IDs of excluded
|
||||
commits prefixed with a ``-'' character. This is used by
|
||||
linkgit:git-pack-objects[1] to build a ``thin'' pack, which records
|
||||
linkgit:git-pack-objects[1] to build ``thin'' pack, which records
|
||||
objects in deltified form based on objects contained in these
|
||||
excluded commits to reduce network traffic.
|
||||
|
||||
--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::
|
||||
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::
|
||||
Only useful with `--objects`; print the object IDs that are not
|
||||
in packs.
|
||||
endif::git-rev-list[]
|
||||
|
||||
--no-walk[=(sorted|unsorted)]::
|
||||
Only show the given commits, but do not traverse their ancestors.
|
||||
@ -680,7 +668,6 @@ endif::git-rev-list[]
|
||||
given on the command line. Otherwise (if `sorted` or no argument
|
||||
was given), the commits are shown in reverse chronological order
|
||||
by commit time.
|
||||
Cannot be combined with `--graph`.
|
||||
|
||||
--do-walk::
|
||||
Overrides a previous `--no-walk`.
|
||||
@ -783,7 +770,6 @@ you would get an output like this:
|
||||
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
|
||||
to be drawn properly.
|
||||
Cannot be combined with `--no-walk`.
|
||||
+
|
||||
This enables parent rewriting, see 'History Simplification' below.
|
||||
+
|
||||
|
@ -248,10 +248,7 @@ FORMAT` in linkgit:git-credential[7] for a detailed specification).
|
||||
For a `get` operation, the helper should produce a list of attributes
|
||||
on stdout in the same format. A helper is free to produce a subset, or
|
||||
even no values at all if it has nothing useful to provide. Any provided
|
||||
attributes will overwrite those already known about by Git. If a helper
|
||||
outputs a `quit` attribute with a value of `true` or `1`, no further
|
||||
helpers will be consulted, nor will the user be prompted (if no
|
||||
credential has been provided, the operation will then fail).
|
||||
attributes will overwrite those already known about by Git.
|
||||
|
||||
For a `store` or `erase` operation, the helper's output is ignored.
|
||||
If it fails to perform the requested operation, it may complain to
|
||||
|
@ -1,75 +0,0 @@
|
||||
Error reporting in git
|
||||
======================
|
||||
|
||||
`die`, `usage`, `error`, and `warning` report errors of various
|
||||
kinds.
|
||||
|
||||
- `die` is for fatal application errors. It prints a message to
|
||||
the user and exits with status 128.
|
||||
|
||||
- `usage` is for errors in command line usage. After printing its
|
||||
message, it exits with status 129. (See also `usage_with_options`
|
||||
in the link:api-parse-options.html[parse-options API].)
|
||||
|
||||
- `error` is for non-fatal library errors. It prints a message
|
||||
to the user and returns -1 for convenience in signaling the error
|
||||
to the caller.
|
||||
|
||||
- `warning` is for reporting situations that probably should not
|
||||
occur but which the user (and Git) can continue to work around
|
||||
without running into too many problems. Like `error`, it
|
||||
returns -1 after reporting the situation to the caller.
|
||||
|
||||
Customizable error handlers
|
||||
---------------------------
|
||||
|
||||
The default behavior of `die` and `error` is to write a message to
|
||||
stderr and then exit or return as appropriate. This behavior can be
|
||||
overridden using `set_die_routine` and `set_error_routine`. For
|
||||
example, "git daemon" uses set_die_routine to write the reason `die`
|
||||
was called to syslog before exiting.
|
||||
|
||||
Library errors
|
||||
--------------
|
||||
|
||||
Functions return a negative integer on error. Details beyond that
|
||||
vary from function to function:
|
||||
|
||||
- Some functions return -1 for all errors. Others return a more
|
||||
specific value depending on how the caller might want to react
|
||||
to the error.
|
||||
|
||||
- Some functions report the error to stderr with `error`,
|
||||
while others leave that for the caller to do.
|
||||
|
||||
- errno is not meaningful on return from most functions (except
|
||||
for thin wrappers for system calls).
|
||||
|
||||
Check the function's API documentation to be sure.
|
||||
|
||||
Caller-handled errors
|
||||
---------------------
|
||||
|
||||
An increasing number of functions take a parameter 'struct strbuf *err'.
|
||||
On error, such functions append a message about what went wrong to the
|
||||
'err' strbuf. The message is meant to be complete enough to be passed
|
||||
to `die` or `error` as-is. For example:
|
||||
|
||||
if (ref_transaction_commit(transaction, &err))
|
||||
die("%s", err.buf);
|
||||
|
||||
The 'err' parameter will be untouched if no error occurred, so multiple
|
||||
function calls can be chained:
|
||||
|
||||
t = ref_transaction_begin(&err);
|
||||
if (!t ||
|
||||
ref_transaction_update(t, "HEAD", ..., &err) ||
|
||||
ret_transaction_commit(t, &err))
|
||||
die("%s", err.buf);
|
||||
|
||||
The 'err' parameter must be a pointer to a valid strbuf. To silence
|
||||
a message, pass a strbuf that is explicitly ignored:
|
||||
|
||||
if (thing_that_can_fail_in_an_ignorable_way(..., &err))
|
||||
/* This failure is okay. */
|
||||
strbuf_reset(&err);
|
351
Documentation/technical/api-strbuf.txt
Normal file
351
Documentation/technical/api-strbuf.txt
Normal file
@ -0,0 +1,351 @@
|
||||
strbuf API
|
||||
==========
|
||||
|
||||
strbuf's are meant to be used with all the usual C string and memory
|
||||
APIs. Given that the length of the buffer is known, it's often better to
|
||||
use the mem* functions than a str* one (memchr vs. strchr e.g.).
|
||||
Though, one has to be careful about the fact that str* functions often
|
||||
stop on NULs and that strbufs may have embedded NULs.
|
||||
|
||||
A strbuf is NUL terminated for convenience, but no function in the
|
||||
strbuf API actually relies on the string being free of NULs.
|
||||
|
||||
strbufs have some invariants that are very important to keep in mind:
|
||||
|
||||
. The `buf` member is never NULL, so it can be used in any usual C
|
||||
string operations safely. strbuf's _have_ to be initialized either by
|
||||
`strbuf_init()` or by `= STRBUF_INIT` before the invariants, though.
|
||||
+
|
||||
Do *not* assume anything on what `buf` really is (e.g. if it is
|
||||
allocated memory or not), use `strbuf_detach()` to unwrap a memory
|
||||
buffer from its strbuf shell in a safe way. That is the sole supported
|
||||
way. This will give you a malloced buffer that you can later `free()`.
|
||||
+
|
||||
However, it is totally safe to modify anything in the string pointed by
|
||||
the `buf` member, between the indices `0` and `len-1` (inclusive).
|
||||
|
||||
. The `buf` member is a byte array that has at least `len + 1` bytes
|
||||
allocated. The extra byte is used to store a `'\0'`, allowing the
|
||||
`buf` member to be a valid C-string. Every strbuf function ensure this
|
||||
invariant is preserved.
|
||||
+
|
||||
NOTE: It is OK to "play" with the buffer directly if you work it this
|
||||
way:
|
||||
+
|
||||
----
|
||||
strbuf_grow(sb, SOME_SIZE); <1>
|
||||
strbuf_setlen(sb, sb->len + SOME_OTHER_SIZE);
|
||||
----
|
||||
<1> Here, the memory array starting at `sb->buf`, and of length
|
||||
`strbuf_avail(sb)` is all yours, and you can be sure that
|
||||
`strbuf_avail(sb)` is at least `SOME_SIZE`.
|
||||
+
|
||||
NOTE: `SOME_OTHER_SIZE` must be smaller or equal to `strbuf_avail(sb)`.
|
||||
+
|
||||
Doing so is safe, though if it has to be done in many places, adding the
|
||||
missing API to the strbuf module is the way to go.
|
||||
+
|
||||
WARNING: Do _not_ assume that the area that is yours is of size `alloc
|
||||
- 1` even if it's true in the current implementation. Alloc is somehow a
|
||||
"private" member that should not be messed with. Use `strbuf_avail()`
|
||||
instead.
|
||||
|
||||
Data structures
|
||||
---------------
|
||||
|
||||
* `struct strbuf`
|
||||
|
||||
This is the string buffer structure. The `len` member can be used to
|
||||
determine the current length of the string, and `buf` member provides
|
||||
access to the string itself.
|
||||
|
||||
Functions
|
||||
---------
|
||||
|
||||
* Life cycle
|
||||
|
||||
`strbuf_init`::
|
||||
|
||||
Initialize the structure. The second parameter can be zero or a bigger
|
||||
number to allocate memory, in case you want to prevent further reallocs.
|
||||
|
||||
`strbuf_release`::
|
||||
|
||||
Release a string buffer and the memory it used. You should not use the
|
||||
string buffer after using this function, unless you initialize it again.
|
||||
|
||||
`strbuf_detach`::
|
||||
|
||||
Detach the string from the strbuf and returns it; you now own the
|
||||
storage the string occupies and it is your responsibility from then on
|
||||
to release it with `free(3)` when you are done with it.
|
||||
|
||||
`strbuf_attach`::
|
||||
|
||||
Attach a string to a buffer. You should specify the string to attach,
|
||||
the current length of the string and the amount of allocated memory.
|
||||
The amount must be larger than the string length, because the string you
|
||||
pass is supposed to be a NUL-terminated string. This string _must_ be
|
||||
malloc()ed, and after attaching, the pointer cannot be relied upon
|
||||
anymore, and neither be free()d directly.
|
||||
|
||||
`strbuf_swap`::
|
||||
|
||||
Swap the contents of two string buffers.
|
||||
|
||||
* Related to the size of the buffer
|
||||
|
||||
`strbuf_avail`::
|
||||
|
||||
Determine the amount of allocated but unused memory.
|
||||
|
||||
`strbuf_grow`::
|
||||
|
||||
Ensure that at least this amount of unused memory is available after
|
||||
`len`. This is used when you know a typical size for what you will add
|
||||
and want to avoid repetitive automatic resizing of the underlying buffer.
|
||||
This is never a needed operation, but can be critical for performance in
|
||||
some cases.
|
||||
|
||||
`strbuf_setlen`::
|
||||
|
||||
Set the length of the buffer to a given value. This function does *not*
|
||||
allocate new memory, so you should not perform a `strbuf_setlen()` to a
|
||||
length that is larger than `len + strbuf_avail()`. `strbuf_setlen()` is
|
||||
just meant as a 'please fix invariants from this strbuf I just messed
|
||||
with'.
|
||||
|
||||
`strbuf_reset`::
|
||||
|
||||
Empty the buffer by setting the size of it to zero.
|
||||
|
||||
* Related to the contents of the buffer
|
||||
|
||||
`strbuf_trim`::
|
||||
|
||||
Strip whitespace from the beginning and end of a string.
|
||||
Equivalent to performing `strbuf_rtrim()` followed by `strbuf_ltrim()`.
|
||||
|
||||
`strbuf_rtrim`::
|
||||
|
||||
Strip whitespace from the end of a string.
|
||||
|
||||
`strbuf_ltrim`::
|
||||
|
||||
Strip whitespace from the beginning of a string.
|
||||
|
||||
`strbuf_reencode`::
|
||||
|
||||
Replace the contents of the strbuf with a reencoded form. Returns -1
|
||||
on error, 0 on success.
|
||||
|
||||
`strbuf_tolower`::
|
||||
|
||||
Lowercase each character in the buffer using `tolower`.
|
||||
|
||||
`strbuf_cmp`::
|
||||
|
||||
Compare two buffers. Returns an integer less than, equal to, or greater
|
||||
than zero if the first buffer is found, respectively, to be less than,
|
||||
to match, or be greater than the second buffer.
|
||||
|
||||
* Adding data to the buffer
|
||||
|
||||
NOTE: All of the functions in this section will grow the buffer as necessary.
|
||||
If they fail for some reason other than memory shortage and the buffer hadn't
|
||||
been allocated before (i.e. the `struct strbuf` was set to `STRBUF_INIT`),
|
||||
then they will free() it.
|
||||
|
||||
`strbuf_addch`::
|
||||
|
||||
Add a single character to the buffer.
|
||||
|
||||
`strbuf_addchars`::
|
||||
|
||||
Add a character the specified number of times to the buffer.
|
||||
|
||||
`strbuf_insert`::
|
||||
|
||||
Insert data to the given position of the buffer. The remaining contents
|
||||
will be shifted, not overwritten.
|
||||
|
||||
`strbuf_remove`::
|
||||
|
||||
Remove given amount of data from a given position of the buffer.
|
||||
|
||||
`strbuf_splice`::
|
||||
|
||||
Remove the bytes between `pos..pos+len` and replace it with the given
|
||||
data.
|
||||
|
||||
`strbuf_add_commented_lines`::
|
||||
|
||||
Add a NUL-terminated string to the buffer. Each line will be prepended
|
||||
by a comment character and a blank.
|
||||
|
||||
`strbuf_add`::
|
||||
|
||||
Add data of given length to the buffer.
|
||||
|
||||
`strbuf_addstr`::
|
||||
|
||||
Add a NUL-terminated string to the buffer.
|
||||
+
|
||||
NOTE: This function will *always* be implemented as an inline or a macro
|
||||
that expands to:
|
||||
+
|
||||
----
|
||||
strbuf_add(..., s, strlen(s));
|
||||
----
|
||||
+
|
||||
Meaning that this is efficient to write things like:
|
||||
+
|
||||
----
|
||||
strbuf_addstr(sb, "immediate string");
|
||||
----
|
||||
|
||||
`strbuf_addbuf`::
|
||||
|
||||
Copy the contents of another buffer at the end of the current one.
|
||||
|
||||
`strbuf_adddup`::
|
||||
|
||||
Copy part of the buffer from a given position till a given length to the
|
||||
end of the buffer.
|
||||
|
||||
`strbuf_expand`::
|
||||
|
||||
This function can be used to expand a format string containing
|
||||
placeholders. To that end, it parses the string and calls the specified
|
||||
function for every percent sign found.
|
||||
+
|
||||
The callback function is given a pointer to the character after the `%`
|
||||
and a pointer to the struct strbuf. It is expected to add the expanded
|
||||
version of the placeholder to the strbuf, e.g. to add a newline
|
||||
character if the letter `n` appears after a `%`. The function returns
|
||||
the length of the placeholder recognized and `strbuf_expand()` skips
|
||||
over it.
|
||||
+
|
||||
The format `%%` is automatically expanded to a single `%` as a quoting
|
||||
mechanism; callers do not need to handle the `%` placeholder themselves,
|
||||
and the callback function will not be invoked for this placeholder.
|
||||
+
|
||||
All other characters (non-percent and not skipped ones) are copied
|
||||
verbatim to the strbuf. If the callback returned zero, meaning that the
|
||||
placeholder is unknown, then the percent sign is copied, too.
|
||||
+
|
||||
In order to facilitate caching and to make it possible to give
|
||||
parameters to the callback, `strbuf_expand()` passes a context pointer,
|
||||
which can be used by the programmer of the callback as she sees fit.
|
||||
|
||||
`strbuf_expand_dict_cb`::
|
||||
|
||||
Used as callback for `strbuf_expand()`, expects an array of
|
||||
struct strbuf_expand_dict_entry as context, i.e. pairs of
|
||||
placeholder and replacement string. The array needs to be
|
||||
terminated by an entry with placeholder set to NULL.
|
||||
|
||||
`strbuf_addbuf_percentquote`::
|
||||
|
||||
Append the contents of one strbuf to another, quoting any
|
||||
percent signs ("%") into double-percents ("%%") in the
|
||||
destination. This is useful for literal data to be fed to either
|
||||
strbuf_expand or to the *printf family of functions.
|
||||
|
||||
`strbuf_humanise_bytes`::
|
||||
|
||||
Append the given byte size as a human-readable string (i.e. 12.23 KiB,
|
||||
3.50 MiB).
|
||||
|
||||
`strbuf_addf`::
|
||||
|
||||
Add a formatted string to the buffer.
|
||||
|
||||
`strbuf_commented_addf`::
|
||||
|
||||
Add a formatted string prepended by a comment character and a
|
||||
blank to the buffer.
|
||||
|
||||
`strbuf_fread`::
|
||||
|
||||
Read a given size of data from a FILE* pointer to the buffer.
|
||||
+
|
||||
NOTE: The buffer is rewound if the read fails. If -1 is returned,
|
||||
`errno` must be consulted, like you would do for `read(3)`.
|
||||
`strbuf_read()`, `strbuf_read_file()` and `strbuf_getline()` has the
|
||||
same behaviour as well.
|
||||
|
||||
`strbuf_read`::
|
||||
|
||||
Read the contents of a given file descriptor. The third argument can be
|
||||
used to give a hint about the file size, to avoid reallocs.
|
||||
|
||||
`strbuf_read_file`::
|
||||
|
||||
Read the contents of a file, specified by its path. The third argument
|
||||
can be used to give a hint about the file size, to avoid reallocs.
|
||||
|
||||
`strbuf_readlink`::
|
||||
|
||||
Read the target of a symbolic link, specified by its path. The third
|
||||
argument can be used to give a hint about the size, to avoid reallocs.
|
||||
|
||||
`strbuf_getline`::
|
||||
|
||||
Read a line from a FILE *, overwriting the existing contents
|
||||
of the strbuf. The second argument specifies the line
|
||||
terminator character, typically `'\n'`.
|
||||
Reading stops after the terminator or at EOF. The terminator
|
||||
is removed from the buffer before returning. Returns 0 unless
|
||||
there was nothing left before EOF, in which case it returns `EOF`.
|
||||
|
||||
`strbuf_getwholeline`::
|
||||
|
||||
Like `strbuf_getline`, but keeps the trailing terminator (if
|
||||
any) in the buffer.
|
||||
|
||||
`strbuf_getwholeline_fd`::
|
||||
|
||||
Like `strbuf_getwholeline`, but operates on a file descriptor.
|
||||
It reads one character at a time, so it is very slow. Do not
|
||||
use it unless you need the correct position in the file
|
||||
descriptor.
|
||||
|
||||
`strbuf_getcwd`::
|
||||
|
||||
Set the buffer to the path of the current working directory.
|
||||
|
||||
`strbuf_add_absolute_path`
|
||||
|
||||
Add a path to a buffer, converting a relative path to an
|
||||
absolute one in the process. Symbolic links are not
|
||||
resolved.
|
||||
|
||||
`stripspace`::
|
||||
|
||||
Strip whitespace from a buffer. The second parameter controls if
|
||||
comments are considered contents to be removed or not.
|
||||
|
||||
`strbuf_split_buf`::
|
||||
`strbuf_split_str`::
|
||||
`strbuf_split_max`::
|
||||
`strbuf_split`::
|
||||
|
||||
Split a string or strbuf into a list of strbufs at a specified
|
||||
terminator character. The returned substrings include the
|
||||
terminator characters. Some of these functions take a `max`
|
||||
parameter, which, if positive, limits the output to that
|
||||
number of substrings.
|
||||
|
||||
`strbuf_list_free`::
|
||||
|
||||
Free a list of strbufs (for example, the return values of the
|
||||
`strbuf_split()` functions).
|
||||
|
||||
`launch_editor`::
|
||||
|
||||
Launch the user preferred editor to edit a file and fill the buffer
|
||||
with the file's contents upon the user completing their editing. The
|
||||
third argument can be used to set the environment which the editor is
|
||||
run in. If the buffer is NULL the editor is launched as usual but the
|
||||
file's contents are not read into the buffer upon completion.
|
@ -29,7 +29,7 @@ member (you need this if you add things later) and you should set the
|
||||
`unsorted_string_list_has_string` and get it from the list using
|
||||
`string_list_lookup` for sorted lists.
|
||||
|
||||
. Can sort an unsorted list using `string_list_sort`.
|
||||
. Can sort an unsorted list using `sort_string_list`.
|
||||
|
||||
. Can remove duplicate items from a sorted list using
|
||||
`string_list_remove_duplicates`.
|
||||
@ -146,7 +146,7 @@ write `string_list_insert(...)->util = ...;`.
|
||||
ownership of a malloc()ed string to a `string_list` that has
|
||||
`strdup_string` set.
|
||||
|
||||
`string_list_sort`::
|
||||
`sort_string_list`::
|
||||
|
||||
Sort the list's entries by string value in `strcmp()` order.
|
||||
|
||||
|
@ -207,7 +207,7 @@ Git index format
|
||||
in a separate file. This extension records the changes to be made on
|
||||
top of that to produce the final index.
|
||||
|
||||
The signature for this extension is { 'l', 'i', 'n', 'k' }.
|
||||
The signature for this extension is { 'l', 'i, 'n', 'k' }.
|
||||
|
||||
The extension consists of:
|
||||
|
||||
|
@ -18,9 +18,8 @@ was sent. Server MUST NOT ignore capabilities that client requested
|
||||
and server advertised. As a consequence of these rules, server MUST
|
||||
NOT advertise capabilities it does not understand.
|
||||
|
||||
The 'atomic', 'report-status', 'delete-refs', 'quiet', and 'push-cert'
|
||||
capabilities are sent and recognized by the receive-pack (push to server)
|
||||
process.
|
||||
The 'report-status', 'delete-refs', 'quiet', and 'push-cert' capabilities
|
||||
are sent and recognized by the receive-pack (push to server) process.
|
||||
|
||||
The 'ofs-delta' and 'side-band-64k' capabilities are sent and recognized
|
||||
by both upload-pack and receive-pack protocols. The 'agent' capability
|
||||
@ -245,14 +244,6 @@ respond with the 'quiet' capability to suppress server-side progress
|
||||
reporting if the local progress reporting is also being suppressed
|
||||
(e.g., via `push -q`, or if stderr does not go to a tty).
|
||||
|
||||
atomic
|
||||
------
|
||||
|
||||
If the server sends the 'atomic' capability it is capable of accepting
|
||||
atomic pushes. If the pushing client requests this capability, the server
|
||||
will update the refs in one atomic transaction. Either all refs are
|
||||
updated or none.
|
||||
|
||||
allow-tip-sha1-in-want
|
||||
----------------------
|
||||
|
||||
|
@ -1200,7 +1200,7 @@ for other users who clone your repository.
|
||||
If you wish the exclude patterns to affect only certain repositories
|
||||
(instead of every repository for a given project), you may instead put
|
||||
them in a file in your repository named `.git/info/exclude`, or in any
|
||||
file specified by the `core.excludesFile` configuration variable.
|
||||
file specified by the `core.excludesfile` configuration variable.
|
||||
Some Git commands can also take exclude patterns directly on the
|
||||
command line. See linkgit:gitignore[5] for the details.
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
GVF=GIT-VERSION-FILE
|
||||
DEF_VER=v2.4.1
|
||||
DEF_VER=v2.2.3
|
||||
|
||||
LF='
|
||||
'
|
||||
|
15
INSTALL
15
INSTALL
@ -108,21 +108,18 @@ Issues of note:
|
||||
so you might need to install additional packages other than Perl
|
||||
itself, e.g. Time::HiRes.
|
||||
|
||||
- git-imap-send needs the OpenSSL library to talk IMAP over SSL if
|
||||
you are using libcurl older than 7.34.0. Otherwise you can use
|
||||
NO_OPENSSL without losing git-imap-send.
|
||||
- "openssl" library is used by git-imap-send to use IMAP over SSL.
|
||||
If you don't need it, use NO_OPENSSL.
|
||||
|
||||
By default, git uses OpenSSL for SHA1 but it will use its own
|
||||
library (inspired by Mozilla's) with either NO_OPENSSL or
|
||||
BLK_SHA1. Also included is a version optimized for PowerPC
|
||||
(PPC_SHA1).
|
||||
|
||||
- "libcurl" library is used by git-http-fetch, git-fetch, and, if
|
||||
the curl version >= 7.34.0, for git-imap-send. You might also
|
||||
want the "curl" executable for debugging purposes. If you do not
|
||||
use http:// or https:// repositories, and do not want to put
|
||||
patches into an IMAP mailbox, you do not have to have them
|
||||
(use NO_CURL).
|
||||
- "libcurl" library is used by git-http-fetch and git-fetch. You
|
||||
might also want the "curl" executable for debugging purposes.
|
||||
If you do not use http:// or https:// repositories, you do not
|
||||
have to have them (use NO_CURL).
|
||||
|
||||
- "expat" library; git-http-push uses it for remote lock
|
||||
management over DAV. Similar to "curl" above, this is optional
|
||||
|
63
Makefile
63
Makefile
@ -191,10 +191,6 @@ all::
|
||||
# Define NO_TRUSTABLE_FILEMODE if your filesystem may claim to support
|
||||
# the executable mode bit, but doesn't really do so.
|
||||
#
|
||||
# Define NEEDS_MODE_TRANSLATION if your OS strays from the typical file type
|
||||
# bits in mode values (e.g. z/OS defines I_SFMT to 0xFF000000 as opposed to the
|
||||
# usual 0xF000).
|
||||
#
|
||||
# Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
|
||||
#
|
||||
# Define NO_UNIX_SOCKETS if your system does not offer unix sockets.
|
||||
@ -343,22 +339,6 @@ all::
|
||||
# return NULL when it receives a bogus time_t.
|
||||
#
|
||||
# Define HAVE_CLOCK_GETTIME if your platform has clock_gettime in librt.
|
||||
#
|
||||
# Define HAVE_CLOCK_MONOTONIC if your platform has CLOCK_MONOTONIC in librt.
|
||||
#
|
||||
# Define NO_HMAC_CTX_CLEANUP if your OpenSSL is version 0.9.6b or earlier to
|
||||
# cleanup the HMAC context with the older HMAC_cleanup function.
|
||||
#
|
||||
# Define USE_PARENS_AROUND_GETTEXT_N to "yes" if your compiler happily
|
||||
# compiles the following initialization:
|
||||
#
|
||||
# static const char s[] = ("FOO");
|
||||
#
|
||||
# and define it to "no" if you need to remove the parentheses () around the
|
||||
# constant. The default is "auto", which means to use parentheses if your
|
||||
# compiler is detected to support it.
|
||||
#
|
||||
# Define HAVE_BSD_SYSCTL if your platform has a BSD-compatible sysctl function.
|
||||
|
||||
GIT-VERSION-FILE: FORCE
|
||||
@$(SHELL_PATH) ./GIT-VERSION-GEN
|
||||
@ -966,14 +946,6 @@ ifneq (,$(SOCKLEN_T))
|
||||
BASIC_CFLAGS += -Dsocklen_t=$(SOCKLEN_T)
|
||||
endif
|
||||
|
||||
ifeq (yes,$(USE_PARENS_AROUND_GETTEXT_N))
|
||||
BASIC_CFLAGS += -DUSE_PARENS_AROUND_GETTEXT_N=1
|
||||
else
|
||||
ifeq (no,$(USE_PARENS_AROUND_GETTEXT_N))
|
||||
BASIC_CFLAGS += -DUSE_PARENS_AROUND_GETTEXT_N=0
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(uname_S),Darwin)
|
||||
ifndef NO_FINK
|
||||
ifeq ($(shell test -d /sw/lib && echo y),y)
|
||||
@ -1023,9 +995,6 @@ ifdef HAVE_ALLOCA_H
|
||||
BASIC_CFLAGS += -DHAVE_ALLOCA_H
|
||||
endif
|
||||
|
||||
IMAP_SEND_BUILDDEPS =
|
||||
IMAP_SEND_LDFLAGS = $(OPENSSL_LINK) $(OPENSSL_LIBSSL) $(LIB_4_CRYPTO)
|
||||
|
||||
ifdef NO_CURL
|
||||
BASIC_CFLAGS += -DNO_CURL
|
||||
REMOTE_CURL_PRIMARY =
|
||||
@ -1054,21 +1023,12 @@ else
|
||||
REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES)
|
||||
PROGRAM_OBJS += http-fetch.o
|
||||
PROGRAMS += $(REMOTE_CURL_NAMES)
|
||||
curl_check := $(shell (echo 070908; curl-config --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)
|
||||
curl_check := $(shell (echo 070908; curl-config --vernum) 2>/dev/null | sort -r | sed -ne 2p)
|
||||
ifeq "$(curl_check)" "070908"
|
||||
ifndef NO_EXPAT
|
||||
PROGRAM_OBJS += http-push.o
|
||||
endif
|
||||
endif
|
||||
curl_check := $(shell (echo 072200; curl-config --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)
|
||||
ifeq "$(curl_check)" "072200"
|
||||
USE_CURL_FOR_IMAP_SEND = YesPlease
|
||||
endif
|
||||
ifdef USE_CURL_FOR_IMAP_SEND
|
||||
BASIC_CFLAGS += -DUSE_CURL_FOR_IMAP_SEND
|
||||
IMAP_SEND_BUILDDEPS = http.o
|
||||
IMAP_SEND_LDFLAGS += $(CURL_LIBCURL)
|
||||
endif
|
||||
ifndef NO_EXPAT
|
||||
ifdef EXPATDIR
|
||||
BASIC_CFLAGS += -I$(EXPATDIR)/include
|
||||
@ -1099,9 +1059,6 @@ ifndef NO_OPENSSL
|
||||
ifdef NEEDS_CRYPTO_WITH_SSL
|
||||
OPENSSL_LIBSSL += -lcrypto
|
||||
endif
|
||||
ifdef NO_HMAC_CTX_CLEANUP
|
||||
BASIC_CFLAGS += -DNO_HMAC_CTX_CLEANUP
|
||||
endif
|
||||
else
|
||||
BASIC_CFLAGS += -DNO_OPENSSL
|
||||
BLK_SHA1 = 1
|
||||
@ -1273,10 +1230,6 @@ endif
|
||||
ifdef NO_TRUSTABLE_FILEMODE
|
||||
BASIC_CFLAGS += -DNO_TRUSTABLE_FILEMODE
|
||||
endif
|
||||
ifdef NEEDS_MODE_TRANSLATION
|
||||
COMPAT_CFLAGS += -DNEEDS_MODE_TRANSLATION
|
||||
COMPAT_OBJS += compat/stat.o
|
||||
endif
|
||||
ifdef NO_IPV6
|
||||
BASIC_CFLAGS += -DNO_IPV6
|
||||
endif
|
||||
@ -1429,14 +1382,6 @@ ifdef HAVE_CLOCK_GETTIME
|
||||
EXTLIBS += -lrt
|
||||
endif
|
||||
|
||||
ifdef HAVE_CLOCK_MONOTONIC
|
||||
BASIC_CFLAGS += -DHAVE_CLOCK_MONOTONIC
|
||||
endif
|
||||
|
||||
ifdef HAVE_BSD_SYSCTL
|
||||
BASIC_CFLAGS += -DHAVE_BSD_SYSCTL
|
||||
endif
|
||||
|
||||
ifeq ($(TCLTK_PATH),)
|
||||
NO_TCLTK = NoThanks
|
||||
endif
|
||||
@ -1935,7 +1880,7 @@ gettext.sp gettext.s gettext.o: GIT-PREFIX
|
||||
gettext.sp gettext.s gettext.o: EXTRA_CPPFLAGS = \
|
||||
-DGIT_LOCALE_PATH='"$(localedir_SQ)"'
|
||||
|
||||
http-push.sp http.sp http-walker.sp remote-curl.sp imap-send.sp: SPARSE_FLAGS += \
|
||||
http-push.sp http.sp http-walker.sp remote-curl.sp: SPARSE_FLAGS += \
|
||||
-DCURL_DISABLE_TYPECHECK
|
||||
|
||||
ifdef NO_EXPAT
|
||||
@ -1956,9 +1901,9 @@ endif
|
||||
git-%$X: %.o GIT-LDFLAGS $(GITLIBS)
|
||||
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
|
||||
|
||||
git-imap-send$X: imap-send.o $(IMAP_SEND_BUILDDEPS) GIT-LDFLAGS $(GITLIBS)
|
||||
git-imap-send$X: imap-send.o GIT-LDFLAGS $(GITLIBS)
|
||||
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
|
||||
$(LIBS) $(IMAP_SEND_LDFLAGS)
|
||||
$(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL) $(LIB_4_CRYPTO)
|
||||
|
||||
git-http-fetch$X: http.o http-walker.o http-fetch.o GIT-LDFLAGS $(GITLIBS)
|
||||
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
|
||||
|
2
advice.c
2
advice.c
@ -105,7 +105,7 @@ void detach_advice(const char *new_name)
|
||||
"state without impacting any branches by performing another checkout.\n\n"
|
||||
"If you want to create a new branch to retain commits you create, you may\n"
|
||||
"do so (now or later) by using -b with the checkout command again. Example:\n\n"
|
||||
" git checkout -b <new-branch-name>\n\n";
|
||||
" git checkout -b new_branch_name\n\n";
|
||||
|
||||
fprintf(stderr, fmt, new_name);
|
||||
}
|
||||
|
@ -5,8 +5,6 @@
|
||||
#include "archive.h"
|
||||
#include "streaming.h"
|
||||
#include "utf8.h"
|
||||
#include "userdiff.h"
|
||||
#include "xdiff-interface.h"
|
||||
|
||||
static int zip_date;
|
||||
static int zip_time;
|
||||
@ -122,6 +120,7 @@ static void *zlib_deflate_raw(void *data, unsigned long size,
|
||||
void *buffer;
|
||||
int result;
|
||||
|
||||
memset(&stream, 0, sizeof(stream));
|
||||
git_deflate_init_raw(&stream, compression_level);
|
||||
maxsize = git_deflate_bound(&stream, size);
|
||||
buffer = xmalloc(maxsize);
|
||||
@ -190,16 +189,6 @@ static int has_only_ascii(const char *s)
|
||||
}
|
||||
}
|
||||
|
||||
static int entry_is_binary(const char *path, const void *buffer, size_t size)
|
||||
{
|
||||
struct userdiff_driver *driver = userdiff_find_by_path(path);
|
||||
if (!driver)
|
||||
driver = userdiff_find_by_name("default");
|
||||
if (driver->binary != -1)
|
||||
return driver->binary;
|
||||
return buffer_is_binary(buffer, size);
|
||||
}
|
||||
|
||||
#define STREAM_BUFFER_SIZE (1024 * 16)
|
||||
|
||||
static int write_zip_entry(struct archiver_args *args,
|
||||
@ -221,8 +210,6 @@ static int write_zip_entry(struct archiver_args *args,
|
||||
struct git_istream *stream = NULL;
|
||||
unsigned long flags = 0;
|
||||
unsigned long size;
|
||||
int is_binary = -1;
|
||||
const char *path_without_prefix = path + args->baselen;
|
||||
|
||||
crc = crc32(0, NULL, 0);
|
||||
|
||||
@ -269,8 +256,6 @@ static int write_zip_entry(struct archiver_args *args,
|
||||
return error("cannot read %s",
|
||||
sha1_to_hex(sha1));
|
||||
crc = crc32(crc, buffer, size);
|
||||
is_binary = entry_is_binary(path_without_prefix,
|
||||
buffer, size);
|
||||
out = buffer;
|
||||
}
|
||||
compressed_size = (method == 0) ? size : 0;
|
||||
@ -315,6 +300,7 @@ static int write_zip_entry(struct archiver_args *args,
|
||||
copy_le16(dirent.extra_length, ZIP_EXTRA_MTIME_SIZE);
|
||||
copy_le16(dirent.comment_length, 0);
|
||||
copy_le16(dirent.disk, 0);
|
||||
copy_le16(dirent.attr1, 0);
|
||||
copy_le32(dirent.attr2, attr2);
|
||||
copy_le32(dirent.offset, zip_offset);
|
||||
|
||||
@ -342,9 +328,6 @@ static int write_zip_entry(struct archiver_args *args,
|
||||
if (readlen <= 0)
|
||||
break;
|
||||
crc = crc32(crc, buf, readlen);
|
||||
if (is_binary == -1)
|
||||
is_binary = entry_is_binary(path_without_prefix,
|
||||
buf, readlen);
|
||||
write_or_die(1, buf, readlen);
|
||||
}
|
||||
close_istream(stream);
|
||||
@ -366,6 +349,7 @@ static int write_zip_entry(struct archiver_args *args,
|
||||
size_t out_len;
|
||||
unsigned char compressed[STREAM_BUFFER_SIZE * 2];
|
||||
|
||||
memset(&zstream, 0, sizeof(zstream));
|
||||
git_deflate_init_raw(&zstream, args->compression_level);
|
||||
|
||||
compressed_size = 0;
|
||||
@ -377,9 +361,6 @@ static int write_zip_entry(struct archiver_args *args,
|
||||
if (readlen <= 0)
|
||||
break;
|
||||
crc = crc32(crc, buf, readlen);
|
||||
if (is_binary == -1)
|
||||
is_binary = entry_is_binary(path_without_prefix,
|
||||
buf, readlen);
|
||||
|
||||
zstream.next_in = buf;
|
||||
zstream.avail_in = readlen;
|
||||
@ -424,8 +405,6 @@ static int write_zip_entry(struct archiver_args *args,
|
||||
free(deflated);
|
||||
free(buffer);
|
||||
|
||||
copy_le16(dirent.attr1, !is_binary);
|
||||
|
||||
memcpy(zip_dir + zip_dir_offset, &dirent, ZIP_DIR_HEADER_SIZE);
|
||||
zip_dir_offset += ZIP_DIR_HEADER_SIZE;
|
||||
memcpy(zip_dir + zip_dir_offset, path, pathlen);
|
||||
|
38
archive.c
38
archive.c
@ -8,9 +8,9 @@
|
||||
#include "dir.h"
|
||||
|
||||
static char const * const archive_usage[] = {
|
||||
N_("git archive [<options>] <tree-ish> [<path>...]"),
|
||||
N_("git archive [options] <tree-ish> [<path>...]"),
|
||||
N_("git archive --list"),
|
||||
N_("git archive --remote <repo> [--exec <cmd>] [<options>] <tree-ish> [<path>...]"),
|
||||
N_("git archive --remote <repo> [--exec <cmd>] [options] <tree-ish> [<path>...]"),
|
||||
N_("git archive --remote <repo> [--exec <cmd>] --list"),
|
||||
NULL
|
||||
};
|
||||
@ -157,26 +157,18 @@ static int write_archive_entry(const unsigned char *sha1, const char *base,
|
||||
return write_entry(args, sha1, path.buf, path.len, mode);
|
||||
}
|
||||
|
||||
static int write_archive_entry_buf(const unsigned char *sha1, struct strbuf *base,
|
||||
const char *filename, unsigned mode, int stage,
|
||||
void *context)
|
||||
{
|
||||
return write_archive_entry(sha1, base->buf, base->len,
|
||||
filename, mode, stage, context);
|
||||
}
|
||||
|
||||
static void queue_directory(const unsigned char *sha1,
|
||||
struct strbuf *base, const char *filename,
|
||||
const char *base, int baselen, const char *filename,
|
||||
unsigned mode, int stage, struct archiver_context *c)
|
||||
{
|
||||
struct directory *d;
|
||||
d = xmallocz(sizeof(*d) + base->len + 1 + strlen(filename));
|
||||
d = xmallocz(sizeof(*d) + baselen + 1 + strlen(filename));
|
||||
d->up = c->bottom;
|
||||
d->baselen = base->len;
|
||||
d->baselen = baselen;
|
||||
d->mode = mode;
|
||||
d->stage = stage;
|
||||
c->bottom = d;
|
||||
d->len = sprintf(d->path, "%.*s%s/", (int)base->len, base->buf, filename);
|
||||
d->len = sprintf(d->path, "%.*s%s/", baselen, base, filename);
|
||||
hashcpy(d->sha1, sha1);
|
||||
}
|
||||
|
||||
@ -199,28 +191,28 @@ static int write_directory(struct archiver_context *c)
|
||||
}
|
||||
|
||||
static int queue_or_write_archive_entry(const unsigned char *sha1,
|
||||
struct strbuf *base, const char *filename,
|
||||
const char *base, int baselen, const char *filename,
|
||||
unsigned mode, int stage, void *context)
|
||||
{
|
||||
struct archiver_context *c = context;
|
||||
|
||||
while (c->bottom &&
|
||||
!(base->len >= c->bottom->len &&
|
||||
!strncmp(base->buf, c->bottom->path, c->bottom->len))) {
|
||||
!(baselen >= c->bottom->len &&
|
||||
!strncmp(base, c->bottom->path, c->bottom->len))) {
|
||||
struct directory *next = c->bottom->up;
|
||||
free(c->bottom);
|
||||
c->bottom = next;
|
||||
}
|
||||
|
||||
if (S_ISDIR(mode)) {
|
||||
queue_directory(sha1, base, filename,
|
||||
queue_directory(sha1, base, baselen, filename,
|
||||
mode, stage, c);
|
||||
return READ_TREE_RECURSIVE;
|
||||
}
|
||||
|
||||
if (write_directory(c))
|
||||
return -1;
|
||||
return write_archive_entry(sha1, base->buf, base->len, filename, mode,
|
||||
return write_archive_entry(sha1, base, baselen, filename, mode,
|
||||
stage, context);
|
||||
}
|
||||
|
||||
@ -268,7 +260,7 @@ int write_archive_entries(struct archiver_args *args,
|
||||
err = read_tree_recursive(args->tree, "", 0, 0, &args->pathspec,
|
||||
args->pathspec.has_wildcard ?
|
||||
queue_or_write_archive_entry :
|
||||
write_archive_entry_buf,
|
||||
write_archive_entry,
|
||||
&context);
|
||||
if (err == READ_TREE_RECURSIVE)
|
||||
err = 0;
|
||||
@ -294,14 +286,14 @@ static const struct archiver *lookup_archiver(const char *name)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int reject_entry(const unsigned char *sha1, struct strbuf *base,
|
||||
const char *filename, unsigned mode,
|
||||
static int reject_entry(const unsigned char *sha1, const char *base,
|
||||
int baselen, const char *filename, unsigned mode,
|
||||
int stage, void *context)
|
||||
{
|
||||
int ret = -1;
|
||||
if (S_ISDIR(mode)) {
|
||||
struct strbuf sb = STRBUF_INIT;
|
||||
strbuf_addbuf(&sb, base);
|
||||
strbuf_addstr(&sb, base);
|
||||
strbuf_addstr(&sb, filename);
|
||||
if (!match_pathspec(context, sb.buf, sb.len, 0, NULL, 1))
|
||||
ret = READ_TREE_RECURSIVE;
|
||||
|
56
attr.c
56
attr.c
@ -12,7 +12,6 @@
|
||||
#include "exec_cmd.h"
|
||||
#include "attr.h"
|
||||
#include "dir.h"
|
||||
#include "utf8.h"
|
||||
|
||||
const char git_attr__true[] = "(builtin)true";
|
||||
const char git_attr__false[] = "\0(builtin)false";
|
||||
@ -33,12 +32,9 @@ struct git_attr {
|
||||
struct git_attr *next;
|
||||
unsigned h;
|
||||
int attr_nr;
|
||||
int maybe_macro;
|
||||
int maybe_real;
|
||||
char name[FLEX_ARRAY];
|
||||
};
|
||||
static int attr_nr;
|
||||
static int cannot_trust_maybe_real;
|
||||
|
||||
static struct git_attr_check *check_all_attr;
|
||||
static struct git_attr *(git_attr_hash[HASHSIZE]);
|
||||
@ -99,8 +95,6 @@ static struct git_attr *git_attr_internal(const char *name, int len)
|
||||
a->h = hval;
|
||||
a->next = git_attr_hash[pos];
|
||||
a->attr_nr = attr_nr++;
|
||||
a->maybe_macro = 0;
|
||||
a->maybe_real = 0;
|
||||
git_attr_hash[pos] = a;
|
||||
|
||||
REALLOC_ARRAY(check_all_attr, attr_nr);
|
||||
@ -250,10 +244,9 @@ static struct match_attr *parse_attr_line(const char *line, const char *src,
|
||||
sizeof(*res) +
|
||||
sizeof(struct attr_state) * num_attr +
|
||||
(is_macro ? 0 : namelen + 1));
|
||||
if (is_macro) {
|
||||
if (is_macro)
|
||||
res->u.attr = git_attr_internal(name, namelen);
|
||||
res->u.attr->maybe_macro = 1;
|
||||
} else {
|
||||
else {
|
||||
char *p = (char *)&(res->state[num_attr]);
|
||||
memcpy(p, name, namelen);
|
||||
res->u.pat.pattern = p;
|
||||
@ -273,10 +266,6 @@ static struct match_attr *parse_attr_line(const char *line, const char *src,
|
||||
/* Second pass to fill the attr_states */
|
||||
for (cp = states, i = 0; *cp; i++) {
|
||||
cp = parse_attr(src, lineno, cp, &(res->state[i]));
|
||||
if (!is_macro)
|
||||
res->state[i].attr->maybe_real = 1;
|
||||
if (res->state[i].attr->maybe_macro)
|
||||
cannot_trust_maybe_real = 1;
|
||||
}
|
||||
|
||||
return res;
|
||||
@ -380,12 +369,8 @@ static struct attr_stack *read_attr_from_file(const char *path, int macro_ok)
|
||||
return NULL;
|
||||
}
|
||||
res = xcalloc(1, sizeof(*res));
|
||||
while (fgets(buf, sizeof(buf), fp)) {
|
||||
char *bufp = buf;
|
||||
if (!lineno)
|
||||
skip_utf8_bom(&bufp, strlen(bufp));
|
||||
handle_attr_line(res, bufp, path, ++lineno, macro_ok);
|
||||
}
|
||||
while (fgets(buf, sizeof(buf), fp))
|
||||
handle_attr_line(res, buf, path, ++lineno, macro_ok);
|
||||
fclose(fp);
|
||||
return res;
|
||||
}
|
||||
@ -696,14 +681,13 @@ static int fill(const char *path, int pathlen, int basename_offset,
|
||||
return rem;
|
||||
}
|
||||
|
||||
static int macroexpand_one(int nr, int rem)
|
||||
static int macroexpand_one(int attr_nr, int rem)
|
||||
{
|
||||
struct attr_stack *stk;
|
||||
struct match_attr *a = NULL;
|
||||
int i;
|
||||
|
||||
if (check_all_attr[nr].value != ATTR__TRUE ||
|
||||
!check_all_attr[nr].attr->maybe_macro)
|
||||
if (check_all_attr[attr_nr].value != ATTR__TRUE)
|
||||
return rem;
|
||||
|
||||
for (stk = attr_stack; !a && stk; stk = stk->prev)
|
||||
@ -711,7 +695,7 @@ static int macroexpand_one(int nr, int rem)
|
||||
struct match_attr *ma = stk->attrs[i];
|
||||
if (!ma->is_macro)
|
||||
continue;
|
||||
if (ma->u.attr->attr_nr == nr)
|
||||
if (ma->u.attr->attr_nr == attr_nr)
|
||||
a = ma;
|
||||
}
|
||||
|
||||
@ -722,13 +706,10 @@ static int macroexpand_one(int nr, int rem)
|
||||
}
|
||||
|
||||
/*
|
||||
* Collect attributes for path into the array pointed to by
|
||||
* check_all_attr. If num is non-zero, only attributes in check[] are
|
||||
* collected. Otherwise all attributes are collected.
|
||||
* Collect all attributes for path into the array pointed to by
|
||||
* check_all_attr.
|
||||
*/
|
||||
static void collect_some_attrs(const char *path, int num,
|
||||
struct git_attr_check *check)
|
||||
|
||||
static void collect_all_attrs(const char *path)
|
||||
{
|
||||
struct attr_stack *stk;
|
||||
int i, pathlen, rem, dirlen;
|
||||
@ -751,19 +732,6 @@ static void collect_some_attrs(const char *path, int num,
|
||||
prepare_attr_stack(path, dirlen);
|
||||
for (i = 0; i < attr_nr; i++)
|
||||
check_all_attr[i].value = ATTR__UNKNOWN;
|
||||
if (num && !cannot_trust_maybe_real) {
|
||||
rem = 0;
|
||||
for (i = 0; i < num; i++) {
|
||||
if (!check[i].attr->maybe_real) {
|
||||
struct git_attr_check *c;
|
||||
c = check_all_attr + check[i].attr->attr_nr;
|
||||
c->value = ATTR__UNSET;
|
||||
rem++;
|
||||
}
|
||||
}
|
||||
if (rem == num)
|
||||
return;
|
||||
}
|
||||
|
||||
rem = attr_nr;
|
||||
for (stk = attr_stack; 0 < rem && stk; stk = stk->prev)
|
||||
@ -774,7 +742,7 @@ int git_check_attr(const char *path, int num, struct git_attr_check *check)
|
||||
{
|
||||
int i;
|
||||
|
||||
collect_some_attrs(path, num, check);
|
||||
collect_all_attrs(path);
|
||||
|
||||
for (i = 0; i < num; i++) {
|
||||
const char *value = check_all_attr[check[i].attr->attr_nr].value;
|
||||
@ -790,7 +758,7 @@ int git_all_attrs(const char *path, int *num, struct git_attr_check **check)
|
||||
{
|
||||
int i, count, j;
|
||||
|
||||
collect_some_attrs(path, 0, NULL);
|
||||
collect_all_attrs(path);
|
||||
|
||||
/* Count the number of attributes that are set. */
|
||||
count = 0;
|
||||
|
2
bisect.c
2
bisect.c
@ -777,7 +777,7 @@ static void check_merge_bases(int no_checkout)
|
||||
int rev_nr;
|
||||
struct commit **rev = get_bad_and_good_commits(&rev_nr);
|
||||
|
||||
result = get_merge_bases_many(rev[0], rev_nr - 1, rev + 1);
|
||||
result = get_merge_bases_many(rev[0], rev_nr - 1, rev + 1, 0);
|
||||
|
||||
for (; result; result = result->next) {
|
||||
const unsigned char *mb = result->item->object.sha1;
|
||||
|
5
branch.c
5
branch.c
@ -284,9 +284,8 @@ void create_branch(const char *head,
|
||||
|
||||
transaction = ref_transaction_begin(&err);
|
||||
if (!transaction ||
|
||||
ref_transaction_update(transaction, ref.buf,
|
||||
sha1, forcing ? NULL : null_sha1,
|
||||
0, msg, &err) ||
|
||||
ref_transaction_update(transaction, ref.buf, sha1,
|
||||
null_sha1, 0, !forcing, msg, &err) ||
|
||||
ref_transaction_commit(transaction, &err))
|
||||
die("%s", err.buf);
|
||||
ref_transaction_free(transaction);
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "argv-array.h"
|
||||
|
||||
static const char * const builtin_add_usage[] = {
|
||||
N_("git add [<options>] [--] <pathspec>..."),
|
||||
N_("git add [options] [--] <pathspec>..."),
|
||||
NULL
|
||||
};
|
||||
static int patch_interactive, add_interactive, edit_interactive;
|
||||
|
201
builtin/apply.c
201
builtin/apply.c
@ -51,12 +51,11 @@ static int apply_verbosely;
|
||||
static int allow_overlap;
|
||||
static int no_add;
|
||||
static int threeway;
|
||||
static int unsafe_paths;
|
||||
static const char *fake_ancestor;
|
||||
static int line_termination = '\n';
|
||||
static unsigned int p_context = UINT_MAX;
|
||||
static const char * const apply_usage[] = {
|
||||
N_("git apply [<options>] [<patch>...]"),
|
||||
N_("git apply [options] [<patch>...]"),
|
||||
NULL
|
||||
};
|
||||
|
||||
@ -658,6 +657,11 @@ static size_t diff_timestamp_len(const char *line, size_t len)
|
||||
return line + len - end;
|
||||
}
|
||||
|
||||
static char *null_strdup(const char *s)
|
||||
{
|
||||
return s ? xstrdup(s) : NULL;
|
||||
}
|
||||
|
||||
static char *find_name_common(const char *line, const char *def,
|
||||
int p_value, const char *end, int terminate)
|
||||
{
|
||||
@ -680,10 +684,10 @@ static char *find_name_common(const char *line, const char *def,
|
||||
start = line;
|
||||
}
|
||||
if (!start)
|
||||
return squash_slash(xstrdup_or_null(def));
|
||||
return squash_slash(null_strdup(def));
|
||||
len = line - start;
|
||||
if (!len)
|
||||
return squash_slash(xstrdup_or_null(def));
|
||||
return squash_slash(null_strdup(def));
|
||||
|
||||
/*
|
||||
* Generally we prefer the shorter name, especially
|
||||
@ -905,7 +909,7 @@ static void parse_traditional_patch(const char *first, const char *second, struc
|
||||
patch->old_name = name;
|
||||
} else {
|
||||
patch->old_name = name;
|
||||
patch->new_name = xstrdup_or_null(name);
|
||||
patch->new_name = null_strdup(name);
|
||||
}
|
||||
}
|
||||
if (!name)
|
||||
@ -994,7 +998,7 @@ static int gitdiff_delete(const char *line, struct patch *patch)
|
||||
{
|
||||
patch->is_delete = 1;
|
||||
free(patch->old_name);
|
||||
patch->old_name = xstrdup_or_null(patch->def_name);
|
||||
patch->old_name = null_strdup(patch->def_name);
|
||||
return gitdiff_oldmode(line, patch);
|
||||
}
|
||||
|
||||
@ -1002,7 +1006,7 @@ static int gitdiff_newfile(const char *line, struct patch *patch)
|
||||
{
|
||||
patch->is_new = 1;
|
||||
free(patch->new_name);
|
||||
patch->new_name = xstrdup_or_null(patch->def_name);
|
||||
patch->new_name = null_strdup(patch->def_name);
|
||||
return gitdiff_newmode(line, patch);
|
||||
}
|
||||
|
||||
@ -1601,9 +1605,6 @@ static int parse_fragment(const char *line, unsigned long size,
|
||||
if (!deleted && !added)
|
||||
leading++;
|
||||
trailing++;
|
||||
if (!apply_in_reverse &&
|
||||
ws_error_action == correct_ws_error)
|
||||
check_whitespace(line, len, patch->ws_rule);
|
||||
break;
|
||||
case '-':
|
||||
if (apply_in_reverse &&
|
||||
@ -2234,12 +2235,6 @@ static void update_pre_post_images(struct image *preimage,
|
||||
ctx++;
|
||||
}
|
||||
|
||||
if (postlen
|
||||
? postlen < new - postimage->buf
|
||||
: postimage->len < new - postimage->buf)
|
||||
die("BUG: caller miscounted postlen: asked %d, orig = %d, used = %d",
|
||||
(int)postlen, (int) postimage->len, (int)(new - postimage->buf));
|
||||
|
||||
/* Fix the length of the whole thing */
|
||||
postimage->len = new - postimage->buf;
|
||||
postimage->nr -= reduced;
|
||||
@ -2395,27 +2390,10 @@ static int match_fragment(struct image *img,
|
||||
|
||||
/*
|
||||
* The hunk does not apply byte-by-byte, but the hash says
|
||||
* it might with whitespace fuzz. We weren't asked to
|
||||
* it might with whitespace fuzz. We haven't been asked to
|
||||
* ignore whitespace, we were asked to correct whitespace
|
||||
* errors, so let's try matching after whitespace correction.
|
||||
*
|
||||
* While checking the preimage against the target, whitespace
|
||||
* errors in both fixed, we count how large the corresponding
|
||||
* postimage needs to be. The postimage prepared by
|
||||
* apply_one_fragment() has whitespace errors fixed on added
|
||||
* lines already, but the common lines were propagated as-is,
|
||||
* which may become longer when their whitespace errors are
|
||||
* fixed.
|
||||
*/
|
||||
|
||||
/* First count added lines in postimage */
|
||||
postlen = 0;
|
||||
for (i = 0; i < postimage->nr; i++) {
|
||||
if (!(postimage->line[i].flag & LINE_COMMON))
|
||||
postlen += postimage->line[i].len;
|
||||
}
|
||||
|
||||
/*
|
||||
* The preimage may extend beyond the end of the file,
|
||||
* but in this loop we will only handle the part of the
|
||||
* preimage that falls within the file.
|
||||
@ -2423,6 +2401,7 @@ static int match_fragment(struct image *img,
|
||||
strbuf_init(&fixed, preimage->len + 1);
|
||||
orig = preimage->buf;
|
||||
target = img->buf + try;
|
||||
postlen = 0;
|
||||
for (i = 0; i < preimage_limit; i++) {
|
||||
size_t oldlen = preimage->line[i].len;
|
||||
size_t tgtlen = img->line[try_lno + i].len;
|
||||
@ -2450,10 +2429,7 @@ static int match_fragment(struct image *img,
|
||||
match = (tgtfix.len == fixed.len - fixstart &&
|
||||
!memcmp(tgtfix.buf, fixed.buf + fixstart,
|
||||
fixed.len - fixstart));
|
||||
|
||||
/* Add the length if this is common with the postimage */
|
||||
if (preimage->line[i].flag & LINE_COMMON)
|
||||
postlen += tgtfix.len;
|
||||
postlen += tgtfix.len;
|
||||
|
||||
strbuf_release(&tgtfix);
|
||||
if (!match)
|
||||
@ -2776,8 +2752,7 @@ static int apply_one_fragment(struct image *img, struct fragment *frag,
|
||||
default:
|
||||
if (apply_verbosely)
|
||||
error(_("invalid start of line: '%c'"), first);
|
||||
applied_pos = -1;
|
||||
goto out;
|
||||
return -1;
|
||||
}
|
||||
if (added_blank_line) {
|
||||
if (!new_blank_lines_at_end)
|
||||
@ -2916,7 +2891,6 @@ static int apply_one_fragment(struct image *img, struct fragment *frag,
|
||||
(int)(old - oldlines), oldlines);
|
||||
}
|
||||
|
||||
out:
|
||||
free(oldlines);
|
||||
strbuf_release(&newlines);
|
||||
free(preimage.line_allocated);
|
||||
@ -3227,7 +3201,7 @@ static int load_patch_target(struct strbuf *buf,
|
||||
const char *name,
|
||||
unsigned expected_mode)
|
||||
{
|
||||
if (cached || check_index) {
|
||||
if (cached) {
|
||||
if (read_file_or_gitlink(ce, buf))
|
||||
return error(_("read of %s failed"), name);
|
||||
} else if (name) {
|
||||
@ -3236,8 +3210,6 @@ static int load_patch_target(struct strbuf *buf,
|
||||
return read_file_or_gitlink(ce, buf);
|
||||
else
|
||||
return SUBMODULE_PATCH_WITHOUT_INDEX;
|
||||
} else if (has_symlink_leading_path(name, strlen(name))) {
|
||||
return error(_("reading from '%s' beyond a symbolic link"), name);
|
||||
} else {
|
||||
if (read_old_data(st, name, buf))
|
||||
return error(_("read of %s failed"), name);
|
||||
@ -3577,121 +3549,6 @@ static int check_to_create(const char *new_name, int ok_if_exists)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* We need to keep track of how symlinks in the preimage are
|
||||
* manipulated by the patches. A patch to add a/b/c where a/b
|
||||
* is a symlink should not be allowed to affect the directory
|
||||
* the symlink points at, but if the same patch removes a/b,
|
||||
* it is perfectly fine, as the patch removes a/b to make room
|
||||
* to create a directory a/b so that a/b/c can be created.
|
||||
*/
|
||||
static struct string_list symlink_changes;
|
||||
#define SYMLINK_GOES_AWAY 01
|
||||
#define SYMLINK_IN_RESULT 02
|
||||
|
||||
static uintptr_t register_symlink_changes(const char *path, uintptr_t what)
|
||||
{
|
||||
struct string_list_item *ent;
|
||||
|
||||
ent = string_list_lookup(&symlink_changes, path);
|
||||
if (!ent) {
|
||||
ent = string_list_insert(&symlink_changes, path);
|
||||
ent->util = (void *)0;
|
||||
}
|
||||
ent->util = (void *)(what | ((uintptr_t)ent->util));
|
||||
return (uintptr_t)ent->util;
|
||||
}
|
||||
|
||||
static uintptr_t check_symlink_changes(const char *path)
|
||||
{
|
||||
struct string_list_item *ent;
|
||||
|
||||
ent = string_list_lookup(&symlink_changes, path);
|
||||
if (!ent)
|
||||
return 0;
|
||||
return (uintptr_t)ent->util;
|
||||
}
|
||||
|
||||
static void prepare_symlink_changes(struct patch *patch)
|
||||
{
|
||||
for ( ; patch; patch = patch->next) {
|
||||
if ((patch->old_name && S_ISLNK(patch->old_mode)) &&
|
||||
(patch->is_rename || patch->is_delete))
|
||||
/* the symlink at patch->old_name is removed */
|
||||
register_symlink_changes(patch->old_name, SYMLINK_GOES_AWAY);
|
||||
|
||||
if (patch->new_name && S_ISLNK(patch->new_mode))
|
||||
/* the symlink at patch->new_name is created or remains */
|
||||
register_symlink_changes(patch->new_name, SYMLINK_IN_RESULT);
|
||||
}
|
||||
}
|
||||
|
||||
static int path_is_beyond_symlink_1(struct strbuf *name)
|
||||
{
|
||||
do {
|
||||
unsigned int change;
|
||||
|
||||
while (--name->len && name->buf[name->len] != '/')
|
||||
; /* scan backwards */
|
||||
if (!name->len)
|
||||
break;
|
||||
name->buf[name->len] = '\0';
|
||||
change = check_symlink_changes(name->buf);
|
||||
if (change & SYMLINK_IN_RESULT)
|
||||
return 1;
|
||||
if (change & SYMLINK_GOES_AWAY)
|
||||
/*
|
||||
* This cannot be "return 0", because we may
|
||||
* see a new one created at a higher level.
|
||||
*/
|
||||
continue;
|
||||
|
||||
/* otherwise, check the preimage */
|
||||
if (check_index) {
|
||||
struct cache_entry *ce;
|
||||
|
||||
ce = cache_file_exists(name->buf, name->len, ignore_case);
|
||||
if (ce && S_ISLNK(ce->ce_mode))
|
||||
return 1;
|
||||
} else {
|
||||
struct stat st;
|
||||
if (!lstat(name->buf, &st) && S_ISLNK(st.st_mode))
|
||||
return 1;
|
||||
}
|
||||
} while (1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int path_is_beyond_symlink(const char *name_)
|
||||
{
|
||||
int ret;
|
||||
struct strbuf name = STRBUF_INIT;
|
||||
|
||||
assert(*name_ != '\0');
|
||||
strbuf_addstr(&name, name_);
|
||||
ret = path_is_beyond_symlink_1(&name);
|
||||
strbuf_release(&name);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void die_on_unsafe_path(struct patch *patch)
|
||||
{
|
||||
const char *old_name = NULL;
|
||||
const char *new_name = NULL;
|
||||
if (patch->is_delete)
|
||||
old_name = patch->old_name;
|
||||
else if (!patch->is_new && !patch->is_copy)
|
||||
old_name = patch->old_name;
|
||||
if (!patch->is_delete)
|
||||
new_name = patch->new_name;
|
||||
|
||||
if (old_name && !verify_path(old_name))
|
||||
die(_("invalid path '%s'"), old_name);
|
||||
if (new_name && !verify_path(new_name))
|
||||
die(_("invalid path '%s'"), new_name);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check and apply the patch in-core; leave the result in patch->result
|
||||
* for the caller to write it out to the final destination.
|
||||
@ -3779,22 +3636,6 @@ static int check_patch(struct patch *patch)
|
||||
}
|
||||
}
|
||||
|
||||
if (!unsafe_paths)
|
||||
die_on_unsafe_path(patch);
|
||||
|
||||
/*
|
||||
* An attempt to read from or delete a path that is beyond a
|
||||
* symbolic link will be prevented by load_patch_target() that
|
||||
* is called at the beginning of apply_data() so we do not
|
||||
* have to worry about a patch marked with "is_delete" bit
|
||||
* here. We however need to make sure that the patch result
|
||||
* is not deposited to a path that is beyond a symbolic link
|
||||
* here.
|
||||
*/
|
||||
if (!patch->is_delete && path_is_beyond_symlink(patch->new_name))
|
||||
return error(_("affected file '%s' is beyond a symbolic link"),
|
||||
patch->new_name);
|
||||
|
||||
if (apply_data(patch, &st, ce) < 0)
|
||||
return error(_("%s: patch does not apply"), name);
|
||||
patch->rejected = 0;
|
||||
@ -3805,7 +3646,6 @@ static int check_patch_list(struct patch *patch)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
prepare_symlink_changes(patch);
|
||||
prepare_fn_table(patch);
|
||||
while (patch) {
|
||||
if (apply_verbosely)
|
||||
@ -3888,7 +3728,7 @@ static void build_fake_ancestor(struct patch *list, const char *filename)
|
||||
if (!preimage_sha1_in_gitlink_patch(patch, sha1))
|
||||
; /* ok, the textual part looks sane */
|
||||
else
|
||||
die("sha1 information is lacking or useless for submodule %s",
|
||||
die("sha1 information is lacking or useless for submoule %s",
|
||||
name);
|
||||
} else if (!get_sha1_blob(patch->old_sha1_prefix, sha1)) {
|
||||
; /* ok */
|
||||
@ -4340,7 +4180,7 @@ static int write_out_results(struct patch *list)
|
||||
if (cpath.nr) {
|
||||
struct string_list_item *item;
|
||||
|
||||
string_list_sort(&cpath);
|
||||
sort_string_list(&cpath);
|
||||
for_each_string_list_item(item, &cpath)
|
||||
fprintf(stderr, "U %s\n", item->string);
|
||||
string_list_clear(&cpath, 0);
|
||||
@ -4544,8 +4384,6 @@ int cmd_apply(int argc, const char **argv, const char *prefix_)
|
||||
N_("make sure the patch is applicable to the current index")),
|
||||
OPT_BOOL(0, "cached", &cached,
|
||||
N_("apply a patch without touching the working tree")),
|
||||
OPT_BOOL(0, "unsafe-paths", &unsafe_paths,
|
||||
N_("accept a patch that touches outside the working area")),
|
||||
OPT_BOOL(0, "apply", &force_apply,
|
||||
N_("also apply the patch (use with --stat/--summary/--check)")),
|
||||
OPT_BOOL('3', "3way", &threeway,
|
||||
@ -4618,9 +4456,6 @@ int cmd_apply(int argc, const char **argv, const char *prefix_)
|
||||
die(_("--cached outside a repository"));
|
||||
check_index = 1;
|
||||
}
|
||||
if (check_index)
|
||||
unsafe_paths = 0;
|
||||
|
||||
for (i = 0; i < argc; i++) {
|
||||
const char *arg = argv[i];
|
||||
int fd;
|
||||
|
@ -27,12 +27,12 @@
|
||||
#include "line-range.h"
|
||||
#include "line-log.h"
|
||||
|
||||
static char blame_usage[] = N_("git blame [<options>] [<rev-opts>] [<rev>] [--] file");
|
||||
static char blame_usage[] = N_("git blame [options] [rev-opts] [rev] [--] file");
|
||||
|
||||
static const char *blame_opt_usage[] = {
|
||||
blame_usage,
|
||||
"",
|
||||
N_("<rev-opts> are documented in git-rev-list(1)"),
|
||||
N_("[rev-opts] are documented in git-rev-list(1)"),
|
||||
NULL
|
||||
};
|
||||
|
||||
@ -2085,6 +2085,7 @@ static void find_alignment(struct scoreboard *sb, int *option)
|
||||
|
||||
for (e = sb->ent; e; e = e->next) {
|
||||
struct origin *suspect = e->suspect;
|
||||
struct commit_info ci;
|
||||
int num;
|
||||
|
||||
if (compute_auto_abbrev)
|
||||
@ -2095,7 +2096,6 @@ static void find_alignment(struct scoreboard *sb, int *option)
|
||||
if (longest_file < num)
|
||||
longest_file = num;
|
||||
if (!(suspect->commit->object.flags & METAINFO_SHOWN)) {
|
||||
struct commit_info ci;
|
||||
suspect->commit->object.flags |= METAINFO_SHOWN;
|
||||
get_commit_info(suspect->commit, &ci, 1);
|
||||
if (*option & OUTPUT_SHOW_EMAIL)
|
||||
@ -2104,7 +2104,6 @@ static void find_alignment(struct scoreboard *sb, int *option)
|
||||
num = utf8_strwidth(ci.author.buf);
|
||||
if (longest_author < num)
|
||||
longest_author = num;
|
||||
commit_info_destroy(&ci);
|
||||
}
|
||||
num = e->s_lno + e->num_lines;
|
||||
if (longest_src_lines < num)
|
||||
@ -2114,6 +2113,8 @@ static void find_alignment(struct scoreboard *sb, int *option)
|
||||
longest_dst_lines = num;
|
||||
if (largest_score < ent_score(sb, e))
|
||||
largest_score = ent_score(sb, e);
|
||||
|
||||
commit_info_destroy(&ci);
|
||||
}
|
||||
max_orig_digits = decimal_width(longest_src_lines);
|
||||
max_digits = decimal_width(longest_dst_lines);
|
||||
@ -2389,7 +2390,7 @@ static struct commit *fake_working_tree_commit(struct diff_options *opt,
|
||||
return commit;
|
||||
}
|
||||
|
||||
static char *prepare_final(struct scoreboard *sb)
|
||||
static const char *prepare_final(struct scoreboard *sb)
|
||||
{
|
||||
int i;
|
||||
const char *final_commit_name = NULL;
|
||||
@ -2414,10 +2415,10 @@ static char *prepare_final(struct scoreboard *sb)
|
||||
sb->final = (struct commit *) obj;
|
||||
final_commit_name = revs->pending.objects[i].name;
|
||||
}
|
||||
return xstrdup_or_null(final_commit_name);
|
||||
return final_commit_name;
|
||||
}
|
||||
|
||||
static char *prepare_initial(struct scoreboard *sb)
|
||||
static const char *prepare_initial(struct scoreboard *sb)
|
||||
{
|
||||
int i;
|
||||
const char *final_commit_name = NULL;
|
||||
@ -2444,7 +2445,7 @@ static char *prepare_initial(struct scoreboard *sb)
|
||||
}
|
||||
if (!final_commit_name)
|
||||
die("No commit to dig down to?");
|
||||
return xstrdup(final_commit_name);
|
||||
return final_commit_name;
|
||||
}
|
||||
|
||||
static int blame_copy_callback(const struct option *option, const char *arg, int unset)
|
||||
@ -2488,7 +2489,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
|
||||
struct origin *o;
|
||||
struct blame_entry *ent = NULL;
|
||||
long dashdash_pos, lno;
|
||||
char *final_commit_name = NULL;
|
||||
const char *final_commit_name = NULL;
|
||||
enum object_type type;
|
||||
|
||||
static struct string_list range_list;
|
||||
@ -2785,8 +2786,6 @@ parse_done:
|
||||
|
||||
assign_blame(&sb, opt);
|
||||
|
||||
free(final_commit_name);
|
||||
|
||||
if (incremental)
|
||||
return 0;
|
||||
|
||||
|
@ -21,10 +21,10 @@
|
||||
#include "wt-status.h"
|
||||
|
||||
static const char * const builtin_branch_usage[] = {
|
||||
N_("git branch [<options>] [-r | -a] [--merged | --no-merged]"),
|
||||
N_("git branch [<options>] [-l] [-f] <branch-name> [<start-point>]"),
|
||||
N_("git branch [<options>] [-r] (-d | -D) <branch-name>..."),
|
||||
N_("git branch [<options>] (-m | -M) [<old-branch>] <new-branch>"),
|
||||
N_("git branch [options] [-r | -a] [--merged | --no-merged]"),
|
||||
N_("git branch [options] [-l] [-f] <branchname> [<start-point>]"),
|
||||
N_("git branch [options] [-r] (-d | -D) <branchname>..."),
|
||||
N_("git branch [options] (-m | -M) [<oldbranch>] <newbranch>"),
|
||||
NULL
|
||||
};
|
||||
|
||||
@ -589,16 +589,9 @@ static char *get_head_description(void)
|
||||
else if (state.bisect_in_progress)
|
||||
strbuf_addf(&desc, _("(no branch, bisect started on %s)"),
|
||||
state.branch);
|
||||
else if (state.detached_from) {
|
||||
/* TRANSLATORS: make sure these match _("HEAD detached at ")
|
||||
and _("HEAD detached from ") in wt-status.c */
|
||||
if (state.detached_at)
|
||||
strbuf_addf(&desc, _("(HEAD detached at %s)"),
|
||||
state.detached_from);
|
||||
else
|
||||
strbuf_addf(&desc, _("(HEAD detached from %s)"),
|
||||
state.detached_from);
|
||||
}
|
||||
else if (state.detached_from)
|
||||
strbuf_addf(&desc, _("(detached from %s)"),
|
||||
state.detached_from);
|
||||
else
|
||||
strbuf_addstr(&desc, _("(no branch)"));
|
||||
free(state.branch);
|
||||
@ -807,7 +800,7 @@ static int edit_branch_description(const char *branch_name)
|
||||
|
||||
int cmd_branch(int argc, const char **argv, const char *prefix)
|
||||
{
|
||||
int delete = 0, rename = 0, force = 0, list = 0;
|
||||
int delete = 0, rename = 0, force_create = 0, list = 0;
|
||||
int verbose = 0, abbrev = -1, detached = 0;
|
||||
int reflog = 0, edit_description = 0;
|
||||
int quiet = 0, unset_upstream = 0;
|
||||
@ -855,7 +848,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
|
||||
OPT_BOOL('l', "create-reflog", &reflog, N_("create the branch's reflog")),
|
||||
OPT_BOOL(0, "edit-description", &edit_description,
|
||||
N_("edit the description for the branch")),
|
||||
OPT__FORCE(&force, N_("force creation, move/rename, deletion")),
|
||||
OPT__FORCE(&force_create, N_("force creation (when already exists)")),
|
||||
{
|
||||
OPTION_CALLBACK, 0, "no-merged", &merge_filter_ref,
|
||||
N_("commit"), N_("print only not merged branches"),
|
||||
@ -898,7 +891,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
|
||||
if (with_commit || merge_filter != NO_FILTER)
|
||||
list = 1;
|
||||
|
||||
if (!!delete + !!rename + !!new_upstream +
|
||||
if (!!delete + !!rename + !!force_create + !!new_upstream +
|
||||
list + unset_upstream > 1)
|
||||
usage_with_options(builtin_branch_usage, options);
|
||||
|
||||
@ -911,11 +904,6 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
|
||||
colopts = 0;
|
||||
}
|
||||
|
||||
if (force) {
|
||||
delete *= 2;
|
||||
rename *= 2;
|
||||
}
|
||||
|
||||
if (delete) {
|
||||
if (!argc)
|
||||
die(_("branch name required"));
|
||||
@ -1032,7 +1020,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
|
||||
|
||||
branch_existed = ref_exists(branch->refname);
|
||||
create_branch(head, argv[0], (argc == 2) ? argv[1] : head,
|
||||
force, reflog, 0, quiet, track);
|
||||
force_create, reflog, 0, quiet, track);
|
||||
|
||||
/*
|
||||
* We only show the instructions if the user gave us
|
||||
|
@ -4,8 +4,12 @@
|
||||
* Copyright (C) Linus Torvalds, 2005
|
||||
*/
|
||||
#include "cache.h"
|
||||
#include "exec_cmd.h"
|
||||
#include "tag.h"
|
||||
#include "tree.h"
|
||||
#include "builtin.h"
|
||||
#include "parse-options.h"
|
||||
#include "diff.h"
|
||||
#include "userdiff.h"
|
||||
#include "streaming.h"
|
||||
|
||||
@ -75,6 +79,8 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
|
||||
if (type_from_string(exp_type) == OBJ_BLOB) {
|
||||
unsigned char blob_sha1[20];
|
||||
if (sha1_object_info(sha1, NULL) == OBJ_TAG) {
|
||||
enum object_type type;
|
||||
unsigned long size;
|
||||
char *buffer = read_sha1_file(sha1, &type, &size);
|
||||
const char *target;
|
||||
if (!skip_prefix(buffer, "object ", &target) ||
|
||||
@ -323,8 +329,8 @@ static int batch_objects(struct batch_options *opt)
|
||||
}
|
||||
|
||||
static const char * const cat_file_usage[] = {
|
||||
N_("git cat-file (-t | -s | -e | -p | <type> | --textconv) <object>"),
|
||||
N_("git cat-file (--batch | --batch-check) < <list-of-objects>"),
|
||||
N_("git cat-file (-t|-s|-e|-p|<type>|--textconv) <object>"),
|
||||
N_("git cat-file (--batch|--batch-check) < <list_of_objects>"),
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -8,8 +8,8 @@ static int all_attrs;
|
||||
static int cached_attrs;
|
||||
static int stdin_paths;
|
||||
static const char * const check_attr_usage[] = {
|
||||
N_("git check-attr [-a | --all | <attr>...] [--] <pathname>..."),
|
||||
N_("git check-attr --stdin [-z] [-a | --all | <attr>...] < <list-of-paths>"),
|
||||
N_("git check-attr [-a | --all | attr...] [--] pathname..."),
|
||||
N_("git check-attr --stdin [-z] [-a | --all | attr...] < <list-of-paths>"),
|
||||
NULL
|
||||
};
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user