aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* refs: store references hierarchicallyMichael Haggerty2012-04-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Store references hierarchically in a tree that matches the pseudo-directory structure of the reference names. Add a new kind of ref_entry (with flag REF_DIR) to represent a whole subdirectory of references. Sort ref_dirs one subdirectory at a time. NOTE: the dirs can now be sorted as a side-effect of other function calls. Therefore, it would be problematic to do something from a each_ref_fn callback that could provoke the sorting of a directory that is currently being iterated over (i.e., the directory containing the entry that is being processed or any of its parents). This is a bit far-fetched, because a directory is always sorted just before being iterated over. Therefore, read-only accesses cannot trigger the sorting of a directory whose iteration has already started. But if a callback function would add a reference to a parent directory of the reference in the iteration, then try to resolve a reference under that directory, a re-sort could be triggered and cause the iteration to work incorrectly. Nevertheless...add a comment in refs.h warning against modifications during iteration. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* sort_ref_dir(): simplify logicMichael Haggerty2012-04-10
| | | | | | | Use the more usual indexing idiom for clarity. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* refs.c: rename ref_array -> ref_dirMichael Haggerty2012-04-10
| | | | | | | | | | | This purely textual change is in preparation for storing references hierarchically, when the old ref_array structure will represent one "directory" of references. Rename functions that deal with this structure analogously, and also rename the structure's "refs" member to "entries". Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* struct ref_entry: nest the value part in a unionMichael Haggerty2012-04-10
| | | | | | | | This change is obviously silly by itself, but it is a step towards adding a second member to the union. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* check_refname_component(): return 0 for zero-length componentsMichael Haggerty2012-04-10
| | | | | | | | | | | | Return 0 (instead of -1) for zero-length components. Move the interpretation of zero-length components as illegal to check_refname_format(). This will make it easier to extend check_refname_format() to also check whether directory names are valid. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* free_ref_entry(): new functionMichael Haggerty2012-04-10
| | | | | | | | Add a function free_ref_entry(). This function will become nontrivial when ref_entry (soon) becomes polymorphic. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* names_conflict(): simplify implementationMichael Haggerty2012-04-10
| | | | | | | Save a bunch of lines of code and a couple of strlen() calls. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* repack_without_ref(): reimplement using do_for_each_ref_in_array()Michael Haggerty2012-04-10
| | | | | | | | It costs a bit of boilerplate, but it means that the function can be ignorant of how cached refs are stored. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* do_for_each_ref_in_arrays(): new functionMichael Haggerty2012-04-10
| | | | | | | | | Extract function do_for_each_ref_in_arrays() from do_for_each_ref(). The new function will be a useful building block for storing refs hierarchically. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* do_for_each_ref_in_array(): new functionMichael Haggerty2012-04-10
| | | | | | | | | Extract function do_for_each_ref_in_array() from do_for_each_ref(). The new function will be a useful building block for storing refs hierarchically. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* refs: manage current_ref within do_one_ref()Michael Haggerty2012-04-10
| | | | | | | | Set and clear current_ref within do_one_ref() instead of setting it here and leaving it to somebody else to clear it. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* refs.c: reorder definitions more logicallyMichael Haggerty2012-04-10
| | | | | | | | | | Reorder definitions in file: first check_refname_format() and helper functions, then the functions for managing the ref_entry and ref_array data structures, then ref_cache, then the more "business-logicky" stuff. No code is changed. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Git 1.7.10v1.7.10Junio C Hamano2012-04-06
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* spec: add missing build dependencyFelipe Contreras2012-04-06
| | | | | | | | | | | | | 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>
* Git 1.7.10-rc4v1.7.10-rc4Junio C Hamano2012-04-03
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'pt/gitk'Junio C Hamano2012-04-02
|\ | | | | | | | | | | * pt/gitk: gitk: fix setting font display with new tabbed dialog layout. gitk: fix tabbed preferences construction when using tcl 8.4
| * gitk: fix setting font display with new tabbed dialog layout.Pat Thoyts2012-04-02
| | | | | | | | | | | | | | | | 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>
| * gitk: fix tabbed preferences construction when using tcl 8.4Pat Thoyts2012-04-02
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Sync with 1.7.9.6Junio C Hamano2012-04-02
|\ \
| * | Git 1.7.9.6v1.7.9.6Junio C Hamano2012-04-02
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Merge branch 'jc/maint-merge-autoedit' into maintJunio C Hamano2012-04-02
| |\ \ | | | | | | | | | | | | | | | | * jc/maint-merge-autoedit: merge: backport GIT_MERGE_AUTOEDIT support
| | * | merge: backport GIT_MERGE_AUTOEDIT supportJunio C Hamano2012-03-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Merge git://github.com/git-l10n/git-poJunio C Hamano2012-04-02
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | l10n: Add the Dutch translation team and initialize nl.poVincent van Ravesteijn2012-04-02
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
| * | | | l10n: Inital Portuguese Portugal language (pt_PT)Marco Sousa2012-04-02
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Marco Sousa <marcomsousa@gmail.com>
| * | | | l10n: Improve zh_CN translation for Git 1.7.10-rc3Jiang Xin2012-03-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | Merge branch 'maint'Junio C Hamano2012-03-30
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | * maint: string-list: document that string_list_insert() inserts unique strings
| * | | | string-list: document that string_list_insert() inserts unique stringsHeiko Voigt2012-03-30
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | config: remove useless assignmentRené Scharfe2012-03-28
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Git 1.7.10-rc3v1.7.10-rc3Junio C Hamano2012-03-28
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | correct a few doubled-word nits in comments and documentationJim Meyering2012-03-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | correct spelling: an URL -> a URLJim Meyering2012-03-28
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | l10n updates for Git 1.7.10-rc1Junio C Hamano2012-03-27
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * '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)
| * | | | Add url of Swedish l10n team in TEAMS fileJiang Xin2012-03-27
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
| * | | | l10n: Review zh_CN translation for Git 1.7.10-rc1Jiang Xin2012-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | Update Swedish translation (724t0f0u).Peter Krefting2012-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
| * | | | l10n: Update zh_CN translation for Git 1.7.10-rc1Jiang Xin2012-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Translate 1 new message from Git 1.7.10-rc1: "Gitdir '$a' is ..." Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
| * | | | l10n: Update git.pot (1 new message)Jiang Xin2012-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes of po/git.pot from v1.7.10-rc0 to v1.7.10-rc1: * 1 new l10n message at line: 3361. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
| * | | | Merge v1.7.10-rc0 for git l10n updateJiang Xin2012-03-16
| |\ \ \ \
* | | | | | tests: unset COLUMNS inherited from environmentZbigniew Jędrzejewski-Szmek2012-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $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>
* | | | | | Update draft release notes to 1.7.10Junio C Hamano2012-03-26
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Sync with 1.7.9.5Junio C Hamano2012-03-26
|\ \ \ \ \ \ | | |_|/ / / | |/| | | |
| * | | | | Git 1.7.9.5v1.7.9.5Junio C Hamano2012-03-26
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | Merge branch 'jn/maint-fast-import-empty-ls' into maintJunio C Hamano2012-03-26
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * \ \ \ \ \ Merge branch 'ph/rerere-doc' into maintJunio C Hamano2012-03-26
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ph/rerere-doc: rerere: Document 'rerere remaining'
| * \ \ \ \ \ \ Merge branch 'ms/maint-config-error-at-eol-linecount' into maintJunio C Hamano2012-03-26
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ms/maint-config-error-at-eol-linecount: config: report errors at the EOL with correct line number
| * | | | | | | | grep doc: add --break / --heading / -W to synopsisMark Lodato2012-03-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | | Documentation: improve description of GIT_EDITOR and preference orderRodrigo Silva (MestreLion)2012-03-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | | documentation: fix alphabetic ordered list for git-rebase man pageNelson Benitez Leon2012-03-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | | Merge gitk changes from Paul Mackerras at git://ozlabs.org/~paulus/gitkJunio C Hamano2012-03-24
|\ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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