Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let git-mktree validate tree objects better #6

Closed
wants to merge 136 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
e86f8ba
Merge branch 'sv/doc-stripspace' into next
gitster Dec 15, 2014
f5759d0
Merge branch 'jc/hook-cleanup' into next
gitster Dec 15, 2014
20b045f
Merge branch 'jk/colors' into next
gitster Dec 15, 2014
c48b110
Merge branch 'jk/lock-ref-sha1-basic-return-errors' into next
gitster Dec 15, 2014
3834789
Merge branch 'mg/add-ignore-errors' into next
gitster Dec 15, 2014
3e5490b
Merge branch 'tb/config-core-filemode-check-on-broken-fs' into next
gitster Dec 15, 2014
0e88699
Merge branch 'jc/refer-to-t-readme-from-submitting-patches' into next
gitster Dec 15, 2014
65ffd05
Merge branch 'js/t5000-dont-copy-bin-sh' into next
gitster Dec 15, 2014
6e8e9ff
Merge branch 'rj/no-xopen-source-for-cygwin' into next
gitster Dec 15, 2014
42937b7
Merge branch 'dw/shell-basename-dashdash-before-stripping-leading-das…
gitster Dec 15, 2014
351e03e
Merge branch 'mh/simplify-repack-without-refs' into next
gitster Dec 15, 2014
b44b6bd
Merge branch 'pb/am-message-id-footer' into next
gitster Dec 15, 2014
38c2810
Merge branch 'pb/send-email-te' into next
gitster Dec 15, 2014
08fdf77
Merge branch 'jc/clone-borrow' into next
gitster Dec 15, 2014
e91a7df
Merge branch 'jc/checkout-local-track-report' into next
gitster Dec 15, 2014
59c6636
Merge branch 'jc/diff-b-m' into next
gitster Dec 15, 2014
b499889
Merge branch 'jc/strbuf-add-lines-avoid-sp-ht-sequence' into next
gitster Dec 15, 2014
b72475f
Merge branch 'jc/conflict-hint' into next
gitster Dec 15, 2014
cac279e
Merge branch 'jc/merge-bases' into next
gitster Dec 15, 2014
34db9af
Merge branch 'nd/lockfile-absolute' into next
gitster Dec 15, 2014
504af0b
Merge branch 'br/imap-send-verbosity' into next
gitster Dec 15, 2014
90db637
Merge branch 'br/imap-send-via-libcurl' into next
gitster Dec 15, 2014
397e986
Merge branch 'jk/approxidate-avoid-y-d-m-over-future-dates' into next
gitster Dec 15, 2014
77f6c6a
Merge branch 'cc/interpret-trailers-more' into next
gitster Dec 15, 2014
e3b2b62
Merge branch 'mh/find-uniq-abbrev' into next
gitster Dec 15, 2014
f926ee5
Merge branch 'jc/exec-cmd-system-path-leak-fix' into next
gitster Dec 15, 2014
ef8c99f
Merge branch 'js/push-to-deploy' into next
gitster Dec 15, 2014
f56c339
Merge branch 'rj/t0050-passes' into next
gitster Dec 15, 2014
c0fcefb
Merge branch 'rt/for-each-ref-spell-tcl-as-Tcl' into next
gitster Dec 15, 2014
8da6e09
Merge branch 'nd/ls-tree-pathspec' into next
gitster Dec 15, 2014
0787b56
Merge branch 'ps/new-workdir-into-empty-directory' into next
gitster Dec 15, 2014
0eb2fe6
Merge branch 'dm/compat-s-ifmt-for-zos' into next
gitster Dec 15, 2014
4cfd999
Merge branch 'jk/credential-quit' into next
gitster Dec 15, 2014
c50f748
Merge branch 'mg/doc-check-ignore-tracked-are-not-ignored' into next
gitster Dec 15, 2014
b03ee39
Merge branch 'rt/completion-tag' into next
gitster Dec 15, 2014
8bb8ddd
Merge branch 'sb/string-list' into next
gitster Dec 15, 2014
de71f08
Merge branch 'jk/for-each-reflog-ent-reverse' into next
gitster Dec 15, 2014
ba24e75
Merge branch 'tb/t0027-eol-conversion' into next
gitster Dec 15, 2014
8366f2c
Merge branch 'mg/branch-d-m-f' into next
gitster Dec 15, 2014
646e77e
Merge branch 'po/doc-assume-unchanged' into next
gitster Dec 15, 2014
455f26c
Merge branch 'js/fsck-tag-validation' into next
gitster Dec 15, 2014
a8da691
Merge branch 'js/test-hashmap-squelch-gcc' into next
gitster Dec 15, 2014
ded2f99
Merge branch 'rw/apply-does-not-take-ignore-date' into next
gitster Dec 15, 2014
c3fb2c8
Merge branch 'jk/always-allow-large-packets' into next
gitster Dec 15, 2014
c6d6f56
Merge branch 'jk/read-packed-refs-without-path-max' into next
gitster Dec 15, 2014
4a1f7ed
Merge branch 'ok/rebase-i-count-todo' into next
gitster Dec 15, 2014
d24cb92
Merge branch 'jk/test-asan' into next
gitster Dec 15, 2014
ed6490c
Merge branch 'nd/split-index' into next
gitster Dec 15, 2014
047530e
Merge branch 'jk/commit-date-approxidate' into next
gitster Dec 15, 2014
32d7d50
Merge branch 'ch/new-gpg-drops-rfc-1991' into next
gitster Dec 15, 2014
bb9cac9
Merge branch 'jg/prompt-localize-temporary' into next
gitster Dec 15, 2014
d6426a0
Merge branch 'rs/use-strbuf-complete-line' into next
gitster Dec 15, 2014
fbed2d8
Merge branch 'ch/new-gpg-drops-rfc-1991' into next
gitster Dec 16, 2014
41e5f3a
Merge branch 'master' into next
gitster Dec 18, 2014
0ad48de
Merge branch 'master' into next
gitster Dec 22, 2014
3aa9a62
Merge branch 'mh/update-ref-verify' into next
gitster Dec 23, 2014
9b76001
Merge branch 'jk/add-i-read-error' into next
gitster Dec 23, 2014
e2b10ab
Merge branch 'pd/completion-filenames-fix' into next
gitster Dec 23, 2014
2b101ce
Merge branch 'rd/send-email-2047-fix' into next
gitster Dec 23, 2014
fc16c68
Merge branch 'lh/send-email-hide-x-mailer' into next
gitster Dec 23, 2014
a992011
Merge branch 'sb/t5400-remove-unused' into next
gitster Dec 23, 2014
e88cf6a
Merge branch 'es/squelch-openssl-warnings-on-macosx' into next
gitster Dec 23, 2014
d2b3e84
Merge branch 'po/doc-core-ignorestat' into next
gitster Dec 23, 2014
c865690
Merge branch 'sb/dco-indentation-fix' into next
gitster Dec 23, 2014
3a2ec87
Merge branch 'jc/t9001-modernise' into next
gitster Dec 23, 2014
b4ce669
Merge branch 'bb/update-unicode-table' into next
gitster Dec 23, 2014
dfcd89f
Merge branch 'tf/prompt-preserve-exit-status' into next
gitster Dec 23, 2014
c516021
Merge branch 'jh/pre-push-sample-no-custom-ifs' into next
gitster Dec 29, 2014
c19b91c
Merge branch 'dotgit-case-maint-1.8.5' into next
gitster Dec 29, 2014
9301c36
Merge branch 'bw/maint-0090-awk-tweak' into next
gitster Dec 29, 2014
cc831f2
Sync with master
gitster Dec 29, 2014
7b76eed
Merge branch 'cc/bisect-rev-parsing' into next
gitster Jan 7, 2015
d45c06d
Merge branch 'es/checkout-index-temp' into next
gitster Jan 7, 2015
4d4a600
Merge branch 'rs/plug-strbuf-leak-in-lock-ref' into next
gitster Jan 7, 2015
2cb8cea
Merge branch 'rs/plug-strbuf-leak-in-merge' into next
gitster Jan 7, 2015
51446e0
Merge branch 'rs/simplify-parsing-commit-tree-S' into next
gitster Jan 7, 2015
cd27fc8
Merge branch 'rs/simplify-transport-get' into next
gitster Jan 7, 2015
c362440
Merge branch 'sb/doc-submitting-patches-keep-notes' into next
gitster Jan 7, 2015
60f9ada
Merge branch 'bc/fetch-thin-less-aggressive-in-normal-repository' int…
gitster Jan 7, 2015
47473d1
Merge branch 'master' into next
gitster Jan 7, 2015
4ac2a10
log: teach --invert-grep option
junghans Dec 19, 2014
d6db8a9
Sync with v2.3.0-rc0
gitster Jan 12, 2015
ccff14f
Merge branch 'js/remote-add-with-insteadof' into next
gitster Jan 12, 2015
5bb8802
Merge branch 'km/imap-send-libcurl-options' into next
gitster Jan 12, 2015
437bf8a
Merge branch 'km/log-usage-string-i18n' into next
gitster Jan 12, 2015
7c488d6
Merge branch 'sp/subtree-doc' into next
gitster Jan 12, 2015
61d0b22
Merge branch 'aw/doc-smtp-ssl-cert-path' into next
gitster Jan 12, 2015
edcdead
Merge branch 'mm/complete-rebase-autostash' into next
gitster Jan 12, 2015
9aed017
Merge branch 'rh/hide-prompt-in-ignored-directory' into next
gitster Jan 12, 2015
eac0b93
Merge branch 'rh/test-color-avoid-terminfo-in-original-home' into next
gitster Jan 12, 2015
c660a71
Merge branch 'po/doc-core-ignorestat' into next
gitster Jan 12, 2015
94eef27
Merge branch 'rc/for-each-ref-tracking' into next
gitster Jan 12, 2015
5e789e2
Merge branch 'jk/prune-packed-server-info' into next
gitster Jan 12, 2015
313c449
Merge branch 'jn/rerere-fail-on-auto-update-failure' into next
gitster Jan 12, 2015
4c67038
Merge branch 'bc/http-fallback-to-password-after-krb-fails' into next
gitster Jan 12, 2015
6b4605b
Merge branch 'dk/format-patch-ignore-diff-submodule' into next
gitster Jan 12, 2015
3a0de03
Merge branch 'ak/show-branch-usage-string' into next
gitster Jan 12, 2015
57f125c
Merge branch 'rh/autoconf-rhel3' into next
gitster Jan 12, 2015
0888edf
Merge branch 'ak/doc-add-v-n-options' into next
gitster Jan 12, 2015
d425e96
Merge branch 'ak/fewer-includes' into next
gitster Jan 12, 2015
0cbbf4a
Merge branch 'km/gettext-n' into next
gitster Jan 12, 2015
4589ca2
Merge branch 'cj/log-invert-grep' into next
gitster Jan 12, 2015
12a7dff
Merge branch 'mh/reflog-expire' into next
gitster Jan 12, 2015
411c6a6
Merge branch 'sb/atomic-push' into next
gitster Jan 12, 2015
e64df63
Merge branch 'jc/push-to-checkout' into next
gitster Jan 12, 2015
1f57989
Revert "Merge branch 'cj/log-invert-grep' into next"
gitster Jan 13, 2015
c908e99
Merge branch 'cj/log-invert-grep' into next
gitster Jan 13, 2015
a93d346
Merge branch 'tf/prompt-preserve-exit-status' into next
gitster Jan 14, 2015
12c4e28
Merge branch 'sb/atomic-push' into next
gitster Jan 14, 2015
cfa011e
Sync with master
gitster Jan 14, 2015
f681c76
Sync with git-svn update
gitster Jan 15, 2015
12b646a
Merge branch 'jk/http-push-symref-fix' into next
gitster Jan 16, 2015
f010b00
Merge branch 'js/t1050' into next
gitster Jan 16, 2015
1b32e21
Merge branch 'jk/blame-commit-label' into next
gitster Jan 16, 2015
bb1a4b3
Merge branch 'ak/cat-file-clean-up' into next
gitster Jan 16, 2015
2db92d6
git-p4: support excluding paths on sync
luked99 Jan 17, 2015
f40c73c
Merge branch 'master' into next
gitster Jan 21, 2015
8c770d1
Merge branch 'master' into next
gitster Jan 22, 2015
77fd5f0
Merge branch 'jc/unused-symbols' into next
gitster Jan 22, 2015
3c96639
Merge branch 'jc/coding-guidelines' into next
gitster Jan 22, 2015
2a81ecc
Merge branch 'jc/pretty-format-doc' into next
gitster Jan 22, 2015
e36f25a
Merge branch 'ak/typofixes' into next
gitster Jan 22, 2015
f6f1fc7
Merge branch 'ld/p4-exclude-in-sync' into next
gitster Jan 22, 2015
bfa5bab
Merge branch 'ah/usage-strings' into next
gitster Jan 22, 2015
ed972d3
Merge branch 'ld/p4-submit-hint' into next
gitster Jan 23, 2015
4b64765
Merge branch 'master' into next
gitster Jan 27, 2015
303d43c
Merge branch 'master' into next
gitster Feb 2, 2015
157212a
TO-UNDO: debug
dscho Dec 9, 2014
b097cc9
fsck_commit: look at parents only if the commit was parsed already
dscho Feb 3, 2015
2819adc
git-mktree: introduce the --strict option
dscho Dec 9, 2014
b7f3576
Add tests for git-mktree validation
dscho Dec 9, 2014
d2ccaa5
git hash-object: introduce the --strict option
dscho Dec 9, 2014
a8c1ace
Add a test for hash-object --strict
dscho Dec 9, 2014
f12847a
Enforce validation with `git replace --edit`
dscho Dec 9, 2014
abb0028
Verify that `git replace --edit` validates before replacing
dscho Dec 9, 2014
09826f5
DEBUG
dscho Feb 3, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions Documentation/CodingGuidelines
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,14 @@ For C programs:

