summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-02-26Merge branch 'sp/smart-http-failure-to-push'Libravatar Junio C Hamano1-3/+10
* sp/smart-http-failure-to-push: : Mask SIGPIPE on the command channel going to a transport helper disconnect from remote helpers more gently Conflicts: transport-helper.c
2012-02-26Merge branch 'fc/push-prune'Libravatar Junio C Hamano7-40/+101
* fc/push-prune: push: add '--prune' option remote: refactor code into alloc_delete_ref() remote: reorganize check_pattern_match() remote: use a local variable in match_push_refs() Conflicts: builtin/push.c
2012-02-26Merge branch 'jc/doc-merge-options'Libravatar Junio C Hamano1-11/+11
* jc/doc-merge-options: Documentation/merge-options.txt: group "ff" related options together
2012-02-26Merge branch 'jk/maint-avoid-streaming-filtered-contents'Libravatar Junio C Hamano4-9/+125
* jk/maint-avoid-streaming-filtered-contents: do not stream large files to pack when filters are in use teach dry-run convert_to_git not to require a src buffer teach convert_to_git a "dry run" mode
2012-02-26Merge branch 'jb/filter-ignore-sigpipe'Libravatar Junio C Hamano1-0/+5
* jb/filter-ignore-sigpipe: Ignore SIGPIPE when running a filter driver
2012-02-26pack-objects: Fix compilation with NO_PTHREDSLibravatar Michał Kiedrowicz1-1/+1
It looks like commit 99fb6e04 (pack-objects: convert to use parse_options(), 2012-02-01) moved the #ifdef NO_PTHREDS around but hasn't noticed that the 'arg' variable no longer is available. Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com> Acked-by: Nguyen Thai Ngoc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-26Merge branch 'maint'Libravatar Junio C Hamano12-72/+291
* maint: Document accumulated fixes since 1.7.9.2 Git 1.7.8.5 grep -P: Fix matching ^ and $ am: don't infloop for an empty input file rebase -m: only call "notes copy" when rewritten exists and is non-empty git-p4: remove bash-ism in t9800 git-p4: remove bash-ism in t9809 git-p4: fix submit regression with clientSpec and subdir clone git-p4: set useClientSpec variable on initial clone Makefile: add thread-utils.h to LIB_H Conflicts: RelNotes t/t9809-git-p4-client-view.sh
2012-02-26Document accumulated fixes since 1.7.9.2Libravatar Junio C Hamano2-1/+18
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-26Merge branch 'jc/add-refresh-unmerged' into maintLibravatar Junio C Hamano2-2/+24
* jc/add-refresh-unmerged: refresh_index: do not show unmerged path that is outside pathspec
2012-02-26Merge branch 'js/configure-libintl' into maintLibravatar Junio C Hamano1-8/+12
* js/configure-libintl: configure: don't use -lintl when there is no gettext support
2012-02-26Sync with 1.7.8.5Libravatar Junio C Hamano6-6/+39
2012-02-26Git 1.7.8.5Libravatar Junio C Hamano3-2/+21
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-26grep -P: Fix matching ^ and $Libravatar Michał Kiedrowicz1-1/+1
When "git grep" is run with -P/--perl-regexp, it doesn't match ^ and $ at the beginning/end of the line. This is because PCRE normally matches ^ and $ at the beginning/end of the whole text, not for each line, and "git grep" passes a large chunk of text (possibly containing many lines) to pcre_exec() and then splits the text into lines. This makes "git grep -P" behave differently from "git grep -E" and also from "grep -P" and "pcregrep": $ cat file a b $ git grep --no-index -P '^ ' file $ git grep --no-index -E '^ ' file file: b $ grep -c -P '^ ' file b $ pcregrep -c '^ ' file b Reported-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-26am: don't infloop for an empty input fileLibravatar Jim Meyering2-1/+11
git-am.sh's check_patch_format function would attempt to preview the patch to guess its format, but would go into an infinite loop when the patch file happened to be empty. The solution: exit the loop when "read" fails, not when the line var, "$l1" becomes empty. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-26rebase -m: only call "notes copy" when rewritten exists and is non-emptyLibravatar Andrew Wong1-4/+7
This prevents a shell error complaining rebase-merge/rewritten doesn't exist. Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-26git-p4: remove bash-ism in t9800Libravatar Pete Wyckoff1-9/+15
This works in both bash and dash: $ bash -c 'VAR=1 env' | grep VAR VAR=1 $ dash -c 'VAR=1 env' | grep VAR VAR=1 But environment variables assigned this way are not necessarily propagated through a function in POSIX compliant shells: $ bash -c 'f() { "$@" }; VAR=1 f "env"' | grep VAR VAR=1 $ dash -c 'f() { "$@" }; VAR=1 f "env"' | grep VAR Fix constructs like this, in particular, setting variables through test_must_fail. Based-on-patch-by: Vitor Antunes <vitor.hda@gmail.com> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-26git-p4: remove bash-ism in t9809Libravatar Pete Wyckoff1-1/+1
Plain old $# works to count the number of arguments in either bash or dash, even if the arguments have spaces. Based-on-patch-by: Vitor Antunes <vitor.hda@gmail.com> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-26git-p4: fix submit regression with clientSpec and subdir cloneLibravatar Pete Wyckoff2-43/+185
When the --use-client-spec is given to clone, and the clone path is a subset of the full tree as specified in the client, future submits will go to the wrong place. Factor out getClientSpec() so both clone/sync and submit can use it. Introduce getClientRoot() that is needed for the client spec case, and use it instead of p4Where(). Test the five possible submit behaviors (add, modify, rename, copy, delete). Reported-by: Laurent Charrière <lcharriere@promptu.com> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-26git-p4: set useClientSpec variable on initial cloneLibravatar Pete Wyckoff3-4/+34
If --use-client-spec was given, set the matching configuration variable. This is necessary to ensure that future submits work properly. The alternatives of requiring the user to set it, or providing a command-line option on every submit, are error prone. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-26Makefile: add thread-utils.h to LIB_HLibravatar Dmitry V. Levin1-0/+1
Starting with commit v1.7.8-165-g0579f91, grep.h includes thread-utils.h, so the latter has to be added to LIB_H. Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> Acked-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-24do not stream large files to pack when filters are in useLibravatar Jeff King2-5/+95
Because git's object format requires us to specify the number of bytes in the object in its header, we must know the size before streaming a blob into the object database. This is not a problem when adding a regular file, as we can get the size from stat(). However, when filters are in use (such as autocrlf, or the ident, filter, or eol gitattributes), we have no idea what the ultimate size will be. The current code just punts on the whole issue and ignores filter configuration entirely for files larger than core.bigfilethreshold. This can generate confusing results if you use filters for large binary files, as the filter will suddenly stop working as the file goes over a certain size. Rather than try to handle unknown input sizes with streaming, this patch just turns off the streaming optimization when filters are in use. This has a slight performance regression in a very specific case: if you have autocrlf on, but no gitattributes, a large binary file will avoid the streaming code path because we don't know beforehand whether it will need conversion or not. But if you are handling large binary files, you should be marking them as such via attributes (or at least not using autocrlf, and instead marking your text files as such). And the flip side is that if you have a large _non_-binary file, there is a correctness improvement; before we did not apply the conversion at all. The first half of the new t1051 script covers these failures on input. The second half tests the matching output code paths. These already work correctly, and do not need any adjustment. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-24teach dry-run convert_to_git not to require a src bufferLibravatar Jeff King1-2/+10
When we call convert_to_git in dry-run mode, it may still want to look at the source buffer, because some CRLF conversion modes depend on analyzing the source to determine whether it is in fact convertible CRLF text. However, the main motivation for convert_to_git's dry-run mode is that we would decide which method to use to acquire the blob's data (streaming versus in-core). Requiring this source analysis creates a chicken-and-egg problem. We are better off simply guessing that anything we can't analyze will end up needing conversion. This patch lets a caller specify a NULL src buffer when using dry-run mode (and only dry-run mode). A non-zero return value goes from "we would convert" to "we might convert"; a zero return value remains "we would definitely not convert". Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-24teach convert_to_git a "dry run" modeLibravatar Jeff King2-2/+20
Some callers may want to know whether convert_to_git will actually do anything before performing the conversion itself (e.g., to decide whether to stream or handle blobs in-core). This patch lets callers specify the dry run mode by passing a NULL destination buffer. The return value, instead of indicating whether conversion happened, will indicate whether conversion would occur. For readability, we also include a wrapper function which makes it more obvious we are not actually performing the conversion. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-23Update draft release notes to 1.7.10Libravatar Junio C Hamano1-1/+24
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-23Merge branch 'ld/git-p4-expanded-keywords'Libravatar Junio C Hamano3-10/+501
* ld/git-p4-expanded-keywords: : Teach git-p4 to unexpand $RCS$-like keywords that are embedded in : tracked contents in order to reduce unnecessary merge conflicts. git-p4: add initial support for RCS keywords
2012-02-23Merge branch 'jk/config-include'Libravatar Junio C Hamano8-60/+495
* jk/config-include: : An assignment to the include.path pseudo-variable causes the named file : to be included in-place when Git looks up configuration variables. config: add include directive config: eliminate config_exclusive_filename config: stop using config_exclusive_filename config: provide a version of git_config with more options config: teach git_config_rename_section a file argument config: teach git_config_set_multivar_in_file a default path config: copy the return value of prefix_filename t1300: add missing &&-chaining docs/api-config: minor clarifications docs: add a basic description of the config API
2012-02-23Merge branch 'jc/add-refresh-unmerged'Libravatar Junio C Hamano2-2/+24
* jc/add-refresh-unmerged: refresh_index: do not show unmerged path that is outside pathspec
2012-02-23Merge branch 'js/configure-libintl'Libravatar Junio C Hamano1-8/+12
* js/configure-libintl: configure: don't use -lintl when there is no gettext support
2012-02-23Merge branch 'pj/remote-set-branches-usage-fix'Libravatar Junio C Hamano2-2/+2
* pj/remote-set-branches-usage-fix: remote: fix set-branches usage and documentation Conflicts: builtin/remote.c
2012-02-23Merge branch 'tr/perftest'Libravatar Junio C Hamano14-552/+1363
* tr/perftest: Add a performance test for git-grep Introduce a performance testing framework Move the user-facing test library to test-lib-functions.sh
2012-02-23Merge branch 'maint'Libravatar Junio C Hamano2-4/+11
* maint: README: point to Documentation/SubmittingPatches Document merge.branchdesc configuration variable
2012-02-23git-p4: add initial support for RCS keywordsLibravatar Luke Diamand3-10/+501
RCS keywords cause problems for git-p4 as perforce always expands them (if +k is set) and so when applying the patch, git reports that the files have been modified by both sides, when in fact they haven't. This change means that when git-p4 detects a problem applying a patch, it will check to see if keyword expansion could be the culprit. If it is, it strips the keywords in the p4 repository so that they match what git is expecting. It then has another go at applying the patch. This behaviour is enabled with a new git-p4 configuration option and is off by default. Acked-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-23merge: do not trust fstat(2) too much when checking interactivenessLibravatar Junio C Hamano1-1/+1
The heuristic used by "git merge" to decide if it automatically gives an editor upon clean automerge is to see if the standard input and the standard output is the same device and is a tty, we are in an interactive session. "The same device" test was done by comparing fstat(2) result on the two file descriptors (and they must match), and we asked isatty() only for the standard input (we insist that they are the same device and there is no point asking tty-ness of the standard output). The stat(2) emulation in the Windows port however does not give a usable value in the st_ino field, so even if the standard output is connected to something different from the standard input, "The same device" test may incorrectly return true. To accomodate it, add another isatty() check for the standard output stream as well. Reported-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-23README: point to Documentation/SubmittingPatchesLibravatar Matthieu Moy1-4/+6
It was indeed not obvious for new contributors to find this document in the source tree, since there were no reference to it outside the Documentation/ directory. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-23Document merge.branchdesc configuration variableLibravatar Junio C Hamano1-0/+5
This was part of the "branch description" feature in the larger "help people communicate better during their pull based workflow" topic, but was never documented. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-23disconnect from remote helpers more gentlyLibravatar Jeff King1-3/+10
When git spawns a remote helper program (like git-remote-http), the last thing we do before closing the pipe to the child process is to send a blank line, telling the helper that we are done issuing commands. However, the helper may already have exited, in which case the parent git process will receive SIGPIPE and die. In particular, this can happen with the remote-curl helper when it encounters errors during a push. The helper reports individual errors for each ref back to git-push, and then exits with a non-zero exit code. Depending on the exact timing of the write, the parent process may or may not receive SIGPIPE. This causes intermittent test failure in t5541.8, and is a side effect of 5238cbf (remote-curl: Fix push status report when all branches fail). Before that commit, remote-curl would not send the final blank line to indicate that the list of status lines was complete; it would just exit, closing the pipe. The parent git-push would notice the closed pipe while reading the status report and exit immediately itself, propagating the failing exit code. But post-5238cbf, remote-curl completes the status list before exiting, git-push actually runs to completion, and then it tries to cleanly disconnect the helper, leading to the SIGPIPE race above. This patch drops all error-checking when sending the final "we are about to hang up" blank line to helpers. There is nothing useful for the parent process to do about errors at that point anyway, and certainly failing to send our "we are done with commands" line to a helper that has already exited is not a problem. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-22push: add '--prune' optionLibravatar Felipe Contreras7-5/+60
When pushing groups of refs to a remote, there is no simple way to remove old refs that still exist at the remote that is no longer updated from us. This will allow us to remove such refs from the remote. With this change, running this command $ git push --prune remote refs/heads/*:refs/remotes/laptop/* removes refs/remotes/laptop/foo from the remote if we do not have branch "foo" locally anymore. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-22Sync with 1.7.9.2Libravatar Junio C Hamano2-17/+6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-22Git 1.7.9.2Libravatar Junio C Hamano2-2/+3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-22remote: refactor code into alloc_delete_ref()Libravatar Felipe Contreras1-5/+9
Will be useful in next patches. No functional changes. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-22remote: reorganize check_pattern_match()Libravatar Felipe Contreras1-29/+30
The function match_name_with_pattern() is called twice, once to see if a pattern matches with the name, and again to learn what the matched pattern maps the name to. Since check_pattern_match() is only used in one place, we can just reorganize it to make a single call and fetch the values at the same time. This changes the meaning of check_pattern_match() that used to check which pattern in the array of refspecs matched the given ref, to return the name of the remote ref the given ref is mapped to. Rename it to get_ref_match() which actually describes more closely what it's actually doing now. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-22remote: use a local variable in match_push_refs()Libravatar Felipe Contreras1-9/+10
So that we can reuse src later on. No functional changes. Will be useful in next patches. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-22Documentation/merge-options.txt: group "ff" related options togetherLibravatar Junio C Hamano1-11/+11
The --ff-only option was not described next to --ff and --no-ff options in "git merge" documentation, even though these three are logically together, describing how to choose one of three possibilities. Also the description for '--ff' and '--no-ff' discussed what '--ff' means, and mentioned '--no-ff' as if it were a side-note to '--ff'. Make them into three top-level entries and list them together. This way, it would be more clear that the user can choose one from these three. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-22completion: use tabs for indentationLibravatar Philip Jägenstedt1-4/+4
CodingGuidlines confidently declares "We use tabs for indentation." It would be a shame if it were caught lying. Signed-off-by: Philip Jägenstedt <philip@foolip.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-22completion: remove stale "to submit patches" documentationLibravatar Philip Jägenstedt1-12/+0
It was out-of-sync with the reality of who works on this script. Defer (silently) to Documentation/SubmittingPatches like all other code. Signed-off-by: Philip Jägenstedt <philip@foolip.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-22git-p4: the option to specify 'host' is -H, not -hLibravatar Russell Myers1-1/+1
This was broken since the feature was introduced initially at abcaf07 (If the user has configured various parameters, use them., 2008-08-10). Acked-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-21t9100: remove bogus " || test" after each test scriptletLibravatar Junio C Hamano1-5/+9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-21Merge branch 'master' of git://bogomips.org/git-svnLibravatar Junio C Hamano3-44/+59
* 'master' of git://bogomips.org/git-svn: git-svn.perl: fix a false-positive in the "already exists" test git-svn.perl: perform deletions before anything else git-svn: Fix time zone in --localtime git-svn: un-break "git svn rebase" when log.abbrevCommit=true git-svn: remove redundant porcelain option to rev-list completion: add --interactive option to git svn dcommit
2012-02-21Update draft release notes to 1.7.10Libravatar Junio C Hamano1-40/+6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-21Merge branch 'jn/gitweb-unborn-head'Libravatar Junio C Hamano2-2/+11
* jn/gitweb-unborn-head: gitweb: Fix "heads" view when there is no current branch