summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-10-27git-compat-util.h: support variadic macros with the XL C compilerLibravatar David Michael1-1/+1
When the XL C compiler is run with an appropriate language level or suboption, it defines a feature test macro to indicate support for variadic macros by defining __C99_MACRO_WITH_VA_ARGS C preprocessor macro. This was tested on z/OS, but it should also work on AIX according to IBM documentation. Signed-off-by: David Michael <fedora.dm0@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-10-07Merge branch 'maint-2.0' into maintLibravatar Junio C Hamano1-1/+1
* maint-2.0: git-tag.txt: Add a missing hyphen to `-s`
2014-10-07Merge branch 'maint-1.9' into maint-2.0Libravatar Junio C Hamano1-1/+1
* maint-1.9: git-tag.txt: Add a missing hyphen to `-s`
2014-10-07Merge branch 'maint-1.8.5' into maint-1.9Libravatar Junio C Hamano1-1/+1
* maint-1.8.5: git-tag.txt: Add a missing hyphen to `-s`
2014-10-07Merge branch 'jk/mbox-from-line' into maintLibravatar Junio C Hamano6-1/+66
Some MUAs mangled a line in a message that begins with "From " to ">From " when writing to a mailbox file and feeding such an input to "git am" used to lose such a line. * jk/mbox-from-line: mailinfo: work around -Wstring-plus-int warning mailinfo: make ">From" in-body header check more robust
2014-10-07git-tag.txt: Add a missing hyphen to `-s`Libravatar Wieland Hoffmann1-1/+1
Signed-off-by: Wieland Hoffmann <themineo@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-09-29Git 2.1.2Libravatar Junio C Hamano4-3/+24
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-09-29Merge branch 'jk/fsck-exit-code-fix' into maintLibravatar Junio C Hamano3-9/+87
"git fsck" failed to report that it found corrupt objects via its exit status in some cases. * jk/fsck-exit-code-fix: fsck: return non-zero status on missing ref tips fsck: exit with non-zero status upon error from fsck_obj()
2014-09-29Merge branch 'ta/config-add-to-empty-or-true-fix' into maintLibravatar Junio C Hamano4-7/+41
"git config --add section.var val" used to lose existing section.var whose value was an empty string. * ta/config-add-to-empty-or-true-fix: config: avoid a funny sentinel value "a^" make config --add behave correctly for empty and NULL values
2014-09-29Merge branch 'mk/reachable-protect-detached-head' into maintLibravatar Junio C Hamano2-0/+25
Reachability check (used in "git prune" and friends) did not add a detached HEAD as a starting point to traverse objects still in use. * mk/reachable-protect-detached-head: reachable.c: add HEAD to reachability starting commits
2014-09-29Merge branch 'mb/fast-import-delete-root' into maintLibravatar Junio C Hamano2-1/+109
An attempt to remove the entire tree in the "git fast-import" input stream caused it to misbehave. * mb/fast-import-delete-root: fast-import: fix segfault in store_tree() t9300: test filedelete command
2014-09-29Merge branch 'jk/index-pack-threading-races' into maintLibravatar Junio C Hamano1-2/+31
When receiving an invalid pack stream that records the same object twice, multiple threads got confused due to a race. * jk/index-pack-threading-races: index-pack: fix race condition with duplicate bases
2014-09-29Merge branch 'jk/send-pack-many-refspecs' into maintLibravatar Junio C Hamano5-2/+153
"git push" over HTTP transport had an artificial limit on number of refs that can be pushed imposed by the command line length. * jk/send-pack-many-refspecs: send-pack: take refspecs over stdin
2014-09-29Merge branch 'so/rebase-doc' into maintLibravatar Junio C Hamano1-6/+3
* so/rebase-doc: Documentation/git-rebase.txt: <upstream> must be given to specify <branch> Documentation/git-rebase.txt: -f forces a rebase that would otherwise be a no-op
2014-09-28Merge branch 'maint' of git://github.com/git-l10n/git-po into maintLibravatar Junio C Hamano2-50/+51
* 'maint' of git://github.com/git-l10n/git-po: l10n: de.po: use comma before "um" l10n: de.po: change Email to E-Mail po/TEAMS: add new member to German translation team
2014-09-25l10n: de.po: use comma before "um"Libravatar Phillip Sz1-43/+43
This patch adds a comma before the "um". See: http://www.duden.de/sprachwissen/rechtschreibregeln/komma#K117 Signed-off-by: Phillip Sz <phillip.szelat@gmail.com> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2014-09-25l10n: de.po: change Email to E-MailLibravatar Phillip Sz1-7/+7
Change all Email to E-Mail, as this is the correct form in German. Signed-off-by: Phillip Sz <phillip.szelat@gmail.com> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2014-09-25po/TEAMS: add new member to German translation teamLibravatar Ralf Thielow1-0/+1
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2014-09-22mailinfo: work around -Wstring-plus-int warningLibravatar Eric Sunshine1-1/+2
The just-released Apple Xcode 6.0.1 has -Wstring-plus-int enabled by default which complains about pointer arithmetic applied to a string literal: builtin/mailinfo.c:303:24: warning: adding 'long' to a string does not append to the string return !memcmp(SAMPLE + (cp - line), cp, strlen(SAMPLE) ... ~~~~~~~^~~~~~~~~~~~~ Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-09-19Git 2.1.1Libravatar Junio C Hamano4-3/+48
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-09-19Merge branch 'et/spell-poll-infinite-with-minus-one-only' into maintLibravatar Junio C Hamano1-1/+3
* et/spell-poll-infinite-with-minus-one-only: upload-pack: keep poll(2)'s timeout to -1
2014-09-19Merge branch 'nd/fetch-pass-quiet-to-gc-child-process' into maintLibravatar Junio C Hamano1-4/+6
* nd/fetch-pass-quiet-to-gc-child-process: fetch: silence git-gc if --quiet is given fetch: convert argv_gc_auto to struct argv_array
2014-09-19Merge branch 'jk/prune-top-level-refs-after-packing' into maintLibravatar Junio C Hamano2-1/+9
* jk/prune-top-level-refs-after-packing: pack-refs: prune top-level refs like "refs/foo"
2014-09-19Merge branch 'jk/fast-import-fixes' into maintLibravatar Junio C Hamano1-8/+13
* jk/fast-import-fixes: fast-import: fix buffer overflow in dump_tags fast-import: clean up pack_data pointer in end_packfile
2014-09-19Merge branch 'jn/unpack-trees-checkout-m-carry-deletion' into maintLibravatar Junio C Hamano2-21/+27
* jn/unpack-trees-checkout-m-carry-deletion: checkout -m: attempt merge when deletion of path was staged unpack-trees: use 'cuddled' style for if-else cascade unpack-trees: simplify 'all other failures' case
2014-09-19Merge branch 'sp/pack-protocol-doc-on-shallow' into maintLibravatar Junio C Hamano1-1/+1
* sp/pack-protocol-doc-on-shallow: Document LF appearing in shallow command during send-pack/receive-pack
2014-09-19Merge branch 'jk/prompt-stash-could-be-packed' into maintLibravatar Junio C Hamano1-1/+2
* jk/prompt-stash-could-be-packed: git-prompt: do not look for refs/stash in $GIT_DIR
2014-09-19Merge branch 'rs/refresh-beyond-symlink' into maintLibravatar Junio C Hamano2-0/+51
* rs/refresh-beyond-symlink: read-cache: check for leading symlinks when refreshing index
2014-09-19Merge branch 'lf/bundle-exclusion' into maintLibravatar Junio C Hamano2-3/+6
* lf/bundle-exclusion: bundle: fix exclusion of annotated tags
2014-09-19Merge branch 'jc/apply-ws-prefix' into maintLibravatar Junio C Hamano3-63/+96
* jc/apply-ws-prefix: apply: omit ws check for excluded paths apply: hoist use_patch() helper for path exclusion up apply: use the right attribute for paths in non-Git patches Conflicts: builtin/apply.c
2014-09-19Merge branch 'jk/command-line-config-empty-string' into maintLibravatar Junio C Hamano3-2/+26
* jk/command-line-config-empty-string: config: teach "git -c" to recognize an empty string Conflicts: config.c
2014-09-19Merge branch 'jk/pretty-empty-format' into maintLibravatar Junio C Hamano5-6/+14
* jk/pretty-empty-format: pretty: make empty userformats truly empty pretty: treat "--format=" as an empty userformat revision: drop useless string offset when parsing "--pretty"
2014-09-16Documentation/git-rebase.txt: <upstream> must be given to specify <branch>Libravatar Sergey Organov1-1/+1
Current syntax description makes one wonder if there is any syntactic way to distinguish between <branch> and <upstream> so that one can specify <branch> but not <upstream>, but that is not the case. Make it explicit that these arguments are positional, i.e. the earlier ones cannot be omitted if you want to give later ones. Signed-off-by: Sergey Organov <sorganov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-09-16mailinfo: make ">From" in-body header check more robustLibravatar Jeff King6-1/+65
Since commit 81c5cf7 (mailinfo: skip bogus UNIX From line inside body, 2006-05-21), we have treated lines like ">From" in the body as headers. This makes "git am" work for people who erroneously paste the whole output from format-patch: From 12345abcd...fedcba543210 Mon Sep 17 00:00:00 2001 From: them Subject: [PATCH] whatever into their email body (assuming that an mbox writer then quotes "From" as ">From", as otherwise we would actually mailsplit on the in-body line). However, this has false positives if somebody actually has a commit body that starts with "From "; in this case we erroneously remove the line entirely from the commit message. We can make this check more robust by making sure the line actually looks like a real mbox "From" line. Inspect the line that begins with ">From " a more carefully to only skip lines that match the expected pattern (note that the datestamp part of the format-patch output is designed to be kept constant to help those who write magic(5) entries). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-09-12fsck: return non-zero status on missing ref tipsLibravatar Jeff King2-1/+58
Fsck tries hard to detect missing objects, and will complain (and exit non-zero) about any inter-object links that are missing. However, it will not exit non-zero for any missing ref tips, meaning that a severely broken repository may still pass "git fsck && echo ok". The problem is that we use for_each_ref to iterate over the ref tips, which hides broken tips. It does at least print an error from the refs.c code, but fsck does not ever see the ref and cannot note the problem in its exit code. We can solve this by using for_each_rawref and noting the error ourselves. In addition to adding tests for this case, we add tests for all types of missing-object links (all of which worked, but which we were not testing). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-09-11config: avoid a funny sentinel value "a^"Libravatar Jeff King3-7/+21
Introduce CONFIG_REGEX_NONE as a more explicit sentinel value to say "we do not want to replace any existing entry" and use it in the implementation of "git config --add". Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-09-10fsck: exit with non-zero status upon error from fsck_obj()Libravatar Jeff King3-8/+29
Upon finding a corrupt loose object, we forgot to note the error to signal it with the exit status of the entire process. [jc: adjusted t1450 and added another test] Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-09-03reachable.c: add HEAD to reachability starting commitsLibravatar Max Kirillov2-0/+25
HEAD is not explicitly used as a starting commit for calculating reachability, so if it's detached and reflogs are disabled it may be pruned. Add tests which demonstrate it. Test 'prune: prune former HEAD after checking out branch' also reverts changes to repository. Signed-off-by: Max Kirillov <max@max630.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-29index-pack: fix race condition with duplicate basesLibravatar Jeff King1-2/+31
When we are resolving deltas in an indexed pack, we do it by first selecting a potential base (either one stored in full in the pack, or one created by resolving another delta), and then resolving any deltas that use that base. When we resolve a particular delta, we flip its "real_type" field from OBJ_{REF,OFS}_DELTA to whatever the real type is. We assume that traversing the objects this way will visit each delta only once. This is correct for most packs; we visit the delta only when we process its base, and each object (and thus each base) appears only once. However, if a base object appears multiple times in the pack, we will try to resolve any deltas based on it once for each instance. We can detect this case by noting that a delta we are about to resolve has already had its real_type field flipped, and we already do so with an assert(). However, if multiple threads are in use, we may race with another thread on comparing and flipping the field. We need to synchronize the access. The right mechanism for doing this is a compare-and-swap (we atomically "claim" the delta for our own and find out whether our claim was successful). We can implement this in C by using a pthread mutex to protect the operation. This is not the fastest way of doing a compare-and-swap; many processors provide instructions for this, and gcc and other compilers provide builtins to access them. However, some experiments showed that lock contention does not cause a significant slowdown here. Adding c-a-s support for many compilers would increase the maintenance burden (and we would still end up including the pthread version as a fallback). Note that we only need to touch the OBJ_REF_DELTA codepath here. An OBJ_OFS_DELTA object points to its base using an offset, and therefore has only one base, even if another copy of that base object appears in the pack (we do still touch it briefly because the setting of real_type is factored out of resolve_data). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-29fast-import: fix segfault in store_tree()Libravatar Maxim Bublis2-3/+7
Branch tree is NULLified by filedelete command if we are trying to delete root tree. Add sanity check and use load_tree() in that case. Signed-off-by: Maxim Bublis <satori@yandex-team.ru> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-29t9300: test filedelete commandLibravatar Maxim Bublis1-0/+104
Add new fast-import test series for filedelete command. Signed-off-by: Maxim Bublis <satori@yandex-team.ru> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-29Merge git://github.com/git-l10n/git-poLibravatar Junio C Hamano2-1359/+1515
* git://github.com/git-l10n/git-po: po/TEAMS: add new members to German translation team l10n: de.po: translate 38 new messages
2014-08-29po/TEAMS: add new members to German translation teamLibravatar Ralf Thielow1-0/+2
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2014-08-29l10n: de.po: translate 38 new messagesLibravatar Ralf Thielow1-1359/+1513
Translate 38 new messages came from git.pot update in fe05e19 (l10n: git.pot: v2.1.0 round 1 (38 new, 9 removed)). Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2014-08-28Document LF appearing in shallow command during send-pack/receive-packLibravatar Shawn Pearce1-1/+1
The implementation sends an LF, but the protocol documentation was missing this detail. Signed-off-by: Shawn Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-26send-pack: take refspecs over stdinLibravatar Jeff King5-2/+153
Pushing a large number of refs works over most transports, because we implement send-pack as an internal function. However, it can sometimes fail when pushing over http, because we have to spawn "git send-pack --stateless-rpc" to do the heavy lifting, and we pass each refspec on the command line. This can cause us to overflow the OS limits on the size of the command line for a large push. We can solve this by giving send-pack a --stdin option and using it from remote-curl. We already dealt with this on the fetch-pack side in 078b895 (fetch-pack: new --stdin option to read refs from stdin, 2012-04-02). The stdin option (and in particular, its use of packet-lines for stateless-rpc input) is modeled after that solution. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-26Merge branch 'jk/diff-tree-t-fix'Libravatar Junio C Hamano2-1/+45
Fix (rarely used) "git diff-tree -t" regression in 2.0. * jk/diff-tree-t-fix: intersect_paths: respect mode in git's tree-sort
2014-08-26Merge branch 'jk/pack-shallow-always-without-bitmap'Libravatar Junio C Hamano2-0/+40
Reachability bitmaps do not work with shallow operations. Fixes regression in 2.0. * jk/pack-shallow-always-without-bitmap: pack-objects: turn off bitmaps when we see --shallow lines
2014-08-26Merge branch 'jk/fix-profile-feedback-build'Libravatar Junio C Hamano1-1/+5
Fix profile-feedback build broken in 2.1 for tarball releases. * jk/fix-profile-feedback-build: Makefile: make perf tests optional for profile build
2014-08-25checkout -m: attempt merge when deletion of path was stagedLibravatar Jonathan Nieder2-5/+23
twoway_merge() is missing an o->gently check in the case where a file that needs to be modified is missing from the index but present in the old and new trees. As a result, in this case 'git checkout -m' errors out instead of trying to perform a merge. Fix it by checking o->gently. While at it, inline the o->gently check into reject_merge to prevent future call sites from making the same mistake. Noticed by code inspection. The test for the motivating case was added by JC. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>