summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-05-25Merge branch 'master' into sb/opt-filenameLibravatar Junio C Hamano448-6304/+16187
* master: (654 commits) http-push.c::remove_locks(): fix use after free t/t3400-rebase.sh: add more tests to help migrating git-rebase.sh to C post-receive-email: hooks.showrev: show how to include both web link and patch MinGW: Fix compiler warning in merge-recursive MinGW: Add a simple getpass() MinGW: use POSIX signature of waitpid() MinGW: the path separator to split GITPERLLIB is ';' on Win32 MinGW: Scan for \r in addition to \n when reading shbang lines gitweb: Sanitize title attribute in format_subject_html Terminate argv with NULL before calling setup_revisions() doc/git-rebase.txt: remove mention of multiple strategies git-send-email: Handle quotes when parsing .mailrc files 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 grep: fix word-regexp colouring completion: use git rev-parse to detect bare repos Cope better with a _lot_ of packs ...
2009-05-24Merge branch 'maint'Libravatar Junio C Hamano1-1/+2
* maint: http-push.c::remove_locks(): fix use after free
2009-05-24Merge branch 'maint-1.6.2' into maintLibravatar Junio C Hamano1-1/+2
* maint-1.6.2: http-push.c::remove_locks(): fix use after free
2009-05-24Merge branch 'maint-1.6.1' into maint-1.6.2Libravatar Junio C Hamano1-1/+2
* maint-1.6.1: http-push.c::remove_locks(): fix use after free
2009-05-24Merge branch 'maint-1.6.0' into maint-1.6.1Libravatar Junio C Hamano1-1/+2
* maint-1.6.0: http-push.c::remove_locks(): fix use after free
2009-05-24http-push.c::remove_locks(): fix use after freeLibravatar Alex Riesen1-1/+2
Noticed and reported by Serhat Şevki Dinçer. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Acked-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-24t/t3400-rebase.sh: add more tests to help migrating git-rebase.sh to CLibravatar Nguyễn Thái Ngọc Duy1-0/+31
These new tests make sure I don't miss any check being performed before rebase is proceeded (which is well tested by other tests) Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-23apply, fmt-merge-msg: use relative filenamesLibravatar Stephen Boyd4-0/+79
Commit dbd0f5c7 (Files given on the command line are relative to $cwd, 2008-08-06) only fixed git-commit and git-tag. But, git-apply and git-fmt-merge-msg didn't get the update and exhibit the same behavior. Fix them and add tests for "apply --build-fake-ancestor" and "fmt-merge-msg -F". Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-23commit: -F overrides -tLibravatar Stephen Boyd2-0/+14
Commit dbd0f5c7 (Files given on the command line are relative to $cwd, 2008-08-06) introduced parse_options_fix_filename() as a quick fix for filename arguments used in the parse options API. git-commit was still broken. This means git commit -F log -t temp in a subdirectory would make git think the log message should be taken from temp instead of log. This is because parse_options_fix_filename() calls prefix_filename() which uses a single static char buffer to do its work. Making two calls with two char pointers causes the pointers to alias. To prevent aliasing, we duplicate the string returned by parse_options_fix_filename(). Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-23post-receive-email: hooks.showrev: show how to include both web link and patchLibravatar Jim Meyering1-0/+4
Add a comment showing how to include a web link (i.e. gitweb/cgit) and a patch in the email that is sent for each pushed commit. The quoting was tricky enough that it's worth documenting. To add two blank lines (i.e. put \n\n in the printf), you would need to say \\\\n\\\\n, and in the end, the pair of "echo" statements seemed better. This is used in glibc.git repository: http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=summary push-triggered messages have been sent to this list since May 21: http://sourceware.org/ml/glibc-cvs/2009-q2/ Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-23MinGW: Fix compiler warning in merge-recursiveLibravatar Johannes Schindelin1-2/+3
GCC 4.4.0 on Windows does not like the format %zu. It is quite unlikely, though, that we need more merge bases than a %d can display, so replace the %zu by a %d. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-23MinGW: Add a simple getpass()Libravatar Johannes Schindelin2-0/+17
We need getpass() to activate curl on MinGW. Although the default Makefile currently has 'NO_CURL = YesPlease', msysgit releases do provide curl support, so getpass() is used. [spr: - edited commit message. - squashed commit that provides getpass() declaration.] Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-23MinGW: use POSIX signature of waitpid()Libravatar Johannes Schindelin1-1/+1
Git's source code expects waitpid() to return a signed int status. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-23MinGW: the path separator to split GITPERLLIB is ';' on Win32Libravatar Johannes Schindelin1-1/+3
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-23MinGW: Scan for \r in addition to \n when reading shbang linesLibravatar Peter Harris1-2/+2
\r is common on Windows, so we should handle it gracefully. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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>