summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-04-18gc: use argv-array for sub-commandsJeff King
git-gc executes many sub-commands. The argument list for some of these is constant, but for others we add more arguments at runtime. The latter is implemented by allocating a constant extra number of NULLs, and either using a custom append function, or just referencing unused slots by number. As of commit 7e52f56, which added two new arguments, it is possible to exceed the constant number of slots for "repack" by running "git gc --aggressive", causing "git gc" to die. This patch converts all of the static argv lists to use argv-array. In addition to fixing the overflow caused by 7e52f56, it has a few advantages: 1. We can drop the custom append function (which, incidentally, had an off-by-one error exacerbating the static limit). 2. We can drop the ugly magic numbers used when adding arguments to "prune". 3. Adding further arguments will be easier; you can just add new "push" calls without worrying about increasing any static limits. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-18argv-array: add a new "pushl" methodJeff King
It can be convenient to push many strings in a single line (e.g., if you are initializing an array with defaults). This patch provides a convenience wrapper to allow this. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-18argv-array: refactor empty_argv initializationJeff King
An empty argv-array is initialized to point to a static empty NULL-terminated array. The original implementation separates the actual storage of the NULL-terminator from the pointer to the list. This makes the exposed type a "const char **", which nicely matches the type stored by the argv-array. However, this indirection means that one cannot use empty_argv to initialize a static variable, since it is not a constant. Instead, we can expose empty_argv directly, as an array of pointers. The only place we use it is in the ARGV_ARRAY_INIT initializer, and it decays to a pointer appropriately there. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-11gc: do not explode objects which will be immediately prunedJeff King
When we pack everything into one big pack with "git repack -Ad", any unreferenced objects in to-be-deleted packs are exploded into loose objects, with the intent that they will be examined and possibly cleaned up by the next run of "git prune". Since the exploded objects will receive the mtime of the pack from which they come, if the source pack is old, those loose objects will end up pruned immediately. In that case, it is much more efficient to skip the exploding step entirely for these objects. This patch teaches pack-objects to receive the expiration information and avoid writing these objects out. It also teaches "git gc" to pass the value of gc.pruneexpire to repack (which in turn learns to pass it along to pack-objects) so that this optimization happens automatically during "git gc" and "git gc --auto". Signed-off-by: Jeff King <peff@peff.net> Acked-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-06Git 1.7.10v1.7.10Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-06spec: add missing build dependencyFelipe Contreras
Otherwise: /usr/bin/perl Makefile.PL PREFIX='/opt/git' INSTALL_BASE='' Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: ...) at Makefile.PL line 1. BEGIN failed--compilation aborted at Makefile.PL line 1. make[1]: *** [perl.mak] Error 2 make: *** [perl/perl.mak] Error 2 Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-03Git 1.7.10-rc4v1.7.10-rc4Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-02Merge branch 'pt/gitk'Junio C Hamano
* pt/gitk: gitk: fix setting font display with new tabbed dialog layout. gitk: fix tabbed preferences construction when using tcl 8.4
2012-04-02Sync with 1.7.9.6Junio C Hamano
2012-04-02Git 1.7.9.6v1.7.9.6Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-02Merge branch 'jc/maint-merge-autoedit' into maintJunio C Hamano
* jc/maint-merge-autoedit: merge: backport GIT_MERGE_AUTOEDIT support
2012-04-02gitk: fix setting font display with new tabbed dialog layout.Pat Thoyts
The changes to the dialog window tree broke the preview of the selected font on the button. This corrects that issue. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-02gitk: fix tabbed preferences construction when using tcl 8.4Pat Thoyts
In 8.5 the incr command creates the target variable if it does not exist but in 8.4 using incr on a non-existing variable raises an error. Ensure we have created our counter variable when creating the tabbed dialog for non-themed preferences. Reported-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-02Merge git://github.com/git-l10n/git-poJunio C Hamano
Portuguese Portuguese translations from Marco Sousa via Jiang Xin * 'master' of git://github.com/git-l10n/git-po: l10n: Add the Dutch translation team and initialize nl.po l10n: Inital Portuguese Portugal language (pt_PT) l10n: Improve zh_CN translation for Git 1.7.10-rc3
2012-04-02l10n: Add the Dutch translation team and initialize nl.poVincent van Ravesteijn
Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
2012-04-02l10n: Inital Portuguese Portugal language (pt_PT)Marco Sousa
Signed-off-by: Marco Sousa <marcomsousa@gmail.com>
2012-03-31Merge branch 'maint'Junio C Hamano
* maint: string-list: document that string_list_insert() inserts unique strings
2012-03-30string-list: document that string_list_insert() inserts unique stringsHeiko Voigt
Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-30l10n: Improve zh_CN translation for Git 1.7.10-rc3Jiang Xin
Improvements of zh_CN translations: - Update translation for msg "Changes not staged for commit:". - Remove unnecessary leading spaces for some messages. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2012-03-28config: remove useless assignmentRené Scharfe
v1.7.9-8-g270a344 (config: stop using config_exclusive_filename) replaced config_exclusive_filename with given_config_file. In one case this resulted in a self-assignment, which is reported by clang as a warning. Remove the useless code. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-28Git 1.7.10-rc3v1.7.10-rc3Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-28correct a few doubled-word nits in comments and documentationJim Meyering
Found by running this command: $ git ls-files -z|xargs -0 perl -0777 -n \ -e 'while (/\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\s+\1\b/gims)' \ -e ' {' \ -e ' $n = ($` =~ tr/\n/\n/ + 1);' \ -e ' ($v = $&) =~ s/\n/\\n/g;' \ -e ' print "$ARGV:$n:$v\n";' \ -e ' }' Why not just git grep -E ...? That wouldn't work then the doubled words are separated by a newline. This is derived from a Makefile syntax-check rule in gnulib's maint.mk: http://git.sv.gnu.org/cgit/gnulib.git/tree/top/maint.mk Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-28correct spelling: an URL -> a URLJim Meyering
Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-27l10n updates for Git 1.7.10-rc1Junio C Hamano
* 'master' of git://github.com/git-l10n/git-po: Add url of Swedish l10n team in TEAMS file l10n: Review zh_CN translation for Git 1.7.10-rc1 Update Swedish translation (724t0f0u). l10n: Update zh_CN translation for Git 1.7.10-rc1 l10n: Update git.pot (1 new message)
2012-03-27tests: unset COLUMNS inherited from environmentZbigniew Jędrzejewski-Szmek
$COLUMNS must be unset to not interfere with the tests. The tests already ignore the terminal size because output is redirected to a file, but COLUMNS overrides terminal size detection and changes the test output away from the standard 80. Reported-by: Jeff King <peff@peff.net> Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-27Add url of Swedish l10n team in TEAMS fileJiang Xin
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2012-03-27l10n: Review zh_CN translation for Git 1.7.10-rc1Jiang Xin
Overall review of the zh_CN translation: - Distinguish the translations of index and stage, though they are the same thing. - Many other fixes, e.g., add the lost periods at the end of translated sentences. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2012-03-27Update Swedish translation (724t0f0u).Peter Krefting
- Update for 1.7.10-rc1. - Add a missing -e when generaring the "Untracked files" message. - Fixed some wordings after playing with the localized version.
2012-03-26Update draft release notes to 1.7.10Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-26Sync with 1.7.9.5Junio C Hamano
2012-03-26Git 1.7.9.5v1.7.9.5Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-26Merge branch 'jn/maint-fast-import-empty-ls' into maintJunio C Hamano
* jn/maint-fast-import-empty-ls: fast-import: don't allow 'ls' of path with empty components fast-import: leakfix for 'ls' of dirty trees
2012-03-26Merge branch 'ph/rerere-doc' into maintJunio C Hamano
* ph/rerere-doc: rerere: Document 'rerere remaining'
2012-03-26Merge branch 'ms/maint-config-error-at-eol-linecount' into maintJunio C Hamano
* ms/maint-config-error-at-eol-linecount: config: report errors at the EOL with correct line number
2012-03-26grep doc: add --break / --heading / -W to synopsisMark Lodato
All of the other options were included in the synopsis, so it makes sense to include these as well. Signed-off-by: Mark Lodato <lodatom@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-26Documentation: improve description of GIT_EDITOR and preference orderRodrigo Silva (MestreLion)
Previously GIT_EDITOR was not listed in git(1) "Environment Variables" section, which could be very confusing to users. Include it in "other" subsection along with a link to git-var(1), since that is the page that fully describes all places where editor can be set and also their preference order. Also, git-var(1) did not say that hardcoded fallback 'vi' may have been changed at build time. A user could be puzzled if 'nano' pops up even when none of the mentioned environment vars or config.editor are set. Clarify this. Ideally, the build system should be changed to reflect the chosen fallback editor when creating the man pages. Not sure if that is even possible though. Signed-off-by: Rodrigo Silva (MestreLion) <linux@rodrigosilva.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-26documentation: fix alphabetic ordered list for git-rebase man pageNelson Benitez Leon
An alphabetic ordered list (a.) is converted to numerical in the man page (1.) so context comments naming 'a' were confusing, fix that by not using ordered list notation for 'a' anb 'b' items. Signed-off-by: Nelson Benitez Leon <nelsonjesus.benitez@seap.minhap.es> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-24Merge gitk changes from Paul Mackerras at git://ozlabs.org/~paulus/gitkJunio C Hamano
* git://ozlabs.org/~paulus/gitk: gitk: Teach gitk to respect log.showroot gitk: Add menu items for comparing a commit with the marked commit gitk: Speed up resolution of short SHA1 ids gitk: Use symbolic font names "sans" and "monospace" when available gitk: Skip over AUTHOR/COMMIT_DATE when searching all fields gitk: Make "git describe" output clickable, too gitk: Fix the display of files when filtered by path gitk: Use a tabbed dialog to edit preferences gitk: Use "gitk: repo-top-level-dir" as window title
2012-03-24gitk: Teach gitk to respect log.showrootMarcus Karlsson
In early days, all projects managed by git (except for git itself) had the product of a fairly mature development history in their first commit, and it was deemed unnecessary clutter to show additions of these thousands of paths as a patch. "git log" learned to show the patch for the initial commit without requiring --root command line option at 0f03ca9 (config option log.showroot to show the diff of root commits, 2006-11-23). Teach gitk to respect log.showroot. [paulus@samba.org: Cleaned up the Tcl a bit, use --bool on the git config call] Signed-off-by: Marcus Karlsson <mk@acc.umu.se> Signed-off-by: Paul Mackerras <paulus@samba.org>
2012-03-23Git 1.7.10-rc2v1.7.10-rc2Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-23.mailmap: unify various old mail addresses of gitsterJunio C Hamano
"git shortlog -s -e" should show a single current address with this. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-23Merge branch 'am/completion-zsh-fix'Junio C Hamano
* am/completion-zsh-fix: contrib/completion: "local var=()" is misinterpreted as func-decl by zsh
2012-03-23Merge branch 'dw/gitweb-doc-grammo'Junio C Hamano
Typofix. * dw/gitweb-doc-grammo: Documentation/gitweb: trivial English fixes
2012-03-23Documentation/gitweb: trivial English fixesD Waitzman
Change "it's" to "its" where a possessive is intended. Also add two missing "the" that were noticed by Ben Walton. Signed-off-by: David Waitzman <djw@bbn.com>
2012-03-23gitk: Add menu items for comparing a commit with the marked commitPaul Mackerras
Sometimes one wants to see the different between two commits that are a long distance apart in the graph display. This is difficult to do with the "Diff this -> selected" and "Diff selected -> this" menu items because the need to maintain the selection means that one can't use the find facilities or the reference list window to navigate from one to the other. This provides an alternative using the mark. Having found one commit, one marks it with the "Mark this commit" menu item, then navigates to the other commit and uses the new "Diff this -> marked commit" and/or "Diff marked commit -> this" menu items. Signed-off-by: Paul Mackerras <paulus@samba.org>
2012-03-21contrib/completion: "local var=()" is misinterpreted as func-decl by zshAlex Merry
Certain versions of zsh seems to treat local var=() as a function declaration, rather than an assignment of an empty array, although its documentation does not suggest that this should be the case. With zsh 4.3.15 on Fedora Core 15, this causes __git_ps1 " (%s)" to trigger an error message: local:2: command not found: svn_url_pattern when GIT_PS1_SHOWUPSTREAM="auto". Signed-off-by: Alex Merry <dev@randomguy3.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-20Merge branch 'maint'Junio C Hamano
* maint:
2012-03-20Merge branch 'maint-1.7.8' into maintJunio C Hamano
* maint-1.7.8: t/Makefile: Use $(sort ...) explicitly where needed gitweb: Fix actionless dispatch for non-existent objects i18n of multi-line advice messages
2012-03-20merge: backport GIT_MERGE_AUTOEDIT supportJunio C Hamano
Even though 1.7.9.x series does not open the editor by default when merging in general, it does do so in one occassion: when merging an annotated tag. And worse yet, there is no good way for older scripts to decline this. Backport the support for GIT_MERGE_AUTOEDIT environment variable from 1.7.10 track to help those stuck on 1.7.9.x maintenance track. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-20Merge branch 'ks/sort-wildcard-in-makefile' into maint-1.7.8Junio C Hamano
* ks/sort-wildcard-in-makefile: t/Makefile: Use $(sort ...) explicitly where needed