- When you come up with an API, document it.

- 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.
- 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.

- If you are planning a new command, consider writing it in shell
or perl first, so that changes in semantics can be easily
Expand Down Expand Up @@ -441,6 +446,10 @@ 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>.)
Expand All @@ -457,12 +466,12 @@ Writing Documentation:
(Zero or more of <patch>. Note that the dots are inside, not
outside the brackets.)

Multiple alternatives are indicated with vertical bar:
Multiple alternatives are indicated with vertical bars:
[-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>.)

Expand Down
11 changes: 10 additions & 1 deletion Documentation/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2094,6 +2094,11 @@ rebase.autostash::
successful rebase might result in non-trivial conflicts.
Defaults to false.

receive.advertiseatomic::
By default, git-receive-pack will advertise the atomic push
capability to its clients. If you don't want to this capability
to be advertised, set this variable to false.

receive.autogc::
By default, git-receive-pack will run "git-gc --auto" after
receiving data from git-push and updating refs. You can stop
Expand Down Expand Up @@ -2153,11 +2158,15 @@ receive.denyCurrentBranch::
message. Defaults to "refuse".
+
Another option is "updateInstead" which will update the working
directory (must be clean) if pushing into the current branch. This option is
tree if pushing into the current branch. This option is
intended for synchronizing working directories when one side is not easily
accessible via interactive ssh (e.g. a live web site, hence the requirement
that the working directory be clean). This mode also comes in handy when
developing inside a VM to test and fix code on different Operating Systems.
+
By default, "updateInstead" will refuse the push if the working tree or
the index have any difference from the HEAD, but the `push-to-checkout`
hook can be used to customize this. See linkgit:githooks[5].

