summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Documentation: add setup instructions for Travis CIls/travis-submitting-patchesLars Schneider2016-05-021-17/+63
| | | | | | | Also change UK english "behaviour" to US english "behavior". Signed-off-by: Lars Schneider <larsxschneider@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'ep/ident-with-getaddrinfo'Junio C Hamano2015-12-081-4/+27
|\ | | | | | | | | | | | | | | | | A build without NO_IPv6 used to use gethostbyname() when guessing user's hostname, instead of getaddrinfo() that is used in other codepaths in such a build. * ep/ident-with-getaddrinfo: ident.c: add support for IPv6
| * ident.c: add support for IPv6Elia Pinto2015-11-281-4/+27
| | | | | | | | | | | | | | | | | | | | | | Add IPv6 support by implementing name resolution with the protocol agnostic getaddrinfo(3) API. The old gethostbyname(3) code is still available when git is compiled with NO_IPV6. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Helped-by: Jeff King <peff@peff.net> Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Jeff King <peff@peff.net>
* | Merge branch 'ls/test-must-fail-sigpipe'Junio C Hamano2015-12-083-20/+41
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Fix some racy client/server tests by treating SIGPIPE the same as a normal non-zero exit. * ls/test-must-fail-sigpipe: add "ok=sigpipe" to test_must_fail and use it to fix flaky tests implement test_might_fail using a refactored test_must_fail
| * | add "ok=sigpipe" to test_must_fail and use it to fix flaky testsls/test-must-fail-sigpipeLars Schneider2015-11-283-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | t5516 "75 - deny fetch unreachable SHA1, allowtipsha1inwant=true" is flaky in the following case: 1. remote upload-pack finds out "not our ref" 2. remote sends a response and closes the pipe 3. fetch-pack still tries to write commands to the remote upload-pack 4. write call in wrapper.c dies with SIGPIPE The test is flaky because the sending fetch-pack may or may not have finished writing its output by step (3). If it did, then we see a closed pipe on the next read() call. If it didn't, then we get the SIGPIPE from step (4) above. Both are fine, but the latter fools test_must_fail. t5504 "9 - push with transfer.fsckobjects" is flaky, too, and returns SIGPIPE once in a while. I had to remove the final "To dst..." output check because there is no output if the process dies with SIGPIPE. Accept such a death-with-sigpipe also as OK when we are expecting a failure. Signed-off-by: Lars Schneider <larsxschneider@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
| * | implement test_might_fail using a refactored test_must_failLars Schneider2015-11-281-14/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an (optional) first parameter "ok=<special case>" to test_must_fail and return success for "<special case>". Add "success" as "<special case>" and use it to implement "test_might_fail". This removes redundancies in test-lib-function.sh. You can pass multiple <special case> arguments divided by comma (e.g. "test_must_fail ok=success,something") Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Lars Schneider <larsxschneider@gmail.com> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Jeff King <peff@peff.net>
* | | Merge branch 'dt/refs-backend-pre-vtable'Junio C Hamano2015-12-087-3682/+3776
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code preparation for pluggable ref backends. * dt/refs-backend-pre-vtable: refs: break out ref conflict checks files_log_ref_write: new function initdb: make safe_create_dir public refs: split filesystem-based refs code into a new file refs/refs-internal.h: new header file refname_is_safe(): improve docstring pack_if_possible_fn(): use ref_type() instead of is_per_worktree_ref() copy_msg(): rename to copy_reflog_msg() verify_refname_available(): new function verify_refname_available(): rename function
| * | | refs: break out ref conflict checksdt/refs-backend-pre-vtableDavid Turner2015-11-203-42/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create new function find_descendant_ref, to hold one of the ref conflict checks used in verify_refname_available. Multiple backends will need this function, so move it to the common code. Also move rename_ref_available to the common code, because alternate backends might need it and it has no files-backend-specific code. Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Jeff King <peff@peff.net>
| * | | files_log_ref_write: new functionDavid Turner2015-11-202-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because HEAD and stash are per-worktree, every refs backend needs to go through the files backend to write these refs. So create a new function, files_log_ref_write, and add it to refs/refs-internal.h. Later, we will use this to handle reflog updates for per-worktree symbolic refs (HEAD). Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Jeff King <peff@peff.net>
| * | | initdb: make safe_create_dir publicDavid Turner2015-11-203-12/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Soon we will want to create initdb functions for ref backends, and code from initdb that calls this function needs to move into the files backend. So this function needs to be public. Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Jeff King <peff@peff.net>
| * | | refs: split filesystem-based refs code into a new fileMichael Haggerty2015-11-203-3536/+3545
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As another step in the move to pluggable reference backends, move the code that is specific to the filesystem-based reference backend (i.e., the current system of storing references as loose and packed files) into a separate file, refs/files-backend.c. Aside from a tiny bit of file header boilerplate, this commit only moves a subset of the code verbatim from refs.c to the new file, as can easily be verified using patience diff: git diff --patience $commit^:refs.c $commit:refs.c git diff --patience $commit^:refs.c $commit:refs/files-backend.c Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Jeff King <peff@peff.net>
| * | | refs/refs-internal.h: new header fileMichael Haggerty2015-11-202-165/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a number of constants, structs, and static functions defined in refs.c and treated as private to the references module. But we want to support multiple reference backends within the reference module, and those backends will need access to some heretofore private declarations. We don't want those declarations to be visible to non-refs code, so we don't want to move them to refs.h. Instead, add a new header file, refs/refs-internal.h, that is intended to be included only from within the refs module. Make some functions non-static and move some declarations (and their corresponding docstrings) from refs.c to this file. In a moment we will add more content to the "refs" subdirectory. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Jeff King <peff@peff.net>
| * | | refname_is_safe(): improve docstringMichael Haggerty2015-11-201-6/+10
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Jeff King <peff@peff.net>
| * | | pack_if_possible_fn(): use ref_type() instead of is_per_worktree_ref()Michael Haggerty2015-11-201-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is_per_worktree_ref() will soon be made private, so use the public interface, ref_type(), in its place. And now that we're using ref_type(), we can make it clear that we won't pack pseudorefs. This was the case before, but due to the not-so-obvious reason that this function is applied to references via the loose reference cache, which only includes references that live inside "refs/". Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Jeff King <peff@peff.net>
| * | | copy_msg(): rename to copy_reflog_msg()David Turner2015-11-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We will soon increase the visibility of this function, so make its name more distinctive. Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Jeff King <peff@peff.net>
| * | | verify_refname_available(): new functionRonnie Sahlberg2015-11-201-26/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new verify_refname_available() function, which checks whether the refname is available for use, taking all references (both packed and loose) into account. This function, unlike the old verify_refname_available(), has semantics independent of the choice of reference storage, and can therefore be implemented by alternative reference backends. Use the new function in a couple of places. Signed-off-by: Ronnie Sahlberg <sahlberg@google.com> Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Jeff King <peff@peff.net>
| * | | verify_refname_available(): rename functionRonnie Sahlberg2015-11-201-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename verify_refname_available() to verify_refname_available_dir() to make the old name available for a more general purpose. Signed-off-by: Ronnie Sahlberg <sahlberg@google.com> Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Jeff King <peff@peff.net>
* | | | Sync with 2.6.4Junio C Hamano2015-12-083-6/+21
|\ \ \ \
| * | | | Git 2.6.4v2.6.4Junio C Hamano2015-12-083-2/+18
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Merge branch 'rs/status-detached-head-memcmp' into maintJunio C Hamano2015-12-081-5/+4
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix some string-matching corner cases when digging in the reflog for "git status". * rs/status-detached-head-memcmp: wt-status: correct and simplify check for detached HEAD
| | * | | | wt-status: correct and simplify check for detached HEADrs/status-detached-head-memcmpRené Scharfe2015-11-281-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a branch name is longer than four characters then memcmp() reads over the end of the static string "HEAD". This causes the following test failures with AddressSanitizer: t3203-branch-output.sh (Wstat: 256 Tests: 18 Failed: 4) Failed tests: 12, 15-17 Non-zero exit status: 1 t3412-rebase-root.sh (Wstat: 256 Tests: 31 Failed: 3) Failed tests: 28-29, 31 Non-zero exit status: 1 t3507-cherry-pick-conflict.sh (Wstat: 256 Tests: 31 Failed: 4) Failed tests: 14, 29-31 Non-zero exit status: 1 t3510-cherry-pick-sequence.sh (Wstat: 256 Tests: 39 Failed: 14) Failed tests: 17, 22-26, 28-30, 34-35, 37-39 Non-zero exit status: 1 t3420-rebase-autostash.sh (Wstat: 256 Tests: 28 Failed: 4) Failed tests: 24-27 Non-zero exit status: 1 t3404-rebase-interactive.sh (Wstat: 256 Tests: 91 Failed: 57) Failed tests: 17, 19, 21-42, 44, 46-74, 77, 81-82 Non-zero exit status: 1 t3900-i18n-commit.sh (Wstat: 256 Tests: 34 Failed: 1) Failed test: 34 Non-zero exit status: 1 t5407-post-rewrite-hook.sh (Wstat: 256 Tests: 14 Failed: 6) Failed tests: 9-14 Non-zero exit status: 1 t7001-mv.sh (Wstat: 256 Tests: 46 Failed: 5) Failed tests: 39-43 Non-zero exit status: 1 t7509-commit.sh (Wstat: 256 Tests: 12 Failed: 2) Failed tests: 11-12 Non-zero exit status: 1 t7512-status-help.sh (Wstat: 256 Tests: 39 Failed: 35) Failed tests: 5-39 Non-zero exit status: 1 t6030-bisect-porcelain.sh (Wstat: 256 Tests: 70 Failed: 1) Failed test: 13 Non-zero exit status: 1 And if a branch is named "H", "HE", or "HEA" then the current if clause erroneously considers it as matching "HEAD" because it only compares up to the end of the branch name. Fix that by doing the comparison using strcmp() and only after the branch name is extracted. This way neither too less nor too many characters are checked. While at it call strchrnul() to find the end of the branch name instead of open-coding it. Helped-by: Jeff King <peff@peff.net> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Jeff King <peff@peff.net>
| * | | | | Merge branch 'ad/sha1-update-chunked' into maintJunio C Hamano2015-12-087-13/+69
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apple's common crypto implementation of SHA1_Update() does not take more than 4GB at a time, and we now have a compile-time workaround for it. * ad/sha1-update-chunked: sha1: allow limiting the size of the data passed to SHA1_Update() sha1: provide another level of indirection for the SHA-1 functions
| * \ \ \ \ \ Merge branch 'sg/bash-prompt-dirty-orphan' into maintJunio C Hamano2015-12-082-7/+31
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Produce correct "dirty" marker for shell prompts, even when we are on an orphan or an unborn branch. * sg/bash-prompt-dirty-orphan: bash prompt: indicate dirty index even on orphan branches bash prompt: remove a redundant 'git diff' option bash prompt: test dirty index and worktree while on an orphan branch
| * \ \ \ \ \ \ Merge branch 'jk/interpret-trailers-outside-a-repository' into maintJunio C Hamano2015-12-081-1/+1
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow "git interpret-trailers" to run outside of a Git repository. * jk/interpret-trailers-outside-a-repository: interpret-trailers: allow running outside a repository
| * \ \ \ \ \ \ \ Merge branch 'jk/rebase-no-autostash' into maintJunio C Hamano2015-12-083-2/+16
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was no way to defeat a configured rebase.autostash variable from the command line, as "git rebase --no-autostash" was missing. * jk/rebase-no-autostash: Documentation/git-rebase: fix --no-autostash formatting rebase: support --no-autostash
* | \ \ \ \ \ \ \ \ Sync with maintJunio C Hamano2015-12-041-0/+48
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: Prepare for 2.6.4
| * | | | | | | | | Prepare for 2.6.4Junio C Hamano2015-12-042-1/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | Merge branch 'da/difftool' into maintJunio C Hamano2015-12-042-3/+20
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code to prepare the working tree side of temporary directory for the "dir-diff" feature forgot that symbolic links need not be copied (or symlinked) to the temporary area, as the code already special cases and overwrites them. Besides, it was wrong to try computing the object name of the target of symbolic link, which may not even exist or may be a directory. * da/difftool: difftool: ignore symbolic links in use_wt_file
| * \ \ \ \ \ \ \ \ \ Merge branch 'dk/gc-idx-wo-pack' into maintJunio C Hamano2015-12-046-22/+78
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having a leftover .idx file without corresponding .pack file in the repository hurts performance; "git gc" learned to prune them. We may want to do the same for .bitmap (and notice but not prune .keep) without corresponding .pack, but that can be a separate topic. * dk/gc-idx-wo-pack: gc: remove garbage .idx files from pack dir t5304: test cleaning pack garbage prepare_packed_git(): refactor garbage reporting in pack directory
* | | | | | | | | | | | RelNotes update for 2.7Junio C Hamano2015-12-041-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | | Merge branch 'sg/bash-prompt-dirty-orphan'Junio C Hamano2015-12-042-7/+31
|\ \ \ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Produce correct "dirty" marker for shell prompts, even when we are on an orphan or an unborn branch. * sg/bash-prompt-dirty-orphan: bash prompt: indicate dirty index even on orphan branches bash prompt: remove a redundant 'git diff' option bash prompt: test dirty index and worktree while on an orphan branch
| * | | | | | | | | | | bash prompt: indicate dirty index even on orphan branchessg/bash-prompt-dirty-orphanSZEDER GĂ¡bor2015-11-242-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | __git_ps1() doesn't indicate dirty index while on an orphan branch. To check the dirtiness of the index, __git_ps1() runs 'git diff-index --cached ... HEAD', which doesn't work on an orphan branch, because HEAD doesn't point to a valid commit. Run 'git diff ... --cached' instead, as it does the right thing both on valid and invalid HEAD, i.e. compares the index to the existing HEAD in the former case and to the empty tree in the latter. This fixes the two failing tests added in the first commit of this series. The dirtiness of the worktree is already checked with 'git diff' and is displayed correctly even on an orphan branch. Signed-off-by: SZEDER GĂ¡bor <szeder@ira.uka.de> Signed-off-by: Jeff King <peff@peff.net>
| * | | | | | | | | | | bash prompt: remove a redundant 'git diff' optionSZEDER GĂ¡bor2015-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To get the dirty state indicator __git_ps1() runs 'git diff' with '--quiet --exit-code' options. '--quiet' already implies '--exit-code', so the latter is unnecessary and can be removed. Signed-off-by: SZEDER GĂ¡bor <szeder@ira.uka.de> Signed-off-by: Jeff King <peff@peff.net>
| * | | | | | | | | | | bash prompt: test dirty index and worktree while on an orphan branchSZEDER GĂ¡bor2015-11-241-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is only a single test exercising the dirty state indicator on an orphan branch, and in that test neither the index nor the worktree are dirty. Add two failing tests to check the dirty state indicator while either the index is dirty or while both the index and the worktree are dirty on an orphan branch, and to show that the dirtiness of the index is not displayed in these cases (the fourth combination, i.e. clean index and dirty worktree are impossible on an orphan branch). Update the existing dirty state indicator on clean orphan branch test to match the style of the two new tests, most importantly to use 'git checkout --orphan' instead of cd-ing into a repository that just happens to be empty and clean. Signed-off-by: SZEDER GĂ¡bor <szeder@ira.uka.de> Signed-off-by: Jeff King <peff@peff.net>
* | | | | | | | | | | | Merge branch 'np/credential-cache-sighup'Junio C Hamano2015-12-042-0/+10
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Workaround for using credential-cache with emacs. * np/credential-cache-sighup: credential-cache: new option to ignore sighup
| * | | | | | | | | | | | credential-cache: new option to ignore sighupnp/credential-cache-sighupNoam Postavsky2015-11-202-0/+10
| | |_|_|_|_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce new option "credentialCache.ignoreSIGHUP" which stops git-credential-cache--daemon from quitting on SIGHUP. This is useful when "git push" is started from Emacs, because all child processes (including the daemon) will receive a SIGHUP when "git push" exits. Signed-off-by: Noam Postavsky <npostavs@users.sourceforge.net> Signed-off-by: Jeff King <peff@peff.net>
* | | | | | | | | | | | Merge branch 'rs/parseopt-short-help'Junio C Hamano2015-12-044-48/+23
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make "-h" command line option work more consistently in all commands. * rs/parseopt-short-help: show-ref: stop using PARSE_OPT_NO_INTERNAL_HELP grep: stop using PARSE_OPT_NO_INTERNAL_HELP parse-options: allow -h as a short option parse-options: inline parse_options_usage() at its only remaining caller parse-options: deduplicate parse_options_usage() calls
| * | | | | | | | | | | | show-ref: stop using PARSE_OPT_NO_INTERNAL_HELPrs/parseopt-short-helpRené Scharfe2015-11-201-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The flag PARSE_OPT_NO_INTERNAL_HELP is set to allow overriding the option -h, except when it's the only one given. This is the default behavior now, so remove the flag and the hand-rolled --help-all handling. The internal --help-all handler now actually shows hidden options, i.e. -h in this case. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Jeff King <peff@peff.net>
| * | | | | | | | | | | | grep: stop using PARSE_OPT_NO_INTERNAL_HELPRené Scharfe2015-11-201-16/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The flag PARSE_OPT_NO_INTERNAL_HELP is set to allow overriding the option -h, except when it's the only one given. This is the default behavior now, so remove the flag and the hand-rolled --help-all handling. The internal --help-all handler now actually shows hidden options, i.e. --debug in this case. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Jeff King <peff@peff.net>
| * | | | | | | | | | | | parse-options: allow -h as a short optionRené Scharfe2015-11-202-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let callers provide their own handler for the short option -h even without the flag PARSE_OPT_NO_INTERNAL_HELP, but call the internal handler (showing usage information) if that is the only parameter. Implement the first part by checking for -h only if parse_short_opt() can't find it and returns -2. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Jeff King <peff@peff.net>
| * | | | | | | | | | | | parse-options: inline parse_options_usage() at its only remaining callerRené Scharfe2015-11-201-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Jeff King <peff@peff.net>
| * | | | | | | | | | | | parse-options: deduplicate parse_options_usage() callsRené Scharfe2015-11-201-6/+12
| |/ / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid long lines and repeating parse_options_usage() calls with their duplicate parameters by providing labels with speaking names to jump to. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Jeff King <peff@peff.net>
* | | | | | | | | | | | Merge branch 'jk/send-email-complete-aliases'Junio C Hamano2015-12-044-0/+124
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach send-email to dump mail aliases, so that we can do tab completion on the command line. * jk/send-email-complete-aliases: completion: add support for completing email aliases sendemail: teach git-send-email to dump alias names
| * | | | | | | | | | | | completion: add support for completing email aliasesJacob Keller2015-11-201-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using the new --dump-aliases option from git-send-email, add completion for --to, --cc, --bcc, and --from with the available configured aliases. Signed-off-by: Jacob Keller <jacob.keller@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
| * | | | | | | | | | | | sendemail: teach git-send-email to dump alias namesJacob Keller2015-11-203-0/+108
| |/ / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an option "--dump-aliases" which changes the default behavior of git-send-email. This mode will simply read the alias files configured by sendemail.aliasesfile and sendemail.aliasfiletype and dump a list of all configured aliases, one per line. The intended use case for this option is the bash-completion script which will use it to autocomplete aliases on the options which take addresses. Add some tests for the new option using various alias file formats. A possible future extension to the alias dump format could be done by extending the --dump-aliases to take an optional argument defining the format to display. This has not been done in this patch as no user of this information has been identified. Signed-off-by: Jacob Keller <jacob.keller@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
* | | | | | | | | | | | Merge branch 'jk/filter-branch-no-index'Junio C Hamano2015-12-042-2/+40
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Speed up filter-branch for cases where we only care about rewriting commits, not tree data. * jk/filter-branch-no-index: filter-branch: skip index read/write when possible
| * | | | | | | | | | | | filter-branch: skip index read/write when possibleJeff King2015-11-062-2/+40
| | |_|_|_|_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user specifies an index filter but not a tree filter, filter-branch cleverly avoids checking out the tree entirely. But we don't do the next level of optimization: if you have no index or tree filter, we do not need to read the index at all. This can greatly speed up cases where we are only changing the commit objects (e.g., cementing a graft into place). Here are numbers from the newly-added perf test: Test HEAD^ HEAD --------------------------------------------------------------- 7000.2: noop filter 13.81(4.95+0.83) 5.43(0.42+0.43) -60.7% Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | | Merge branch 'ad/sha1-update-chunked'Junio C Hamano2015-12-047-13/+69
|\ \ \ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apple's common crypto implementation of SHA1_Update() does not take more than 4GB at a time, and we now have a compile-time workaround for it. * ad/sha1-update-chunked: sha1: allow limiting the size of the data passed to SHA1_Update() sha1: provide another level of indirection for the SHA-1 functions
| * | | | | | | | | | | sha1: allow limiting the size of the data passed to SHA1_Update()ad/sha1-update-chunkedAtousa Pahlevan Duprat2015-11-055-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using the previous commit's inredirection mechanism for SHA1, support a chunked implementation of SHA1_Update() that limits the amount of data in the chunk passed to SHA1_Update(). This is enabled by using the Makefile variable SHA1_MAX_BLOCK_SIZE to specify chunk size. When using Apple's CommonCrypto library this is set to 1GiB (the implementation cannot handle more 4GiB). Signed-off-by: Atousa Pahlevan Duprat <apahlevan@ieee.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | sha1: provide another level of indirection for the SHA-1 functionsAtousa Pahlevan Duprat2015-11-053-13/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The git source uses git_SHA1_Update() and friends to call into the code that computes the hashes. Traditionally, we used to map these directly to underlying implementation of the SHA-1 hash (e.g. SHA1_Update() from OpenSSL or blk_SHA1_Update() from block-sha1/). This arrangement however makes it hard to tweak behaviour of the underlying implementation without fully replacing. If we want to introduce a tweaked_SHA1_Update() wrapper to implement the "Update" in a slightly different way, for example, the implementation of the wrapper still would want to call into the underlying implementation, but tweaked_SHA1_Update() cannot call git_SHA1_Update() to get to the underlying implementation (often but not always SHA1_Update()). Add another level of indirection that maps platform_SHA1_Update() and friends to their underlying implementations, and by default make git_SHA1_Update() and friends map to platform_SHA1_* functions. Doing it this way will later allow us to map git_SHA1_Update() to tweaked_SHA1_Update(), and the latter can use platform_SHA1_Update() in its implementation. Signed-off-by: Atousa Pahlevan Duprat <apahlevan@ieee.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>