summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-05-23Merge branch 'jn/gitweb-cleanup'Libravatar Junio C Hamano1-42/+42
* jn/gitweb-cleanup: gitweb: Remove unused $hash_base parameter from normalize_link_target gitweb: Simplify snapshot format detection logic in evaluate_path_info gitweb: Use capturing parentheses only when you intend to capture gitweb: Replace wrongly added tabs with spaces gitweb: Use block form of map/grep in a few cases more gitweb: Always use three argument form of open gitweb: Always use three argument form of open gitweb: Do not use bareword filehandles
2009-05-23Merge branch 'mg/track'Libravatar Junio C Hamano2-2/+16
* mg/track: Fix behavior with non-commit upstream references Test tracking of non-commit upstreams
2009-05-23Merge branch 'fc/decorate-tag'Libravatar Junio C Hamano7-11/+11
* fc/decorate-tag: Prettify log decorations even more Change prettify_ref to prettify_refname
2009-05-23Merge branch 'tp/send-email-from-config'Libravatar Junio C Hamano2-3/+7
* tp/send-email-from-config: send-email: Add config option for sender address
2009-05-23Merge branch 'js/maint-no-ln-across-libexec-and-bin'Libravatar Junio C Hamano1-0/+4
* js/maint-no-ln-across-libexec-and-bin: Add NO_CROSS_DIRECTORY_HARDLINKS support to the Makefile Conflicts: Makefile
2009-05-23Merge branch 'da/mergetool-lib'Libravatar Junio C Hamano1-3/+3
* da/mergetool-lib: mergetool--lib: specialize diff options for emerge and ecmerge
2009-05-23Merge branch 'cc/bisect' (early part)Libravatar Junio C Hamano9-271/+494
* 'cc/bisect' (early part): bisect: make "git bisect" use new "--next-all" bisect-helper function bisect: add "check_good_are_ancestors_of_bad" function bisect: implement the "check_merge_bases" function bisect: automatically sort sha1_array if needed when looking it up bisect: make skipped array functions more generic bisect: remove too much function nesting bisect: use new "struct argv_array" to prepare argv for "setup_revisions" bisect: store good revisions in a "sha1_array" bisect: implement "rev_argv_push" to fill an argv with revs bisect: use "sha1_array" to store skipped revisions am: simplify "sq" function by using "git rev-parse --sq-quote" bisect: use "git rev-parse --sq-quote" instead of a custom "sq" function rev-parse: add --sq-quote to shell quote arguments rev-list: remove stringed output flag from "show_bisect_vars" bisect--helper: remove "--next-vars" option as it is now useless bisect: use "git bisect--helper --next-exit" in "git-bisect.sh" bisect--helper: add "--next-exit" to output bisect results bisect: move common bisect functionality to "bisect_common" rev-list: refactor printing bisect vars rev-list: make "estimate_bisect_steps" non static
2009-05-23Merge branch 'lt/maint-diff-reduce-lstat'Libravatar Junio C Hamano2-3/+3
* lt/maint-diff-reduce-lstat: Teach 'git checkout' to preload the index contents Avoid unnecessary 'lstat()' calls in 'get_stat_data()'
2009-05-23Merge branch 'jm/format-patch-no-auto-n-when-k-is-given'Libravatar Junio C Hamano2-1/+20
* jm/format-patch-no-auto-n-when-k-is-given: format-patch let -k override a config-specified format.numbered
2009-05-23Merge branch 'do/maint-merge-recursive-fix'Libravatar Junio C Hamano2-5/+101
* do/maint-merge-recursive-fix: merge-recursive: never leave index unmerged while recursing
2009-05-23Merge branch 'rr/forbid-bs-in-ref'Libravatar Junio C Hamano2-1/+4
* rr/forbid-bs-in-ref: Disallow '\' in ref names
2009-05-23Merge branch 'hv/sample-update'Libravatar Junio C Hamano1-0/+10
* hv/sample-update: Extend sample update hook, disable modifying of existing tags
2009-05-23Merge branch 'jk/maint-1.6.0-trace-argv'Libravatar Junio C Hamano1-4/+4
* jk/maint-1.6.0-trace-argv: fix GIT_TRACE segfault with shell-quoted aliases Conflicts: alias.c
2009-05-23Merge branch 'jk/no-no-no-empty-directory'Libravatar Junio C Hamano1-1/+1
* jk/no-no-no-empty-directory: parseopt: add OPT_NEGBIT
2009-05-23Merge branch 'rs/grep-parseopt'Libravatar Junio C Hamano7-252/+350
* rs/grep-parseopt: grep: make callback functions static grep: use parseopt grep: remove global variable builtin_grep parseopt: add PARSE_OPT_NODASH parseopt: add OPT_NUMBER_CALLBACK parseopt: add OPT_NEGBIT
2009-05-23Merge branch 'fl/git-pm'Libravatar Junio C Hamano3-9/+22
* fl/git-pm: Git.pm: Always set Repository to absolute path if autodetecting Git.pm: Set GIT_WORK_TREE if we set GIT_DIR
2009-05-23Merge branch 'mt/submodule-reference'Libravatar Junio C Hamano3-6/+127
* mt/submodule-reference: Add --reference option to git submodule.
2009-05-22gitweb: Sanitize title attribute in format_subject_htmlLibravatar Jakub Narebski1-1/+2
Replace control characters with question mark '?' (like in chop_and_esc_str). A little background: some web browsers turn on strict (and unforgiving) XML validating mode for XHTML documents served using application/xhtml+xml content type. This means among others that control characters are forbidden to appear in gitweb output. CGI.pm does by default slight escaping (using simple_escape subroutine from CGI::Util) of all _attribute_ values (depending on the value of autoEscape, by default on). This escaping, at least in CGI.pm version 3.10 (most current version at CPAN is 3.43), is minimal: only '"', '&', '<' and '>' are escaped using named HTML entity references (&quot;, &amp;, &lt; and &gt; respectively). But simple_escape does not do escaping of control characters such as ^X which are invalid in XHTML (in strict mode). If by some accident commit message do contain some control character in first 50 characters (more or less) of first line of commit message, and this line is longer than 50 characters (so gitweb shortens it for display), then gitweb would put this control character in title attribute (and CGI.pm would not remove them). The tag _contents_ is safe because it is escaped using esc_html() explicitly, and it replaces control characters by their printable representation. While at it: chop_and_escape_str doesn't need capturing group. Noticed-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-21Terminate argv with NULL before calling setup_revisions()Libravatar Nguyễn Thái Ngọc Duy2-2/+3
It is convention that argv should be terminated with NULL, even if argc is used to specify the size of argv. setup_revisions() requires this and may segfault otherwise. This patch makes sure that all argv (that I can find) is NULL terminated. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-21doc/git-rebase.txt: remove mention of multiple strategiesLibravatar Nguyễn Thái Ngọc Duy1-2/+1
git-rebase.sh does not seem to support this. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-21Merge git://git.bogomips.org/git-svnLibravatar Junio C Hamano32-211/+334
* git://git.bogomips.org/git-svn: git-svn: add --authors-prog option git-svn: Set svn.authorsfile if it is passed to git svn clone git-svn: Correctly report max revision when following deleted paths git-svn: Fix for svn paths removed > log-window-size revisions ago git-svn testsuite: use standard configuration for Subversion tools
2009-05-21git-send-email: Handle quotes when parsing .mailrc filesLibravatar Eric W. Biederman1-1/+1
It is legal and not uncommon to use quotes in a .mailrc file so you can include a persons fullname as well as their email alias. Handle this by using quotewords instead of split when parsing .mailrc files. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-21git-svn: add --authors-prog optionLibravatar Mark Lodato3-3/+106
Add a new option, --authors-prog, to git-svn that allows a more flexible alternative (or supplement) to --authors-file. This allows more advanced username operations than the authors file will allow. For example, one may look up Subversion users via LDAP, or may generate the name and email address from the Subversion username. Notes: * If both --authors-name and --authors-prog are given, the former is tried first, falling back to the later. * The program is called once per unique SVN username, and the result is cached. * The command-line argument must be the path to a program, not a generic shell command line. The absolute path to this program is taken at startup since the git-svn script changes directory during operation. * The option is not enabled for `git svn log'. [ew: fixed case where neither --authors-(name|prog) were defined] Signed-off-by: Mark Lodato <lodatom@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-05-21git-svn: Set svn.authorsfile if it is passed to git svn cloneLibravatar Alex Vandiver1-0/+1
Signed-off-by: Alex Vandiver <alexmv@mit.edu> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-05-21git-svn: Correctly report max revision when following deleted pathsLibravatar Alex Vandiver1-1/+1
Report the maximum found revision in the range, instead of the minimum changed revision. Signed-off-by: Alex Vandiver <alexmv@mit.edu> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-05-21git-svn: Fix for svn paths removed > log-window-size revisions agoLibravatar Alex Vandiver1-1/+5
Instead of trying to find the end of the commit history only in the last window, track if we have seen commits yet, and use that to judge if we need to backtrack and look for a tail. Otherwise, conversion can silently lose up to 100 revisions of a branch if it was deleted >100 revisions ago. Signed-off-by: Alex Vandiver <alexmv@mit.edu> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-05-21git-svn testsuite: use standard configuration for Subversion toolsLibravatar Eygene Ryabinkin29-206/+221
I have tweaked configuration in my ~/.subversion directory, namely I am running auto-properties and automatically adding '$Id$' expansion to every file. This choke the last test named 'proplist' from t9101-git-svn-props.sh, because one more property, svn:keywords is automatically added. I had just wrapped svn invocation with the svn_cmd that specifies empty directory via --config-dir argument. Since the latter is the global option, it should be recognized by all svn subcommands, so no regressions will be introduced. Now svn_cmd is used everywhere, not just in the failed test module: this should guard us from the future clashes with user-defined configuration tweaks. Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-05-20Merge branch 'maint'Libravatar Junio C Hamano4-3/+17
* maint: grep: fix word-regexp colouring completion: use git rev-parse to detect bare repos Cope better with a _lot_ of packs for-each-ref: fix segfault in copy_email
2009-05-20grep: fix word-regexp colouringLibravatar René Scharfe1-0/+5
As noticed by Dmitry Gryazin: When a pattern is found but it doesn't start and end at word boundaries, bol is forwarded to after the match and the pattern is searched again. When a pattern is finally found between word boundaries, the match offsets are off by the number of characters that have been skipped. This patch corrects the offsets to be relative to the value of bol as passed to match_one_pattern() by its caller. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-20completion: use git rev-parse to detect bare reposLibravatar Giuseppe Bilotta1-1/+1
Its check is more robust than a config check for core.bare Trivially-Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-20Cope better with a _lot_ of packsLibravatar Johannes Schindelin1-0/+6
You might end up with a situation where you have tons of pack files, e.g. when using hg2git. In this situation, all kinds of operations may end up with a "too many files open" error. Let's recover gracefully from that. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Looks-right-to-me-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-20grep: make callback functions staticLibravatar René Scharfe1-8/+10
Suggested by Stephen Boyd: make the callback functions used for option parsing static. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-20for-each-ref: fix segfault in copy_emailLibravatar Jeff King1-2/+5
You can trigger a segfault in git.git by doing: git for-each-ref --format='%(taggeremail)' refs/tags/v0.99 The v0.99 tag is special in that it contains no "tagger" header. The bug is obvious in copy_email, which carefully checks to make sure the result of a strchr is non-NULL, but only after already having used it to perform other work. The fix is to move the check up. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-20Extend sample pre-commit hook to check for non ascii filenamesLibravatar Heiko Voigt1-0/+25
At the moment non-ascii encodings of filenames are not portably converted between different filesystems by git. This will most likely change in the future but to allow repositories to be portable among different file/operating systems this check is enabled by default. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-20Unify signedness in hashing callsLibravatar Dan McGee2-6/+6
Our hash_obj and hashtable_index calls and functions were doing a lot of funny things with signedness. Unify all of it to 'unsigned int'. Signed-off-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-18Merge branch 'np/push-delta'Libravatar Junio C Hamano3-8/+23
* np/push-delta: allow OFS_DELTA objects during a push
2009-05-18Merge branch 'ar/merge-one-file-diag'Libravatar Junio C Hamano0-0/+0
* ar/merge-one-file-diag: Clarify kind of conflict in merge-one-file helper
2009-05-18Merge branch 'ar/unlink-err'Libravatar Junio C Hamano26-50/+68
* ar/unlink-err: print unlink(2) errno in copy_or_link_directory replace direct calls to unlink(2) with unlink_or_warn Introduce an unlink(2) wrapper which gives warning if unlink failed
2009-05-18Merge branch 'jk/maint-add-empty'Libravatar Junio C Hamano1-1/+1
* jk/maint-add-empty: add: don't complain when adding empty project root
2009-05-18Merge branch 'js/add-edit'Libravatar Junio C Hamano3-4/+187
* js/add-edit: t3702: fix reliance on SHELL_PATH being '/bin/sh' git-add: introduce --edit (to edit the diff vs. the index)
2009-05-18Merge branch 'mh/diff-stat-color'Libravatar Junio C Hamano1-8/+7
* mh/diff-stat-color: diff: do not color --stat output like patch context
2009-05-18Merge branch 'mh/show-branch-color'Libravatar Junio C Hamano4-5/+66
* mh/show-branch-color: bash completion: show-branch color support show-branch: color the commit status signs Conflicts: contrib/completion/git-completion.bash
2009-05-18Merge branch 'ac/graph-horizontal-line'Libravatar Junio C Hamano2-19/+49
* ac/graph-horizontal-line: graph API: Use horizontal lines for more compact graphs
2009-05-18Merge branch 'ae/anon-fetch-info'Libravatar Junio C Hamano3-2/+54
* ae/anon-fetch-info: fetch: Strip usernames from url's before storing them
2009-05-18Merge branch 'maint'Libravatar Junio C Hamano1-1/+1
* maint: show-branch: Fix die message in parse_reflog_param()
2009-05-17show-branch: Fix die message in parse_reflog_param()Libravatar Stephen Boyd1-1/+1
Commit 76a44c5 (show-branch --reflog: show the reflog message at the top, 2007-01-19) introduced parse_reflog_param(). The die() call was incorrectly passed arg + 9, when it should have been passed arg. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-16Merge branch 'maint'Libravatar Junio C Hamano4-5/+8
* maint: completion: add missing options to show-branch and show dir.c: clean up handling of 'path' parameter in read_directory_recursive() Fix type-punning issues
2009-05-16completion: add missing options to show-branch and showLibravatar Stephen Boyd1-2/+2
Add --oneline and --abbrev-commit to show and --sparse to show-branch. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-16dir.c: clean up handling of 'path' parameter in read_directory_recursive()Libravatar Linus Torvalds1-1/+1
Right now we pass two different pathnames ('path' and 'base') down to read_directory_recursive(), and the only real reason for that is that we want to allow an empty 'base' parameter, but when we do so, we need the pathname to "opendir()" to be "." rather than the empty string. And rather than handle that confusion in the caller, we can just fix read_directory_recursive() to handle the case of an empty path itself, by just passing opendir() a "." ourselves if the path is empty. This would allow us to then drop one of the pathnames entirely from the calling convention, but rather than do that, we'll start separating them out as a "filesystem pathname" (the one we use for filesystem accesses) and a "git internal base name" (which is the name that we use for git internally). That will eventually allow us to do things like handle different encodings (eg the filesystem pathnames might be Latin1, while git itself would use UTF-8 for filename information). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-16Fix type-punning issuesLibravatar Dan McGee2-2/+5
In these two places we are casting part of our unsigned char sha1 array into an unsigned int, which violates GCCs strict-aliasing rules (and probably other compilers). Signed-off-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>