summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-06-20Merge branch 'jc/cache-tree'Libravatar Junio C Hamano7-44/+117
* jc/cache-tree: Avoid "diff-index --cached" optimization under --find-copies-harder Optimize "diff-index --cached" using cache-tree t4007: modernize the style cache-tree.c::cache_tree_find(): simplify internal API write-tree --ignore-cache-tree
2009-06-20Merge branch 'mg/pushurl'Libravatar Junio C Hamano9-17/+102
* mg/pushurl: avoid NULL dereference on failed malloc builtin-remote: Make "remote -v" display push urls builtin-remote: Show push urls as well technical/api-remote: Describe new struct remote member pushurl t5516: Check pushurl config setting Allow push and fetch urls to be different
2009-06-20Merge branch 'mn/maint-iconv-autoconf'Libravatar Junio C Hamano1-0/+8
* mn/maint-iconv-autoconf: fix handling of iconv configuration options
2009-06-20Merge branch 'sb/pull-rebase'Libravatar Junio C Hamano4-221/+43
* sb/pull-rebase: parse-remote: remove unused functions parse-remote: support default reflist in get_remote_merge_branch parse-remote: function to get the tracking branch to be merge
2009-06-20Merge branch 'pb/send-email-cccmd-fix'Libravatar Junio C Hamano4-10/+80
* pb/send-email-cccmd-fix: Test cccmd in t9001-send-email.sh and fix some bugs
2009-06-20Merge branch 'pb/maint-1.6.2-userdiff-fix'Libravatar Junio C Hamano2-7/+10
* pb/maint-1.6.2-userdiff-fix: upload-archive: fix infinite loop on Cygwin avoid exponential regex match for java and objc function names
2009-06-20Merge branch 'sb/maint-1.6.0-add-config-fix'Libravatar Junio C Hamano3-6/+19
* sb/maint-1.6.0-add-config-fix: add: allow configurations to be overriden by command line use xstrdup, not strdup in ll-merge.c Conflicts: builtin-add.c
2009-06-20Merge branch 'lt/maint-unsigned-left-shift'Libravatar Junio C Hamano8-16/+12
* lt/maint-unsigned-left-shift: Fix big left-shifts of unsigned char
2009-06-20Merge git://git.kernel.org/pub/scm/gitk/gitkLibravatar Junio C Hamano2-348/+479
* git://git.kernel.org/pub/scm/gitk/gitk: gitk: Allow diff view without context lines gitk: Add another string to translation gitk: Add option 'Simple history' to the options menu gitk: Handle msysGit version during version comparisons gitk: Make more options easily accessible from Edit View dialog gitk: Check git version before using --textconv flag gitk: Use --textconv to generate diff text gitk: Update German translation.
2009-06-18add: allow configurations to be overriden by command lineLibravatar Stephen Boyd2-2/+15
Don't call git_config after parsing the command line options, otherwise the config settings will override any settings made by the command line. This can be seen by setting add.ignore_errors and then specifying --no-ignore-errors when using git-add. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-18Merge branch 'maint'Libravatar Junio C Hamano4-19/+21
* maint: http.c: fix compiling with libcurl 7.9.2 import-tars: support symlinks pull, rebase: simplify to use die()
2009-06-18Merge branch 'sb/parse-options-integer'Libravatar Junio C Hamano4-48/+24
* sb/parse-options-integer: parse-options: simplify usage argh handling parse-options: make OPT_INTEGER's argh explicit
2009-06-18Merge branch 'ak/maint-for-each-ref-no-lookup'Libravatar Junio C Hamano1-9/+17
* ak/maint-for-each-ref-no-lookup: for-each-ref: Do not lookup objects when they will not be used
2009-06-18Add -k option to cvsexportcommit to revert expanded CVS keywords in CVS ↵Libravatar Alex Bennée2-3/+26
working tree before applying commit patch Depending on how your CVS->GIT conversion went you will have some unexpanded CVS keywords in your GIT repo. If any of your git commits touch these lines then the patch application will fail. This patch addresses that by adding an option that will revert and expanded CVS keywords to files in the working CVS directory that are affected by the commit being applied. Signed-off-by: Alex Bennée <alex@bennee.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-18http.c: fix compiling with libcurl 7.9.2Libravatar Mark Lodato1-4/+4
Change the minimimum required libcurl version for the http.sslKey option to 7.9.3. Previously, preprocessor macros checked for >= 7.9.2, which is incorrect because CURLOPT_SSLKEY was introduced in 7.9.3. This now allows git to compile with libcurl 7.9.2. Signed-off-by: Mark Lodato <lodatom@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-18Test cccmd in t9001-send-email.sh and fix some bugsLibravatar Paolo Bonzini4-10/+80
For another patch series I'm working on I needed some tests for the cc-cmd feature of git-send-email. This patch adds 3 tests for the feature and for the possibility to specify --suppress-cc multiple times, and fixes two bugs. The first bug is that the --suppress-cc option for `cccmd' was misspelled as `ccmd' in the code. The second bug, which is actually found only with my other series, is that the argument to the cccmd is never quoted, so the cccmd would fail with patch file names containing a space. A third bug I fix (in the docs) is that the bodycc argument was actually spelled ccbody in the documentation and bash completion. Signed-off-by: Paolo Bonzini <bonzini@gnu.org> Cc: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-18import-tars: support symlinksLibravatar Johannes Schindelin1-5/+12
Without this patch, symbolic links are turned into empty files. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-18upload-archive: fix infinite loop on CygwinLibravatar René Scharfe1-5/+7
On Cygwin, poll() reports POLLIN even for file descriptors that have reached their end. This caused git upload-archive to be stuck in an infinite loop, as it only looked at the POLLIN flag. In addition to POLLIN, check if read() returned 0, which indicates end-of-file, and keep looping only as long as at least one of the file descriptors has input. This lets the following command finish on its own when run in a git repository on Cygwin, instead of it getting stuck after printing all file names: $ git archive -v --remote . HEAD >/dev/null Reported-by: Bob Kagy <bobkagy@gmail.com> Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-18avoid exponential regex match for java and objc function namesLibravatar Paolo Bonzini1-2/+3
In the old regex ^[ \t]*(([ \t]*[A-Za-z_][A-Za-z_0-9]*){2,}[ \t]*\([^;]*)$ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ you can backtrack arbitrarily from [A-Za-z_0-9]* into [A-Za-z_], thus causing an exponential number of backtracks. Ironically it also causes the regex not to work as intended; for example "catch" can match the underlined part of the regex, the first repetition matching "c" and the second matching "atch". The replacement regex avoids this problem, because it makes sure that at least a space/tab is eaten on each repetition. In other words, a suffix of a repetition can never be a prefix of the next repetition. Signed-off-by: Paolo Bonzini <bonzini@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-18Fix big left-shifts of unsigned charLibravatar Linus Torvalds8-16/+12
Shifting 'unsigned char' or 'unsigned short' left can result in sign extension errors, since the C integer promotion rules means that the unsigned char/short will get implicitly promoted to a signed 'int' due to the shift (or due to other operations). This normally doesn't matter, but if you shift things up sufficiently, it will now set the sign bit in 'int', and a subsequent cast to a bigger type (eg 'long' or 'unsigned long') will now sign-extend the value despite the original expression being unsigned. One example of this would be something like unsigned long size; unsigned char c; size += c << 24; where despite all the variables being unsigned, 'c << 24' ends up being a signed entity, and will get sign-extended when then doing the addition in an 'unsigned long' type. Since git uses 'unsigned char' pointers extensively, we actually have this bug in a couple of places. I may have missed some, but this is the result of looking at git grep '[^0-9 ][ ]*<<[ ][a-z]' -- '*.c' '*.h' git grep '<<[ ]*24' which catches at least the common byte cases (shifting variables by a variable amount, and shifting by 24 bits). I also grepped for just 'unsigned char' variables in general, and converted the ones that most obviously ended up getting implicitly cast immediately anyway (eg hash_name(), encode_85()). In addition to just avoiding 'unsigned char', this patch also tries to use a common idiom for the delta header size thing. We had three different variations on it: "& 0x7fUL" in one place (getting the sign extension right), and "& ~0x80" and "& 0x7f" in two other places (not getting it right). Apart from making them all just avoid using "unsigned char" at all, I also unified them to then use a simple "& 0x7f". I considered making a sparse extension which warns about doing implicit casts from unsigned types to signed types, but it gets rather complex very quickly, so this is just a hack. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-14pull, rebase: simplify to use die()Libravatar Stephen Boyd2-10/+5
Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-14use xstrdup, not strdup in ll-merge.cLibravatar Jim Meyering1-4/+4
Otherwise, a fluky allocation failure would cause merge configuration settings to be silently ignored. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-14avoid NULL dereference on failed mallocLibravatar Jim Meyering1-2/+2
* builtin-remote.c (get_one_entry): Use xmalloc, not malloc. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-13Merge branch 'maint'Libravatar Junio C Hamano1-33/+32
* maint: git-rerere.txt: grammatical fixups and cleanups
2009-06-13Merge branch 'maint-1.6.2' into maintLibravatar Junio C Hamano1-33/+32
* maint-1.6.2: git-rerere.txt: grammatical fixups and cleanups
2009-06-13Merge branch 'maint-1.6.1' into maint-1.6.2Libravatar Junio C Hamano1-33/+32
* maint-1.6.1: git-rerere.txt: grammatical fixups and cleanups
2009-06-13Merge branch 'maint-1.6.0' into maint-1.6.1Libravatar Junio C Hamano2-34/+34
* maint-1.6.0: git-rerere.txt: grammatical fixups and cleanups http-push.c::remove_locks(): fix use after free
2009-06-13Merge branch 'mh/fix-send-email-threaded'Libravatar Junio C Hamano3-4/+27
* mh/fix-send-email-threaded: send-email: fix a typo in a comment send-email: fix threaded mails without chain-reply-to add a test for git-send-email for threaded mails without chain-reply-to doc/send-email: clarify the behavior of --in-reply-to with --no-thread send-email: fix non-threaded mails add a test for git-send-email for non-threaded mails
2009-06-13Merge branch 'rc/http-push'Libravatar Junio C Hamano8-993/+904
* rc/http-push: (22 commits) http*: add helper methods for fetching objects (loose) http*: add helper methods for fetching packs http: use new http API in fetch_index() http*: add http_get_info_packs http-push.c::fetch_symref(): use the new http API http-push.c::remote_exists(): use the new http API http.c::http_fetch_ref(): use the new http API transport.c::get_refs_via_curl(): use the new http API http.c: new functions for the http API http: create function end_url_with_slash http*: move common variables and macros to http.[ch] transport.c::get_refs_via_curl(): do not leak refs_url Don't expect verify_pack() callers to set pack_size http-push: do not SEGV after fetching a bad pack idx file http*: copy string returned by sha1_to_hex http-walker: verify remote packs http-push, http-walker: style fixes t5550-http-fetch: test fetching of packed objects http-push: fix missing "#ifdef USE_CURL_MULTI" around "is_running_queue" http-push: send out fetch requests on queue ...
2009-06-13Merge branch 'cc/bisect' (early part)Libravatar Junio C Hamano6-32/+130
* 'cc/bisect' (early part): t6030: test skipping away from an already skipped commit bisect: when skipping, choose a commit away from a skipped commit bisect: add parameters to "filter_skipped" bisect: display first bad commit without forking a new process bisect: drop unparse_commit() and use clear_commit_marks()
2009-06-13Merge branch 'rc/maint-http-local-slot-fix'Libravatar Junio C Hamano2-0/+12
* rc/maint-http-local-slot-fix: http*: cleanup slot->local after fclose
2009-06-13Merge branch 'sp/msysgit'Libravatar Junio C Hamano13-9/+7194
* sp/msysgit: compat/ has subdirectories: do not omit them in 'make clean' Fix typo in nedmalloc warning fix MinGW: Teach Makefile to detect msysgit and apply specific settings Fix warnings in nedmalloc when compiling with GCC 4.4.0 Add custom memory allocator to MinGW and MacOS builds MinGW readdir reimplementation to support d_type connect.c: Support PuTTY plink and TortoisePlink as SSH on Windows git: browsing paths with spaces when using the start command MinGW: fix warning about implicit declaration of _getch() test-chmtime: work around Windows limitation Work around a regression in Windows 7, causing erase_in_line() to crash sometimes Quiet make: do not leave Windows behind MinGW: GCC >= 4 does not need SNPRINTF_SIZE_CORR anymore Conflicts: Makefile
2009-06-13Merge branch 'cb/maint-no-double-merge'Libravatar Junio C Hamano2-1/+7
* cb/maint-no-double-merge: refuse to merge during a merge
2009-06-13Merge branch 'ph/submodule-rebase' (early part)Libravatar Junio C Hamano4-6/+192
* 'ph/submodule-rebase' (early part): Rename submodule.<name>.rebase to submodule.<name>.update git-submodule: add support for --rebase. Conflicts: Documentation/git-submodule.txt git-submodule.sh
2009-06-13Merge branch 'bc/solaris'Libravatar Junio C Hamano6-8/+90
* bc/solaris: configure: test whether -lresolv is needed Makefile: insert SANE_TOOL_PATH to PATH before /bin or /usr/bin git-compat-util.h: avoid using c99 flex array feature with Sun compiler 5.8 Makefile: add section for SunOS 5.7 Makefile: introduce SANE_TOOL_PATH for prepending required elements to PATH Makefile: define __sun__ on SunOS git-compat-util.h: tweak the way _XOPEN_SOURCE is set on Solaris On Solaris choose the OLD_ICONV iconv() declaration based on the UNIX spec Makefile: add NEEDS_RESOLV to optionally add -lresolv to compile arguments Makefile: use /usr/ucb/install on SunOS platforms rather than ginstall Conflicts: Makefile
2009-06-13Merge branch 'cb/match_refs_internal_tail'Libravatar Junio C Hamano6-29/+23
* cb/match_refs_internal_tail: match_refs: search ref list tail internally
2009-06-13Merge branch 'nw/maint-cvsexportcommit'Libravatar Junio C Hamano2-14/+53
* nw/maint-cvsexportcommit: git-cvsexportcommit can't commit files which have been removed from CVS
2009-06-13Merge branch 'da/araxis-mergetool'Libravatar Junio C Hamano5-6/+27
* da/araxis-mergetool: mergetool--lib: add support for araxis merge
2009-06-13git-rerere.txt: grammatical fixups and cleanupsLibravatar Stephen Boyd1-33/+32
Rewrite the gc section using unresolved and resolved instead of "not recorded". Add plurals and missing articles. Make some sentences have consistent tense. Try and be more active by removing "that" and simplifying sentences. The terms "hand-resolve" and "hand resolve" were used, so just use "hand resolve" to be more consistent. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-13builtin-remote: Make "remote -v" display push urlsLibravatar Michael J Gruber1-5/+26
Currently, "remote -v" simply lists all urls so that one has to remember that only the first one is used for fetches, and all are used for pushes. Change this so that the role of an url is displayed in parentheses, and also display push urls. Example with "one" having one url, "two" two urls, "three" one url and one pushurl: one hostone.com:/somepath/repoone.git (fetch) one hostone.com:/somepath/repoone.git (push) three http://hostthree.com/otherpath/repothree.git (fetch) three hostthree.com:/pathforpushes/repothree.git (push) two hosttwo.com:/somepath/repotwo.git (fetch) two hosttwo.com:/somepath/repotwo.git (push) two hosttwobackup.com:/somewheresafe/repotwo.git (push) Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-13builtin-remote: Show push urls as wellLibravatar Michael J Gruber2-8/+22
Teach builtin remote to show push urls also when asked to "show" a specific remote. This improves upon the standard display mode: multiple specified "url"s mean that the first one is for fetching, all are used for pushing. We make this clearer now by displaying the first one prefixed with "Fetch URL", and all "url"s (or, if present, all "pushurl"s) prefixed with "Push URL". Example with "one" having one url, "two" two urls, "three" one url and one pushurl (URL part only): * remote one Fetch URL: hostone.com:/somepath/repoone.git Push URL: hostone.com:/somepath/repoone.git * remote two Fetch URL: hosttwo.com:/somepath/repotwo.git Push URL: hosttwo.com:/somepath/repotwo.git Push URL: hosttwobackup.com:/somewheresafe/repotwo.git * remote three Fetch URL: http://hostthree.com/otherpath/repothree.git Push URL: hostthree.com:/pathforpushes/repothree.git Also, adjust t5505 accordingly and make it test for the new output. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-12Merge branch 'mh/maint-fix-send-email-threaded' into mh/fix-send-email-threadedLibravatar Junio C Hamano3-3/+14
* mh/maint-fix-send-email-threaded: doc/send-email: clarify the behavior of --in-reply-to with --no-thread send-email: fix non-threaded mails add a test for git-send-email for non-threaded mails Conflicts: git-send-email.perl t/t9001-send-email.sh
2009-06-12send-email: fix a typo in a commentLibravatar Markus Heidelberg1-1/+1
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-12send-email: fix threaded mails without chain-reply-toLibravatar Markus Heidelberg2-2/+3
An earlier commit 15da108 ("send-email: 'References:' should only reference what is sent", 2009-04-13) broke logic to set up threading information for the next message by rewriting "!" to "not" without understanding the precedence rules of the language. Namely, ! defined $reply_to || length($reply_to) == 0 was changed to not defined $reply_to || length($reply_to) == 0 which is not (defined $reply_to || length($reply_to) == 0) and different from what was intended, which is (not defined $reply_to) || (length($reply_to) == 0) Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-12add a test for git-send-email for threaded mails without chain-reply-toLibravatar Markus Heidelberg1-0/+11
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-12doc/send-email: clarify the behavior of --in-reply-to with --no-threadLibravatar Markus Heidelberg1-2/+3
Also remove the argument from --[no-]chain-reply-to. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-12send-email: fix non-threaded mailsLibravatar Markus Heidelberg2-2/+3
After commit 3e0c4ff (send-email: respect in-reply-to regardless of threading, 2009-03-01) the variable $thread was only used for prompting for an "In-Reply-To", but not for controlling whether the "In-Reply-To" and "References" fields should be written into the email. Thus these fields were always used beginning with the second mail and it was not possible to produce non-threaded mails anymore. However, a later commit 15da108 ("send-email: 'References:' should only reference what is sent", 2009-04-13) introduced a regression with the side effect to make non-threaded mails possible again, but only when --no-chain-reply-to was used. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-12add a test for git-send-email for non-threaded mailsLibravatar Markus Heidelberg1-0/+10
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-11Merge branch 'maint'Libravatar Junio C Hamano2-1/+5
* maint: Documentation: git-send-mail can take rev-list arg to drive format-patch rebase--interactive: remote stray closing parenthesis
2009-06-11Documentation: git-send-mail can take rev-list arg to drive format-patchLibravatar Paolo Bonzini1-0/+4
The git-send-email docs do not mention except in the usage lines the combined patch formatting/sending ability of git-send-email. This patch expands on the possible arguments to git-send-email and explains the meaning of the rev-list argument. Signed-off-by: Paolo Bonzini <bonzini@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>