sort by:
Revision Author Date Message Commit Date
b1905ae read_gitfile_gently: use ssize_t to hold read result Otherwise, a negative error return becomes a very large read value. We catch this in practice because we compare the expected and actual numbers of bytes (and you are not likely to be reading (size_t)-1 bytes), but this makes the correctness a little more obvious. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 May 2011, 18:25:13 UTC
5dd5648 remove tests of always-false condition * fsck.c (fsck_error_function): Don't test obj->sha1 == 0. It can never be true, since that sha1 member is an array. * transport.c (set_upstreams): Likewise for ref->new_sha1. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 May 2011, 18:24:24 UTC
a9930e3 plug a DIR buffer leak in rerere.c Signed-off-by: Jim Meyering <jim@meyering.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 May 2011, 18:20:48 UTC
5743350 rerere.c: diagnose a corrupt MERGE_RR when hitting EOF between TAB and '\0' If we reach EOF after the SHA1-then-TAB, yet before the NUL that terminates each file name, we would fill the file name buffer with \255 bytes resulting from the repeatedly-failing fgetc (returns EOF/-1) and ultimately complain about "filename too long", because no NUL was encountered. Signed-off-by: Jim Meyering <jim@meyering.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 May 2011, 18:07:52 UTC
665b051 Update 1.7.6 draft release notes Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 May 2011, 17:41:33 UTC
7eacc2b Merge branch 'jn/userdiff-perl-updates' * jn/userdiff-perl-updates: userdiff/perl: tighten BEGIN/END block pattern to reject here-doc delimiters tests: make test_expect_code quieter on success userdiff/perl: catch sub with brace on second line userdiff/perl: match full line of POD headers userdiff/perl: anchor "sub" and "package" patterns on the left t4018 (funcname patterns): minor cleanups t4018 (funcname patterns): make configuration easier to track t4018 (funcname patterns): make .gitattributes state easier to track 26 May 2011, 17:32:25 UTC
8784e4d Merge branch 'rg/no-gecos-in-pwent' * rg/no-gecos-in-pwent: ident: add NO_GECOS_IN_PWENT for systems without pw_gecos in struct passwd Conflicts: Makefile 26 May 2011, 17:32:19 UTC
ce5e953 Merge branch 'jk/fetch-mark-complete-optimization' * jk/fetch-mark-complete-optimization: fetch: avoid repeated commits in mark_complete 26 May 2011, 17:32:11 UTC
a6f3f17 Merge branch 'jn/gitweb-js' * jn/gitweb-js: gitweb: Make JavaScript ability to adjust timezones configurable gitweb.js: Add UI for selecting common timezone to display dates gitweb: JavaScript ability to adjust time based on timezone gitweb: Unify the way long timestamp is displayed gitweb: Refactor generating of long dates into format_timestamp_html gitweb.js: Provide getElementsByClassName method (if it not exists) gitweb.js: Introduce code to handle cookies from JavaScript gitweb.js: Extract and improve datetime handling gitweb.js: Provide default values for padding in padLeftStr and padLeft gitweb.js: Update and improve comments in JavaScript files gitweb: Split JavaScript for maintability, combining on build 26 May 2011, 17:31:57 UTC
229e72d Merge branch 'jn/ctags-more' * jn/ctags-more: gitweb: Optional grouping of projects by category gitweb: Modularized git_get_project_description to be more generic gitweb: Split git_project_list_body in two functions 26 May 2011, 17:31:53 UTC
0a2a5d8 Merge branch 'jc/require-work-tree-exists' * jc/require-work-tree-exists: require-work-tree wants more than what its name says 26 May 2011, 17:31:47 UTC
1dcfb2a Sync with 1.7.5.3 Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 May 2011, 17:30:28 UTC
3c3e0b3 Git 1.7.5.3 Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 May 2011, 17:29:29 UTC
5a6d82d Merge branch 'maint-1.7.4' into maint * maint-1.7.4: 26 May 2011, 17:29:24 UTC
bac9c06 Merge branch 'jk/git-connection-deadlock-fix' into maint-1.7.4 * jk/git-connection-deadlock-fix: test core.gitproxy configuration send-pack: avoid deadlock on git:// push with failed pack-objects connect: let callers know if connection is a socket connect: treat generic proxy processes like ssh processes Conflicts: connect.c 26 May 2011, 17:28:10 UTC
34df9fe Merge branch 'js/maint-send-pack-stateless-rpc-deadlock-fix' into maint-1.7.4 * js/maint-send-pack-stateless-rpc-deadlock-fix: sideband_demux(): fix decl-after-stmt send-pack: unbreak push over stateless rpc send-pack: avoid deadlock when pack-object dies early 26 May 2011, 17:27:55 UTC
4201472 Merge branch 'jk/maint-upload-pack-shallow' into maint-1.7.4 * jk/maint-upload-pack-shallow: upload-pack: start pack-objects before async rev-list 26 May 2011, 17:27:29 UTC
d9ac3e4 Merge branch 'jm/maint-diff-words-with-sbe' into maint * jm/maint-diff-words-with-sbe: do not read beyond end of malloc'd buffer 26 May 2011, 16:43:00 UTC
0531899 Merge branch 'kk/maint-prefix-in-config-mak' into maint * kk/maint-prefix-in-config-mak: Honor $(prefix) set in config.mak* when defining ETC_GIT* Revert "Honor $(prefix) set in config.mak* when defining ETC_GIT* and sysconfdir" Honor $(prefix) set in config.mak* when defining ETC_GIT* and sysconfdir 26 May 2011, 16:42:12 UTC
5f8937d Merge branch 'mg/diff-uiconfig-doc' into maint * mg/diff-uiconfig-doc: config.txt,diff-options.txt: porcelain vs. plumbing for color.diff 26 May 2011, 16:41:11 UTC
b73f3d2 Merge branch 'ft/gitweb-tar-with-gzip-n' into maint * ft/gitweb-tar-with-gzip-n: gitweb: supply '-n' to gzip for identical output 26 May 2011, 16:40:50 UTC
7eacaef Merge branch 'ss/doc-svn' into maint * ss/doc-svn: remove noise and inaccuracies from git-svn docs 26 May 2011, 16:39:40 UTC
63c11eb Merge branch 'jn/format-patch-doc' into maint * jn/format-patch-doc: Documentation/format-patch: suggest Toggle Word Wrap add-on for Thunderbird Documentation: publicize hints for sending patches with GMail Documentation: publicize KMail hints for sending patches inline Documentation: hints for sending patches inline with Thunderbird Documentation: explain how to check for patch corruption 26 May 2011, 16:39:33 UTC
ea8ec09 Merge branch 'jc/maint-pathspec-stdin-and-cmdline' into maint * jc/maint-pathspec-stdin-and-cmdline: setup_revisions(): take pathspec from command line and --stdin correctly 26 May 2011, 16:38:44 UTC
0e66f87 Merge branch 'jk/cherry-pick-root-with-resolve' into maint * jk/cherry-pick-root-with-resolve: t3503: test cherry picking and reverting root commits revert: allow reverting a root commit cherry-pick: handle root commits with external strategies 26 May 2011, 16:37:41 UTC
93446aa Merge branch 'rg/copy-gecos-username' into maint * rg/copy-gecos-username: copy_gecos: fix not adding nlen to len when processing "&" 26 May 2011, 16:37:04 UTC
9e0ec12 Merge branch 'fc/completion-zsh' into maint * fc/completion-zsh: git-completion: fix regression in zsh support 26 May 2011, 16:36:33 UTC
5590fe7 Merge branch 'jk/git-connection-deadlock-fix' into maint * jk/git-connection-deadlock-fix: test core.gitproxy configuration send-pack: avoid deadlock on git:// push with failed pack-objects connect: let callers know if connection is a socket connect: treat generic proxy processes like ssh processes Conflicts: connect.c 26 May 2011, 16:33:25 UTC
f09937d Merge branch 'js/maint-send-pack-stateless-rpc-deadlock-fix' into maint * js/maint-send-pack-stateless-rpc-deadlock-fix: sideband_demux(): fix decl-after-stmt send-pack: unbreak push over stateless rpc send-pack: avoid deadlock when pack-object dies early 26 May 2011, 16:32:14 UTC
a02cf90 compat/fnmatch/fnmatch.c: give a fall-back definition for NULL Somebody tried to compile fnmatch.c compatibility file on Interix and got an error because no header included in the file on that platform defined NULL. It usually comes from stddef.h and indirectly from other headers like string.h, unistd.h, stdio.h, stdlib.h, etc., but with the way we compile this file from our Makefile, inclusion of the header files that are expected to define NULL in fnmatch.c do not happen because they are protected with "#ifdef STDC_HEADERS", etc. which we do not pass. As the least-impact workaround, give a fall-back definition when none of the headers define NULL. Noticed-by: Markus Duft <mduft@gentoo.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 May 2011, 16:25:47 UTC
46bf76a Merge branch 'svn-fe-maint' of git://repo.or.cz/git/jrn into maint * 'svn-fe-maint' of git://repo.or.cz/git/jrn: Revert "t0081 (line-buffer): add buffering tests" 26 May 2011, 15:52:11 UTC
5cfe425 Merge branch 'jc/bigfile' * jc/bigfile: Bigfile: teach "git add" to send a large file straight to a pack index_fd(): split into two helper functions index_fd(): turn write_object and format_check arguments into one flag 25 May 2011, 23:23:26 UTC
84da3e2 Merge branch 'js/log-abbrev-commit-config' * js/log-abbrev-commit-config: Add log.abbrevCommit config variable "git log -h": typofix misspelled 'suppress' 25 May 2011, 23:23:22 UTC
6741c2e Merge branch 'maint' * maint: init/clone: remove short option -L and document --separate-git-dir 25 May 2011, 22:25:44 UTC
ea5070c Teach read-tree the -n|--dry-run option The option can be used to check if read-tree with the same set of other options like "-m" and "-u" would succeed without actually changing either the index or the working tree. The relevant tests in the t10?? range were extended to do a read-tree -n before the real read-tree to make sure neither the index nor any local files were changed with -n and the same exit code as without -n is returned. The helper functions added for that purpose reside in the new t/lib-read-tree.sh file. The only exception is #13 in t1004 ("unlinking an un-unlink-able symlink"). As this is an issue of wrong directory permissions it is not detected with -n. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 May 2011, 22:04:25 UTC
2c9078d unpack-trees: add the dry_run flag to unpack_trees_options Until now there was no way to test if unpack_trees() with update=1 would succeed without really updating the work tree. The reason for that is that setting update to 0 does skip the tests for new files and deactivates the sparse handling, thereby making that unsuitable as a dry run. Add the new dry_run flag to struct unpack_trees_options unpack_trees(). Setting that together with the update flag will check if the work tree update would be successful without doing it for real. The only class of problems that is not detected at the moment are file system conditions like ENOSPC or missing permissions. Also the index entries of updated files are not as they would be after a real checkout because lstat() isn't run as the files aren't updated for real. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 May 2011, 21:32:02 UTC
a6253d1 userformat_find_requirements(): find requirement for the correct format This function was introduced in 5b16360 (pretty: Initialize notes if %N is used, 2010-04-13) to check what kind of information the "log --format=..." user format string wants. The function can be passed a NULL instead of a format string to ask it to check user_format variable kept by an earlier call to save_user_format(). But it unconditionally checked user_format and not the string it was given. The only caller introduced by the change passes NULL, which kept the bug unnoticed, until a new GCC noticed that there is an assignment to fmt that is never used. Noticed-by: Chris Wilson's compiler Signed-off-by: Junio C Hamano <gitster@pobox.com> Acked-by: Jeff King <peff@peff.net> 25 May 2011, 20:08:10 UTC
f612a71 gitweb: Refactor reading and parsing config file into read_config_file Beside being obvious reduction of duplicated code, this is enables us to easily call site-wide config file in per-installation config file. The actual update to documentation is left for next commit, because of possible exclusive alternative (possible other next commit) of always reading system-wide config file and relying on per-instalation config file overriding system-wide defaults. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Acked-by: John 'Warthog9' Hawley <warthog9@kernel.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 May 2011, 19:36:43 UTC
600a6a6 sh-18n: quell "unused variable" warning show_variables is set but never used. Comment it out rather than remove it so that the relation with upstream remains clear. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 May 2011, 16:35:59 UTC
09ffc70 init/clone: remove short option -L and document --separate-git-dir Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 May 2011, 16:30:26 UTC
73546c0 handle_options(): do not miscount how many arguments were used The handle_options() function advances the base of the argument array and returns the number of arguments it used. The caller in handle_alias() wants to reallocate the argv array it passes to this function, and attempts to do so by subtracting the returned value to compensate for the change handle_options() makes to the new_argv. But handle_options() did not correctly count when "-c <config=value>" is given, causing a wrong pointer to be passed to realloc(). Fix it by saving the original argv at the beginning of handle_options(), and return the difference between the final value of argv, which will relieve the places that move the array pointer from the additional burden of keeping track of "handled" counter. Noticed-by: Kazuki Tsujimoto Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 May 2011, 23:25:46 UTC
06eb708 config: always parse GIT_CONFIG_PARAMETERS during git_config Previously we parsed GIT_CONFIG_PARAMETERS lazily into a linked list, and then checked that list during future invocations of git_config. However, that ignores the fact that the environment variable could change during our run (e.g., because we parse more "-c" as part of an alias). Instead, let's just re-parse the environment variable each time. It's generally not very big, and it's no more work than parsing the config files, anyway. As a bonus, we can ditch all of the linked list storage code entirely, making the code much simpler. The test unfortunately still does not pass because of an unrelated bug in handle_options. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 May 2011, 23:25:36 UTC
5a0c9ee git_config: don't peek at global config_parameters The config_parameters list in config.c is an implementation detail of git_config_from_parameters; instead, that function should tell us whether it found anything. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 May 2011, 23:20:56 UTC
3ddf096 config: make environment parsing routines static Nobody outside of git_config_from_parameters should need to use the GIT_CONFIG_PARAMETERS parsing functions, so let's make them private. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 May 2011, 23:20:48 UTC
55601c6 doc: discuss textconv versus external diff drivers We already talk about how to use each one and how they work, but it is a reasonable question to wonder why one might use one over the other. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 May 2011, 22:57:03 UTC
e2eb527 require-work-tree wants more than what its name says Somebody tried "git pull" from a random place completely outside the work tree, while exporting GIT_DIR and GIT_WORK_TREE that are set to correct places, e.g. GIT_WORK_TREE=$HOME/git.git GIT_DIR=$GIT_WORK_TREE/.git export GIT_WORK_TREE GIT_DIR cd /tmp git pull At the beginning of git-pull, we check "require-work-tree" and then "cd-to-toplevel". I _think_ the original intention when I wrote the command was "we MUST have a work tree, our $(cwd) might not be at the top-level directory of it", and no stronger than that. That check is a very sensible thing to do before doing cd-to-toplevel. We check that the place we would want to go exists, and then go there. But the implementation of require_work_tree we have today is quite different. I don't have energy to dig the history, but currently it says: test "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = true || die "fatal: $0 cannot be used without a working tree." Which is completely bogus. Even though we may happen to be just outside of it right now, we may have a working tree that we can cd_to_toplevel back to. Add a function "require_work_tree_exists" that implements the check this function originally intended (this is so that third-party scripts that rely on the current behaviour do not have to get broken). For now, update _no_ in-tree scripts, not even "git pull", as nobody on the list seems to really care about the above corner case workflow that triggered this. Scripts can be updated after vetting that they do want the "we want to make sure the place we are going to go actually exists" semantics. Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 May 2011, 18:34:40 UTC
2e987f9 gitweb: Make JavaScript ability to adjust timezones configurable Configure JavaScript-based ability to select common timezone for git dates via %feature mechanism, namely 'javascript-timezone' feature. The following settings are configurable: * default timezone (defaults to 'local' i.e. browser timezone); this also can function as a way to disable this ability, by setting it to false-ish value (undef or '') * name of cookie to store user's choice of timezone * class name to mark dates NOTE: This is a bit of abuse of %feature system, which can store only sequence of values, rather than dictionary (hash); usually but not always only a single value is used. Based-on-code-by: John 'Warthog9' Hawley <warthog9@eaglescrag.net> Helped-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 May 2011, 18:22:45 UTC
2ae8da2 gitweb.js: Add UI for selecting common timezone to display dates This will modify HTML, add CSS rules and add DOM event handlers so that clicking on any date (the common part, not the localtime part) will display a drop down menu to choose the timezone to change to. Currently menu displays only the following timezones: utc local -1200 -1100 ... +1100 +1200 +1300 +1400 In timezone selection menu each timezone is +1hr to the previous. The code is capable of handling fractional timezones, but those have not been added to the menu. All changes are saved to a cookie, so page changes and closing / reopening browser retains the last known timezone setting used. [jn: Changed from innerHTML to DOM, moved to event delegation for onclick to trigger menu, added close button and cookie refreshing] Helped-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: John 'Warthog9' Hawley <warthog9@eaglescrag.net> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 May 2011, 18:22:45 UTC
291e52b gitweb: JavaScript ability to adjust time based on timezone This patch is based on Kevin Cernekee's <cernekee@gmail.com> patch series entitled "gitweb: introduce localtime feature". While Kevin's patch changed the server side output so that the timezone was output from gitweb itself, this has a number of drawbacks, in particular with respect to gitweb-caching. This patch takes the same basic goal, display the appropriate times in a given common timezone, and implements it in JavaScript. This requires adding / using a new class, "datetime", to be able to find elements to be adjusted from JavaScript. Appropriate dates are wrapped in a span with this class. Timezone to be used can be retrieved from "gitweb_tz" cookie, though currently there is no way to set / manipulate this cookie from gitweb; this is left for later commit. Valid timezones, currently, are: "utc", "local" (which means that timezone is taken from browser), and "+/-ZZZZ" numeric timezone as in RFC-2822. Default timezone is "local" (currently not configurable, left for later commit). Fallback (should JavaScript not be enabled) is to treat dates as they have been and display them, only, in UTC. Pages affected: * 'summary' view, "last change" field (commit time from latest change) * 'log' view, author time * 'commit' and 'commitdiff' views, author/committer time * 'tag' view, tagger time Based-on-code-from: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: John 'Warthog9' Hawley <warthog9@eaglescrag.net> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 May 2011, 18:22:45 UTC
ce71b07 gitweb: Unify the way long timestamp is displayed format_timestamp_html loses its "-localtime => 1" option, and now always print the local time (in author/comitter/tagger local timezone), with "atnight" warning if needed. This means that both 'summary' and 'log' views now display localtime. In the case of 'log' view this can be thought as an improvement, as now one can easily see which commits in a series are made "atnight" and should be examined closer. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 May 2011, 18:22:45 UTC
256b7b4 gitweb: Refactor generating of long dates into format_timestamp_html It is pure refactoring and doesn't change gitweb output, though this could potentially affect 'summary', 'log', and 'commit'-like views ('commit', 'commitdiff', 'tag'). Remove print_local_time and format_local_time, as their use is now replaced (indirectly) by using format_timestamp_html. While at it improve whitespace formatting. Inspired-by-code-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 May 2011, 18:22:45 UTC
1cae3ee gitweb.js: Provide getElementsByClassName method (if it not exists) The code is simplified and does not support full specification of native getElementsByClassName method, but implements just subset that would be enough for gitweb, supporting only single class name. Signed-off-by: John 'Warthog9' Hawley <warthog9@eaglescrag.net> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 May 2011, 18:22:45 UTC
fcce886 gitweb.js: Introduce code to handle cookies from JavaScript Introduced gitweb/static/js/cookies.js file provides functions for setting, getting and deleting cookies. Code taken from subsection "Cookies in JavaScript" of "Professional JavaScript for Web Developers" by Nicholas C. Zakas and from cookie plugin for jQuery (dual licensed under the MIT and GPL licenses). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 May 2011, 18:22:44 UTC
54b1479 gitweb.js: Extract and improve datetime handling Move formatDateISOLocal(epoch, timezone) function (and also helper timezoneOffset(timezoneInfo) function it requires) from common-lib.js to datetime.js Add new functions: * localTimezoneOffset - to get browser timezone offset in seconds * localTimezoneInfo - to get browser timezone in '(+|-)HHMM' format * formatTimezoneInfo - turn offset in hours and minutes into '(+|-)HHMM' * parseRFC2822Date - to parse RFC-2822 dates that gitweb uses into epoch * formatDateRFC2882 - like formatDateISOLocal, only RFC-2822 format All those functions are meant to be used in future commit 'gitweb: javascript ability to adjust time based on timezone' An alternative would be to use e.g. Datejs (http://www.datejs.com) library, or JavaScript framework that has date formatting (perhaps as a plugin). While at it escape '-' in character class inside tzRe regexp, as recommended by JSLint (http://www.jslint.com). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 May 2011, 18:22:44 UTC
4dfa207 gitweb.js: Provide default values for padding in padLeftStr and padLeft This means that one can use padLeft(4, 2) and it would be equivalent to runing padLeft(4, 2, '0'), and it would return '04' i.e. '4' padded with '0' to width 2, to be used e.g. in formatting date and time. This should make those functions easier to use. Current code doesn't yet make use of this feature. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 May 2011, 18:22:44 UTC
e2895de gitweb.js: Update and improve comments in JavaScript files This consists of adding a few extra explanation, fixing descriptions of functions to match names of parameters in code, adding a few separators, and fixing spelling -- while at it spell 'neighbor' using American spelling (and not as 'neighbour'). This is post-split cleanup. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 May 2011, 18:22:44 UTC
9a86dd5 gitweb: Split JavaScript for maintability, combining on build Split originally single gitweb.js file into smaller files, each dealing with single issue / area of responsibility. This move should make gitweb's JavaScript code easier to maintain. For better webapp performance it is recommended[1][2][3] to combine JavaScript files. Do it during build time (in gitweb/Makefile), by straight concatenation of files into gitweb.js file (which is now ignored as being generated). This means that there are no changes to gitweb script itself - it still uses gitweb.js or gitweb.min.js, but now generated. [1]: http://developer.yahoo.com/performance/rules.html "Minimize HTTP Requests" section [2]: http://code.google.com/speed/articles/include-scripts-properly.html "1. Combine external JavaScript files" [3]: http://javascript-reference.info/speed-up-your-javascript-load-time.htm "Combine Your Files" section. See also new gitweb/static/js/README file. Inspired-by-patch-by: John 'Warthog9' Hawley <warthog9@eaglescrag.net> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 May 2011, 18:22:44 UTC
f556e4a git-grep: Update tests (mainly for -P) Add few more tests for "-P/--perl-regexp" option of "git grep". While at it, add some generic tests for grep.extendedRegexp config option, for detecting invalid regexep and check if "last one wins" rule works for selecting regexp type. Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 May 2011, 18:57:08 UTC
f143d9c userdiff/perl: tighten BEGIN/END block pattern to reject here-doc delimiters A naive method of treating BEGIN/END blocks with a brace on the second line as diff/grep funcname context involves also matching unrelated lines that consist of all-caps letters: sub foo { print <<'EOF' text goes here ... EOF ... rest of foo ... } That's not so great, because it means that "git diff" and "git grep --show-function" would write "=EOF" or "@@ EOF" as context instead of a more useful reminder like "@@ sub foo {". To avoid this, tighten the pattern to only match the special block names that perl accepts (namely BEGIN, END, INIT, CHECK, UNITCHECK, AUTOLOAD, and DESTROY). The list is taken from perl's toke.c. Suggested-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 May 2011, 18:39:13 UTC
5df3e2b Update 1.7.6 draft release notes Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 May 2011, 17:54:54 UTC
4961210 Merge branch 'tr/add-i-no-escape' * tr/add-i-no-escape: add -i: ignore terminal escape sequences 23 May 2011, 17:50:06 UTC
34ad5a5 Merge branch 'jm/maint-diff-words-with-sbe' * jm/maint-diff-words-with-sbe: do not read beyond end of malloc'd buffer 23 May 2011, 17:27:42 UTC
c3c7797 Merge branch 'js/mingw-shutdown' * js/mingw-shutdown: Windows: add a wrapper for the shutdown() system call 23 May 2011, 17:27:12 UTC
3c0ae61 Merge branch 'ms/ls-remote-exit-with-status' * ms/ls-remote-exit-with-status: ls-remote: the --exit-code option reports "no matching refs" 23 May 2011, 17:27:08 UTC
6bb696c Merge branch 'mg/config-symbolic-constants' * mg/config-symbolic-constants: config: Give error message when not changing a multivar config: define and document exit codes 23 May 2011, 16:59:05 UTC
91810ab Merge branch 'ab/i18n-scripts-basic' * ab/i18n-scripts-basic: Makefile: add xgettext target for *.sh files git-sh-i18n.sh: add GIT_GETTEXT_POISON support git-sh-i18n.sh: add no-op gettext() and eval_gettext() wrappers git-sh-i18n--envsubst: our own envsubst(1) for eval_gettext() 23 May 2011, 16:58:45 UTC
be5ab43 Merge branch 'jc/magic-pathspec' * jc/magic-pathspec: setup.c: Fix some "symbol not declared" sparse warnings t3703: Skip tests using directory name ":" on Windows revision.c: leave a note for "a lone :" enhancement t3703, t4208: add test cases for magic pathspec rev/path disambiguation: further restrict "misspelled index entry" diag fix overslow :/no-such-string-ever-existed diagnostics fix overstrict :<path> diagnosis grep: use get_pathspec() correctly pathspec: drop "lone : means no pathspec" from get_pathspec() Revert "magic pathspec: add ":(icase)path" to match case insensitively" magic pathspec: add ":(icase)path" to match case insensitively magic pathspec: futureproof shorthand form magic pathspec: add tentative ":/path/from/top/level" pathspec support 23 May 2011, 16:58:35 UTC
b7aba2e Merge branch 'jk/blame-line-porcelain' * jk/blame-line-porcelain: blame: add --line-porcelain output format blame: refactor porcelain output add tests for various blame formats 23 May 2011, 16:58:31 UTC
f5b7ce1 tests: make test_expect_code quieter on success A command exiting with the expected status is not particularly notable. While the indication of progress might be useful when tracking down where in a test a failure has happened, the same applies to most other test helpers, which are quiet about success, so this single helper's output stands out in an unpleasant way. An alternative method for showing progress information might to invent a --progress option that runs tests with "set -x", or until that is available, to run tests using commands like prove -v -j2 --shuffle --exec='sh -x' t2202-add-addremove.sh Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 May 2011, 05:29:33 UTC
ea2ca44 userdiff/perl: catch sub with brace on second line Accept sub foo { } as an alternative to a more common style that introduces perl functions with a brace on the first line (and likewise for BEGIN/END blocks). The new regex is a little hairy to avoid matching # forward declaration sub foo; while continuing to match "sub foo($;@) {" and sub foo { # This routine is interesting; # in fact, the lines below explain how... While at it, pay attention to Perl 5.14's "package foo {" syntax as an alternative to the traditional "package foo;". Requested-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 May 2011, 05:29:32 UTC
12f0967 userdiff/perl: match full line of POD headers The builtin perl userdiff driver is not greedy enough about catching POD header lines. Capture the whole line, so instead of just declaring that we are in some "@@ =head1" section, diff/grep output can explain that the enclosing section is about "@@ =head1 OPTIONS". Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 May 2011, 05:29:32 UTC
f12c66b userdiff/perl: anchor "sub" and "package" patterns on the left The userdiff funcname mechanism has no concept of nested scopes --- instead, "git diff" and "git grep --show-function" simply label the diff header with the most recent matching line. Unfortunately that means text following a subroutine in a POD section: =head1 DESCRIPTION You might use this facility like so: sub example { foo; } Now, having said that, let's say more about the facility. Blah blah blah ... etc etc. gets the subroutine name instead of the POD header in its diff/grep funcname header, making it harder to get oriented when reading a diff without enough context. The fix is simple: anchor the funcname syntax to the left margin so nested subroutines and packages like this won't get picked up. (The builtin C++ funcname pattern already does the same thing.) This means the userdiff driver will misparse the idiom { my $static; sub foo { ... use $static ... } } but I think that's worth it; we can revisit this later if the userdiff mechanism learns to keep track of the beginning and end of nested scopes. Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 May 2011, 05:29:31 UTC
d64d6cd t4018 (funcname patterns): minor cleanups Introduce a test_expect_funcname function to make a diff and apply a regexp anchored on the left to the function name it writes, avoiding some repetition. Omit the space after >, <<, and < operators for consistency with other scripts. Quote the <<here document delimiter and $ signs in quotes so readers don't have to worry about the effect of shell metacharacters. Remove some unnecessary blank lines. Run "git diff" as a separate command instead of as upstream of a pipe that checks its output, so the exit status can be tested. In particular, this way if "git diff" starts segfaulting the test harness will notice. Allow "error:" as a synonym for "fatal:" when checking error messages, since whether a command uses die() or "return error()" is a small implementation detail. Anchor some more regexes on the right. None of the above is very important on its own; the point is just to make the script a little easier to read and the code less scary to modify. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 May 2011, 05:29:31 UTC
f792a0b t4018 (funcname patterns): make configuration easier to track Introduce a "test_config" function to set a configuration variable for use by a single test (automatically unsetting it when the assertion finishes). If this function is used consistently, the configuration used in a test_expect_success block can be read at the beginning of that block instead of requiring reading all the tests that come before. So it becomes a little easier to add new tests or rearrange existing ones without fear of breaking configuration. In particular, the test of alternation in xfuncname patterns also checks that xfuncname takes precedence over funcname variable as a sort of side-effect, since the latter leaks in from previous tests. In the new syntax, the test has to say explicitly what variables it is using, making the test clearer and a future regression in coverage from carelessly editing the script less likely. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 May 2011, 05:29:30 UTC
5b5e459 t4018 (funcname patterns): make .gitattributes state easier to track Most, but not all, tests in this script rely on attributes declaring that files with a .java extension should use the "java" driver: *.java diff=java Split out a "set up" test to put such a .gitattributes in place after the tests that do not want it have run, to make it more likely that individual tests other than this setup test can be safely modified, rearranged, or skipped. Presumably this setup code will learn to request other drivers for other extensions in the same place when the test suite learns to exercise other diff drivers. Similarly, make sure that early test assertions that do not use these default attributes set up .gitattributes appropriately for themselves, so tests that run before can be modified with less risk of breaking something. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 May 2011, 05:29:29 UTC
391b142 Merge branch 'maint' * maint: git-svn: Fix git svn log --show-commit 21 May 2011, 01:50:29 UTC
42536dd do not read beyond end of malloc'd buffer With diff.suppress-blank-empty=true, "git diff --word-diff" would output data that had been read from uninitialized heap memory. The problem was that fn_out_consume did not account for the possibility of a line with length 1, i.e., the empty context line that diff.suppress-blank-empty=true converts from " \n" to "\n". Since it assumed there would always be a prefix character (the space), it decremented "len" unconditionally, thus passing len=0 to emit_line, which would then blindly call emit_line_0 with len=-1 which would pass that value on to fwrite as SIZE_MAX. Boom. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 20 May 2011, 18:39:49 UTC
9963e02 git-svn: Fix git svn log --show-commit git svn log --show-commit had no tests and, consequently, no attention by the author of b1b4755 (git-log: put space after commit mark, 2011-03-10) who kept git svn log working only without --show-commit. Introduce a test and fix it. Reported-by: Bernt Hansen <bernt@norang.ca> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 20 May 2011, 16:30:09 UTC
11bc3e9 Update draft release notes to 1.7.6 Signed-off-by: Junio C Hamano <gitster@pobox.com> 20 May 2011, 04:02:20 UTC
2f0b5fa Merge branch 'jc/maint-1.7.4-pathspec-stdin-and-cmdline' * jc/maint-1.7.4-pathspec-stdin-and-cmdline: 20 May 2011, 04:02:14 UTC
ac39c5f Merge branch 'rg/copy-gecos-username' * rg/copy-gecos-username: copy_gecos: fix not adding nlen to len when processing "&" 20 May 2011, 03:37:21 UTC
1d699f7 Merge branch 'jl/submodule-conflicted-gitmodules' * jl/submodule-conflicted-gitmodules: Submodules: Don't parse .gitmodules when it contains, merge conflicts test that git status works with merge conflict in, .gitmodules 20 May 2011, 03:37:21 UTC
61d7503 Merge branch 'jc/replacing' * jc/replacing: read_sha1_file(): allow selective bypassing of replacement mechanism inline lookup_replace_object() calls read_sha1_file(): get rid of read_sha1_file_repl() madness t6050: make sure we test not just commit replacement Declare lookup_replace_object() in cache.h, not in commit.h Conflicts: environment.c 20 May 2011, 03:37:21 UTC
2d22086 Merge branch 'nd/sparse-co-fix' * nd/sparse-co-fix: sparse checkout: do not eagerly decide the fate for whole directory t1011: fix sparse-checkout initialization and add new file 20 May 2011, 03:37:21 UTC
87a684f Merge branch 'ld/p4-preserve-user-names' * ld/p4-preserve-user-names: git-p4: warn if git authorship won't be retained git-p4: small improvements to user-preservation git-p4: add option to preserve user names 20 May 2011, 03:37:20 UTC
8697083 Merge branch 'ms/tagname-does-not-begin-with-dash' * ms/tagname-does-not-begin-with-dash: tag: disallow '-' as tag name 20 May 2011, 03:37:20 UTC
a66fae3 Merge branch 'jk/git-connection-deadlock-fix' * jk/git-connection-deadlock-fix: test core.gitproxy configuration send-pack: avoid deadlock on git:// push with failed pack-objects connect: let callers know if connection is a socket connect: treat generic proxy processes like ssh processes Conflicts: connect.c 20 May 2011, 03:37:20 UTC
5c359a6 Merge branch 'js/maint-send-pack-stateless-rpc-deadlock-fix' * js/maint-send-pack-stateless-rpc-deadlock-fix: sideband_demux(): fix decl-after-stmt 20 May 2011, 03:37:19 UTC
6699c95 Merge branch 'jk/cherry-pick-root-with-resolve' * jk/cherry-pick-root-with-resolve: t3503: test cherry picking and reverting root commits revert: allow reverting a root commit cherry-pick: handle root commits with external strategies 20 May 2011, 03:37:19 UTC
e2e4aed Merge branch 'jc/maint-pathspec-stdin-and-cmdline' * jc/maint-pathspec-stdin-and-cmdline: setup_revisions(): take pathspec from command line and --stdin correctly Conflicts: revision.c 20 May 2011, 03:37:18 UTC
7b11753 Merge 1.7.5.2 in Signed-off-by: Junio C Hamano <gitster@pobox.com> 20 May 2011, 03:37:08 UTC
6db4105 Revert "Merge branch 'en/merge-recursive'" As the band-aid to merge-recursive seems to regress complex merges in an unpleasant way. The merge-recursive implementation needs to be rewritten in such a way that it resolves renames and D/F conflicts entirely in-core and not to touch working tree at all while doing so. But in the meantime, this reverts commit ac9666f84 that merged the topic in its entirety. 20 May 2011, 03:33:38 UTC
3d5ae43 Git 1.7.5.2 Signed-off-by: Junio C Hamano <gitster@pobox.com> 20 May 2011, 03:30:44 UTC
cff38a5 receive-pack: eliminate duplicate .have refs When receiving a push, we advertise ref tips from any alternate repositories, in case that helps the client send a smaller pack. Since these refs don't actually exist in the destination repository, we don't transmit the real ref names, but instead use the pseudo-ref ".have". If your alternate has a large number of duplicate refs (for example, because it is aggregating objects from many related repositories, some of which will have the same tags and branch tips), then we will send each ".have $sha1" line multiple times. This is a pointless waste of bandwidth, as we are simply repeating the same fact to the client over and over. This patch eliminates duplicate .have refs early on. It does so efficiently by sorting the complete list and skipping duplicates. This has the side effect of re-ordering the .have lines by ascending sha1; this isn't a problem, though, as the original order was meaningless. There is a similar .have system in fetch-pack, but it does not suffer from the same problem. For each alternate ref we consider in fetch-pack, we actually open the object and mark it with the SEEN flag, so duplicates are automatically culled. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 20 May 2011, 03:02:31 UTC
902bb36 bisect: refactor sha1_array into a generic sha1 list This is a generally useful abstraction, so let's let others make use of it. The refactoring is more or less a straight copy; however, functions and struct members have had their names changed to match string_list, which is the most similar data structure. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 20 May 2011, 03:02:10 UTC
114a6a8 refactor refs_from_alternate_cb to allow passing extra data The foreach_alt_odb function triggers a callback for each alternate object db we have, with room for a single void pointer as data. Currently, we always call refs_from_alternate_cb as the callback function, and then pass another callback (to receive each ref individually) as the void pointer. This has two problems: 1. C technically forbids stuffing a function pointer into a "void *". In practice, this probably doesn't matter on any architectures git runs on, but it never hurts to follow the letter of the law. 2. There is no room for an extra data pointer. Indeed, the alternate_ref_fn that refs_from_alternate_cb calls takes a void* for data, but we always pass it NULL. Instead, let's properly stuff our function pointer into a data struct, which also leaves room for an extra caller-supplied data pointer. And to keep things simple for existing callers, let's make a for_each_alternate_ref function that takes care of creating the extra struct. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 20 May 2011, 03:01:10 UTC
d192508 Makefile: sort TEST_PROGRAMS list We usually keep these lists in sorted order, but the last few entries were just tacked on the end. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 20 May 2011, 02:44:59 UTC
ea5f220 fetch: avoid repeated commits in mark_complete We add every local ref to a list so that we can mark them and all of their ancestors back to a certain cutoff point. However, if some refs point to the same commit, we will end up adding them to the list many times. Furthermore, since commit_lists are stored as linked lists, we must do an O(n) traversal of the list in order to find the right place to insert each commit. This makes building the list O(n^2) in the number of refs. For normal repositories, this isn't a big deal. We have a few hundreds refs at most, and most of them are unique. But consider an "alternates" repo that serves as an object database for many other similar repos. For reachability, it needs to keep a copy of the refs in each child repo. This means it may have a large number of refs, many of which point to the same commits. By noting commits we have already added to the list, we can shrink the size of "n" in such a repo to the number of unique commits, which is on the order of what a normal repo would contain (it's actually more than a normal repo, since child repos may have branches at different states, but in practice it tends to be much smaller than the list with duplicates). Here are the results on one particular giant repo (containing objects for all Rails forks on GitHub): $ git for-each-ref | wc -l 112514 [before] $ git fetch --no-tags ../remote.git 63.52user 0.12system 1:03.68elapsed 99%CPU (0avgtext+0avgdata 137648maxresident)k 1856inputs+48outputs (11major+19603minor)pagefaults 0swaps $ git fetch --no-tags ../remote.git 6.15user 0.08system 0:06.25elapsed 99%CPU (0avgtext+0avgdata 123856maxresident)k 0inputs+40outputs (0major+18872minor)pagefaults 0swaps Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 20 May 2011, 01:41:44 UTC
590e081 ident: add NO_GECOS_IN_PWENT for systems without pw_gecos in struct passwd Allow NO_GECOS_IN_PWENT to be defined in the Makefile for platforms that lack the pw_gecos field in their "struct passwd", in which case the uppercased user name is used instead via the standard '&' replacement mechanism. Signed-off-by: Rafael Gieschke <rafael@gieschke.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 20 May 2011, 01:35:58 UTC
36268b7 provide a copy of the LGPLv2.1 The LGPL seems to require providing a copy of the license when distributing xdiff, compat/fnmatch, and so on, or altering the license notices to refer to the GPL intead. Since we don't want to do the latter, let's do the former. It's nice to let people know their rights anyway. Inspired-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 20 May 2011, 01:23:17 UTC
back to top