receive.denyNonFastForwards::
If set to true, git-receive-pack will deny a ref update which is
Expand Down
7 changes: 5 additions & 2 deletions Documentation/git-hash-object.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ git-hash-object - Compute object ID and optionally creates a blob from a file
SYNOPSIS
--------
[verse]
'git hash-object' [-t <type>] [-w] [--path=<file>|--no-filters] [--stdin] [--] <file>...
'git hash-object' [-t <type>] [-w] --stdin-paths [--no-filters] < <list-of-paths>
'git hash-object' [--strict] [-t <type>] [-w] [--path=<file>|--no-filters] [--stdin] [--] <file>...
'git hash-object' [--strict] [-t <type>] [-w] --stdin-paths [--no-filters] < <list-of-paths>

DESCRIPTION
-----------
Expand All @@ -25,6 +25,9 @@ specified, it defaults to "blob".
OPTIONS
-------

--strict::
Validate the object (equivalent to linkgit:git-fsck[1]).

-t <type>::
Specify the type (default: "blob").

Expand Down
6 changes: 5 additions & 1 deletion Documentation/git-mktree.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ git-mktree - Build a tree-object from ls-tree formatted text
SYNOPSIS
--------
[verse]
'git mktree' [-z] [--missing] [--batch]
'git mktree' [-z] [--strict] [--missing] [--batch]

