summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-11-20Merge branch 'jk/maint-diff-grep-textconv' into maintJunio C Hamano
"git diff -G<pattern>" did not honor textconv filter when looking for changes. * jk/maint-diff-grep-textconv: diff_grep: use textconv buffers for add/deleted files
2012-11-20Merge branch 'js/format-2047' into maintJunio C Hamano
Various rfc2047 quoting issues around a non-ASCII name on the From: line in the output from format-patch have been corrected. * js/format-2047: format-patch tests: check quoting/encoding in To: and Cc: headers format-patch: fix rfc2047 address encoding with respect to rfc822 specials format-patch: make rfc2047 encoding more strict format-patch: introduce helper function last_line_length() format-patch: do not wrap rfc2047 encoded headers too late format-patch: do not wrap non-rfc2047 headers too early utf8: fix off-by-one wrapping of text
2012-11-19USE CGYWIN_V15_WIN32API as macro to select api for cygwinMark Levedahl
The previous macro was confusing to some, and did not include "cygwin" in its name. The updated name more clearly expresses a choice of the win32api implementation that shipped with version 1.5 of cygwin. Signed-off-by: Mark Levedahl <mlevedahl@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-19Sync with maintJunio C Hamano
2012-11-19Start preparing for 1.8.0.1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-19Merge branch 'sz/maint-curl-multi-timeout' into maintJunio C Hamano
Sometimes curl_multi_timeout() function suggested a wrong timeout value when there is no file descriptors to wait on and the http transport ended up sleeping for minutes in select(2) system call. A workaround has been added for this. * sz/maint-curl-multi-timeout: Fix potential hang in https handshake
2012-11-19Merge branch 'po/maint-refs-replace-docs' into maintJunio C Hamano
The refs/replace hierarchy was not mentioned in the repository-layout docs. * po/maint-refs-replace-docs: Doc repository-layout: Show refs/replace
2012-11-19Merge branch 'ph/pull-rebase-detached' into maintJunio C Hamano
"git pull --rebase" run while the HEAD is detached tried to find the upstream branch of the detached HEAD (which by definition does not exist) and emitted unnecessary error messages. * ph/pull-rebase-detached: git-pull: Avoid merge-base on detached head
2012-11-19Merge branch 'mm/maint-doc-remote-tracking' into maintJunio C Hamano
Update "remote tracking branch" in the documentation to "remote-tracking branch". * mm/maint-doc-remote-tracking: Documentation: remote tracking branch -> remote-tracking branch
2012-11-19Merge branch 'rs/branch-del-symref' into maintJunio C Hamano
A symbolic ref refs/heads/SYM was not correctly removed with "git branch -d SYM"; the command removed the ref pointed by SYM instead. * rs/branch-del-symref: branch: show targets of deleted symrefs, not sha1s branch: skip commit checks when deleting symref branches branch: delete symref branch, not its target branch: factor out delete_branch_config() branch: factor out check_branch_commit()
2012-11-19Merge branch 'nd/grep-true-path' into maintJunio C Hamano
"git grep -e pattern <tree>" asked the attribute system to read "<tree>:.gitattributes" file in the working tree, which was nonsense. * nd/grep-true-path: grep: stop looking at random places for .gitattributes
2012-11-19Merge branch 'jc/grep-pcre-loose-ends' (early part) into maintJunio C Hamano
"git log -F -E --grep='<ere>'" failed to use the given <ere> pattern as extended regular expression, and instead looked for the string literally. * 'jc/grep-pcre-loose-ends' (early part): log --grep: use the same helper to set -E/-F options as "git grep" revisions: initialize revs->grep_filter using grep_init() grep: move pattern-type bits support to top-level grep.[ch] grep: move the configuration parsing logic to grep.[ch] builtin/grep.c: make configuration callback more reusable
2012-11-19Merge branch 'da/mergetools-p4' into maintJunio C Hamano
"git mergetool" feeds /dev/null as a common ancestor when dealing with an add/add conflict, but p4merge backend cannot handle it. Work it around by passing a temporary empty file. * da/mergetools-p4: mergetools/p4merge: Handle "/dev/null"
2012-11-19Merge branch 'jc/test-say-color-avoid-echo-escape' into maintJunio C Hamano
The "say" function in the test scaffolding incorrectly allowed "echo" to interpret "\a" as if it were a C-string asking for a BEL output. * jc/test-say-color-avoid-echo-escape: test-lib: Fix say_color () not to interpret \a\b\c in the message
2012-11-19Merge branch 'bw/config-lift-variable-name-length-limit' into maintJunio C Hamano
The configuration parser had an unnecessary hardcoded limit on variable names that was not checked consistently. * bw/config-lift-variable-name-length-limit: Remove the hard coded length limit on variable names in config files
2012-11-19submodule: display summary header in boldRamkumar Ramachandra
Currently, 'git diff --submodule' displays output with a bold diff header for non-submodules. So this part is in bold: diff --git a/file1 b/file1 index 30b2f6c..2638038 100644 --- a/file1 +++ b/file1 For submodules, the header looks like this: Submodule submodule1 012b072..248d0fd: Unfortunately, it's easy to miss in the output because it's not bold. Change this. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-19diff: rename "set" variableJeff King
Once upon a time the builtin_diff function used one color, and the color variables were called "set" and "reset". Nowadays it is a much longer function and we use several colors (e.g., "add", "del"). Rename "set" to "meta" to show that it is the color for showing diff meta-info (it still does not indicate that it is a "color", but at least it matches the scheme of the other color variables). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-19diff: introduce diff.submodule configuration variableRamkumar Ramachandra
Introduce a diff.submodule configuration variable corresponding to the '--submodule' command-line option of 'git diff'. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-19Documentation: move diff.wordRegex from config.txt to diff-config.txtRamkumar Ramachandra
19299a8 (Documentation: Move diff.<driver>.* from config.txt to diff-config.txt, 2011-04-07) moved the diff configuration options to diff-config.txt, but forgot about diff.wordRegex, which was left behind in config.txt. Fix this. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-16tcsh-completion re-using git-completion.bashMarc Khouzam
The current tcsh-completion support for Git, as can be found on the Internet, takes the approach of defining the possible completions explicitly. This has the obvious draw-back to require constant updating as the Git code base evolves. The approach taken by this commit is to to re-use the advanced bash completion script and use its result for tcsh completion. This is achieved by sourcing the bash script and outputting the completion result for tcsh consumption. Three solutions were looked at to implement this approach with (C) being retained: A) Modifications: git-completion.bash and new git-completion.tcsh Modify the existing git-completion.bash script to support being sourced using bash (as now), but also executed using bash. When being executed, the script will output the result of the computed completion to be re-used elsewhere (e.g., in tcsh). The modification to git-completion.bash is made not to be tcsh-specific, but to allow future users to also re-use its output. Therefore, to be general, git-completion.bash accepts a second optional parameter, which is not used by tcsh, but could prove useful for other users. Pros: 1- allows the git-completion.bash script to easily be re-used 2- tcsh support is mostly isolated in git-completion.tcsh Cons (for tcsh users only): 1- requires the user to copy both git-completion.tcsh and git-completion.bash to ${HOME} 2- requires bash script to have a fixed name and location: ${HOME}/.git-completion.bash B) Modifications: git-completion.bash Modify the existing git-completion.bash script to support being sourced using bash (as now), but also executed using bash, and sourced using tcsh. Pros: 1- only requires the user to deal with a single file 2- maintenance more obvious for tcsh since it is entirely part of the same git-completion.bash script. Cons: 1- tcsh support could affect bash support as they share the same script 2- small tcsh section must use syntax suitable for both tcsh and bash and must be at the beginning of the script 3- requires script to have a fixed name and location: ${HOME}/.git-completion.sh (for tcsh users only) C) Modifications: New git-completion.tcsh Provide a short tcsh script that generates another script which extends git-completion.bash. This new script can be used by tcsh to perform completion. Pros: 1- tcsh support is entirely isolated in git-completion.tcsh 2- new tcsh script can be as complex as needed Cons (for tcsh users only): 1- requires the user to copy both git-completion.tcsh and git-completion.bash to ${HOME} 2- requires bash script to have a fixed name and location: ${HOME}/.git-completion.bash 3- sourcing the new script will generate a third script Approach (C) was selected avoid any modification to git-completion.bash. Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com> Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-16config: don't segfault when given --path with a missing valueCarlos Martín Nieto
When given a variable without a value, such as '[section] var' and asking git-config to treat it as a path, git_config_pathname returns an error and doesn't modify its output parameter. show_config assumes that the call is always successful and sets a variable to indicate that vptr should be freed. In case of an error however, trying to do this will cause the program to be killed, as it's pointing to memory in the stack. Detect the error and return immediately to avoid freeing or accessing the uninitialed memory in the stack. Signed-off-by: Carlos Martín Nieto <cmn@elego.de> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-16usage.c: detect recursion in die routines and bail out immediatelyBrandon Casey
It is theoretically possible for a die handler to get into a state of infinite recursion. For example, if a die handler called another function which itself called die(). Let's at least detect this situation, inform the user, and call exit. Signed-off-by: Brandon Casey <bcasey@nvidia.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-16checkout: print a message when switching unborn branchesJeff King
When we switch to a new branch using checkout, we usually output a message indicating what happened. However, when we switch from an unborn branch to a new branch, we do not print anything, which may leave the user wondering what happened. The reason is that the unborn branch is a special case (see abe1998), and does not follow the usual switch_branches code path. Let's add a similar informational message to the special case to match the usual code path. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-15Start 1.8.1 cycleJunio C Hamano
Prepare the release notes for the upcoming release, and describe changes up to the 5th batch we just merged. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-15Merge branch 'jc/prettier-pretty-note'Junio C Hamano
Emit the notes attached to the commit in "format-patch --notes" output after three-dashes. * jc/prettier-pretty-note: format-patch: add a blank line between notes and diffstat Doc User-Manual: Patch cover letter, three dashes, and --notes Doc format-patch: clarify --notes use case Doc notes: Include the format-patch --notes option Doc SubmittingPatches: Mention --notes option after "cover letter" Documentation: decribe format-patch --notes format-patch --notes: show notes after three-dashes format-patch: append --signature after notes pretty_print_commit(): do not append notes message pretty: prepare notes message at a centralized place format_note(): simplify API pretty: remove reencode_commit_message()
2012-11-15Merge branch 'mg/maint-pull-suggest-upstream-to'Junio C Hamano
Follow-on to the new "--set-upstream-to" topic from v1.8.0 to avoid suggesting the deprecated "--set-upstream". * mg/maint-pull-suggest-upstream-to: push/pull: adjust missing upstream help text to changed interface
2012-11-15Merge branch 'mh/notes-string-list'Junio C Hamano
Improve the asymptotic performance of the cat_sort_uniq notes merge strategy. * mh/notes-string-list: string_list_add_refs_from_colon_sep(): use string_list_split() notes: fix handling of colon-separated values combine_notes_cat_sort_uniq(): sort and dedup lines all at once Initialize sort_uniq_list using named constant string_list: add a function string_list_remove_empty_items()
2012-11-15Merge branch 'mh/strbuf-split'Junio C Hamano
Cleanups and documentation for strbuf_split. * mh/strbuf-split: strbuf_split*(): document functions strbuf_split*(): rename "delim" parameter to "terminator" strbuf_split_buf(): simplify iteration strbuf_split_buf(): use ALLOC_GROW()
2012-11-15Merge branch 'mm/maint-doc-commit-edit'Junio C Hamano
* mm/maint-doc-commit-edit: Document 'git commit --no-edit' explicitly
2012-11-15Merge branch 'as/maint-doc-fix-no-post-rewrite'Junio C Hamano
* as/maint-doc-fix-no-post-rewrite: commit: fixup misplacement of --no-post-rewrite description
2012-11-15Merge branch 'js/hp-nonstop'Junio C Hamano
Finishing touches to port to HP NonStop continues. * js/hp-nonstop: fix 'make test' for HP NonStop
2012-11-15Merge branch 'cr/cvsimport-local-zone'Junio C Hamano
Allows "cvsimport" to read per-author timezone from the author info file. * cr/cvsimport-local-zone: cvsimport: work around perl tzset issue git-cvsimport: allow author-specific timezones
2012-11-15Merge branch 'jc/same-encoding'Junio C Hamano
Various codepaths checked if two encoding names are the same using ad-hoc code and some of them ended up asking iconv() to convert between "utf8" and "UTF-8". The former is not a valid way to spell the encoding name, but often people use it by mistake, and we equated them in some but not all codepaths. Introduce a new helper function to make these codepaths consistent. * jc/same-encoding: reencode_string(): introduce and use same_encoding() Conflicts: builtin/mailinfo.c
2012-11-15Merge branch 'ph/submodule-sync-recursive'Junio C Hamano
Adds "--recursive" option to submodule sync. * ph/submodule-sync-recursive: Add tests for submodule sync --recursive Teach --recursive to submodule sync
2012-11-15Merge branch 'jk/maint-diff-grep-textconv'Junio C Hamano
Fixes inconsistent use of textconv with "git log -G". * jk/maint-diff-grep-textconv: diff_grep: use textconv buffers for add/deleted files
2012-11-15Merge branch 'jh/symbolic-ref-d'Junio C Hamano
Add "symbolic-ref -d SYM" to delete a symbolic ref SYM. It is already possible to remove a symbolic ref with "update-ref -d --no-deref", but it may be a good addition for completeness. * jh/symbolic-ref-d: git symbolic-ref --delete $symref
2012-11-15Merge branch 'jc/maint-fetch-tighten-refname-check'Junio C Hamano
For a fetch refspec (or the result of applying wildcard on one), we always want the RHS to map to something inside "refs/" hierarchy. This was split out from discarded jc/maint-push-refs-all topic. * jc/maint-fetch-tighten-refname-check: get_fetch_map(): tighten checks on dest refs
2012-11-14docs: move submodule sectionMatt Kraai
293ab15e ("submodule: teach rm to remove submodules unless they contain a git directory", 2012-09-26) inserted the "Submodules" section between a sentence describing a command and the command. Move the "Submodules" section further down. Noticed-by: Horst H. von Brand Signed-off-by: Matt Kraai <kraai@ftbfs.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-14completion: remove 'help' duplicate from porcelain commandsSZEDER Gábor
The list of all git commands is computed from the output of 'git help -a', which already includes 'help', so there is no need to explicitly add it once more when computing the list of porcelain commands. Note that 'help' wasn't actually offered twice because of this, because Bash filters duplicates from possible completion words. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-13format-patch: add a blank line between notes and diffstatJunio C Hamano
The last line of the note text comes immediately before the diffstat block, making the latter unnecessarily harder to view. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-13replace: parse revision argument for -dMichael J Gruber
'git replace' parses the revision arguments when it creates replacements (so that a sha1 can be abbreviated, e.g.) but not when deleting replacements. Make it parse the argument to 'replace -d' in the same way. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Jeff King <peff@peff.net>
2012-11-12gitweb: escape html in rss titleJeff King
The title of an RSS feed is generated from many components, including the filename provided as a query parameter, but we failed to quote it. Besides showing the wrong output, this is a vector for XSS attacks. Signed-off-by: Jeff King <peff@peff.net>
2012-11-12Update cygwin.c for new mingw-64 win32 api headersMark Levedahl
The cygwin project recently switched to a new implementation of the windows api, now using header files from the mingw-64 project. These new header files are incompatible with the way cygwin.c included the old headers: cygwin.c can be compiled using the new or the older (mingw) headers, but different files must be included in different order for each to work. The new headers are in use only for the current release series (based upon the v1.7.x dll version). The previous release series using the v1.5 dll is kept available but unmaintained for use on older versions of Windows. So, patch cygwin.c to use the new include ordering only if the dll version is 1.7 or higher. Signed-off-by: Mark Levedahl <mlevedahl@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
2012-11-09Merge branch 'ph/maint-submodule-status-fix'Jeff King
Cleans up some leftover bits from an earlier submodule change. * ph/maint-submodule-status-fix: submodule status: remove unused orig_* variables t7407: Fix recursive submodule test
2012-11-09Merge branch 'nd/builtin-to-libgit'Jeff King
Code cleanups so that libgit.a does not depend on anything in the builtin/ directory. * nd/builtin-to-libgit: fetch-pack: move core code to libgit.a fetch-pack: remove global (static) configuration variable "args" send-pack: move core code to libgit.a Move setup_diff_pager to libgit.a Move print_commit_list to libgit.a Move estimate_bisect_steps to libgit.a Move try_merge_command and checkout_fast_forward to libgit.a
2012-11-09Merge branch 'nd/tree-walk-enum-cleanup'Jeff King
* nd/tree-walk-enum-cleanup: tree-walk: use enum interesting instead of integer
2012-11-09Merge branch 'sz/maint-curl-multi-timeout'Jeff King
Sometimes curl_multi_timeout() function suggested a wrong timeout value when there is no file descriptors to wait on and the http transport ended up sleeping for minutes in select(2) system call. Detect this and reduce the wait timeout in such a case. * sz/maint-curl-multi-timeout: Fix potential hang in https handshake
2012-11-09Merge branch 'fc/completion-send-email-with-format-patch'Jeff King
* fc/completion-send-email-with-format-patch: completion: add format-patch options to send-email
2012-11-09Merge branch 'mo/cvs-server-cleanup'Jeff King
Cleanups to prepare for mo/cvs-server-updates. * mo/cvs-server-cleanup: Use character class for sed expression instead of \s cvsserver status: provide real sticky info cvsserver: cvs add: do not expand directory arguments cvsserver: use whole CVS rev number in-process; don't strip "1." prefix cvsserver: split up long lines in req_{status,diff,log} cvsserver: clean up client request handler map comments cvsserver: remove unused functions _headrev and gethistory cvsserver update: comment about how we shouldn't remove a user-modified file cvsserver: add comments about database schema/usage cvsserver: removed unused sha1Or-k mode from kopts_from_path cvsserver t9400: add basic 'cvs log' test
2012-11-09Merge branch 'km/send-email-compose-encoding'Jeff King
"git send-email --compose" can let the user create a non-ascii cover letter message, but there was not a way to mark it with appropriate content type before sending it out. Further updates fix subject quoting. * km/send-email-compose-encoding: git-send-email: add rfc2047 quoting for "=?" git-send-email: introduce quote_subject() git-send-email: skip RFC2047 quoting for ASCII subjects git-send-email: use compose-encoding for Subject git-send-email: introduce compose-encoding