DESCRIPTION
-----------
Expand All @@ -23,6 +23,10 @@ OPTIONS
-z::
Read the NUL-terminated `ls-tree -z` output instead.

--strict::
Validate the tree object before writing (the validation is equivalent
to the one performed by linkgit:git-fsck[1]).

--missing::
Allow missing objects. The default behaviour (without this option)
is to verify that each tree entry's sha1 identifies an existing
Expand Down
6 changes: 3 additions & 3 deletions Documentation/git-p4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,9 @@ 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'
Expand All @@ -254,9 +257,6 @@ 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.
Expand Down
7 changes: 6 additions & 1 deletion Documentation/git-push.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ git-push - Update remote refs along with associated objects
SYNOPSIS
--------
[verse]
'git push' [--all | --mirror | --tags] [--follow-tags] [-n | --dry-run] [--receive-pack=<git-receive-pack>]
'git push' [--all | --mirror | --tags] [--follow-tags] [--atomic] [-n | --dry-run] [--receive-pack=<git-receive-pack>]
[--repo=<repository>] [-f | --force] [--prune] [-v | --verbose]
[-u | --set-upstream] [--signed]
[--force-with-lease[=<refname>[:<expect>]]]
Expand Down Expand Up @@ -136,6 +136,11 @@ 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
Expand Down
7 changes: 6 additions & 1 deletion Documentation/git-send-pack.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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] [<host>:]<directory> [<ref>...]
'git send-pack' [--all] [--dry-run] [--force] [--receive-pack=<git-receive-pack>] [--verbose] [--thin] [--atomic] [<host>:]<directory> [<ref>...]

DESCRIPTION
-----------
Expand Down Expand Up @@ -62,6 +62,11 @@ 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
Expand Down
30 changes: 30 additions & 0 deletions Documentation/githooks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,36 @@ 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
~~~~~~~~~~~

Expand Down
10 changes: 7 additions & 3 deletions Documentation/pretty-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@

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' and 'format:<string>'. See
the "PRETTY FORMATS" section for some additional details for each
format. When omitted, the format defaults to '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'.
+
Note: you can specify the default pretty format in the repository
configuration (see linkgit:git-config[1]).
Expand Down
4 changes: 4 additions & 0 deletions Documentation/rev-list-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ if it is part of the log message.
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
Expand Down
13 changes: 11 additions & 2 deletions Documentation/technical/protocol-capabilities.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ 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 'report-status', 'delete-refs', 'quiet', and 'push-cert' capabilities
are sent and recognized by the receive-pack (push to server) process.
The 'atomic', '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
Expand Down Expand Up @@ -244,6 +245,14 @@ 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
----------------------

Expand Down
19 changes: 18 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,23 @@ all::
#
# 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.

GIT-VERSION-FILE: FORCE
@$(SHELL_PATH) ./GIT-VERSION-GEN
-include GIT-VERSION-FILE

# CFLAGS and LDFLAGS are for the users to override from the command line.

CFLAGS = -g -O2 -Wall
CFLAGS = -g -Wall
LDFLAGS =
ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)
ALL_LDFLAGS = $(LDFLAGS)
Expand Down Expand Up @@ -955,6 +964,14 @@ 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)
Expand Down
2 changes: 1 addition & 1 deletion advice.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
4 changes: 2 additions & 2 deletions archive.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand Down
2 changes: 1 addition & 1 deletion builtin/add.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
17 changes: 6 additions & 11 deletions builtin/apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ 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
};

Expand Down Expand Up @@ -657,11 +657,6 @@ 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)
{
Expand All @@ -684,10 +679,10 @@ static char *find_name_common(const char *line, const char *def,
start = line;
}
if (!start)
return squash_slash(null_strdup(def));
return squash_slash(xstrdup_or_null(def));
len = line - start;
if (!len)
return squash_slash(null_strdup(def));
return squash_slash(xstrdup_or_null(def));

/*
* Generally we prefer the shorter name, especially
Expand Down Expand Up @@ -909,7 +904,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 = null_strdup(name);
patch->new_name = xstrdup_or_null(name);
}
}
if (!name)
Expand Down Expand Up @@ -998,15 +993,15 @@ static int gitdiff_delete(const char *line, struct patch *patch)
{
patch->is_delete = 1;
free(patch->old_name);
patch->old_name = null_strdup(patch->def_name);
patch->old_name = xstrdup_or_null(patch->def_name);
return gitdiff_oldmode(line, patch);
}

static int gitdiff_newfile(const char *line, struct patch *patch)
{
patch->is_new = 1;
free(patch->new_name);
patch->new_name = null_strdup(patch->def_name);
patch->new_name = xstrdup_or_null(patch->def_name);
return gitdiff_newmode(line, patch);
}

Expand Down
Loading