summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-09-11refs.c: make create_cached_refs() staticLibravatar Junio C Hamano1-1/+1
There is nobody outside that calls into this helper function. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-14Retain caches of submodule refsLibravatar Michael Haggerty1-13/+21
Instead of keeping track of one cache for refs in the main repo and another single cache shared among submodules, keep a linked list of cached_refs objects, one for each module/submodule. Change invalidate_cached_refs() to invalidate all caches. (Previously, it only invalidated the cache of the main repo because the submodule caches were not reused anyway.) Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-14Store the submodule name in struct cached_refsLibravatar Michael Haggerty1-4/+11
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-14Allocate cached_refs objects dynamicallyLibravatar Michael Haggerty1-7/+21
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-14Change the signature of read_packed_refs()Libravatar Michael Haggerty1-7/+7
Change it to return a (struct ref_list *) instead of writing into a cached_refs structure. (This removes the need to create a cached_refs structure in resolve_gitlink_packed_ref(), where it is otherwise unneeded.) Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-14Access reference caches only through new function get_cached_refs()Libravatar Michael Haggerty1-22/+32
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-14Extract a function clear_cached_refs()Libravatar Michael Haggerty1-3/+6
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-11Update draft release notes to 1.7.7Libravatar Junio C Hamano1-3/+36
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-11Merge branch 'cb/partial-commit-relative-pathspec'Libravatar Junio C Hamano4-38/+39
* cb/partial-commit-relative-pathspec: commit: allow partial commits with relative paths
2011-08-11Merge branch 'jk/fast-export-quote-path'Libravatar Junio C Hamano2-8/+51
* jk/fast-export-quote-path: fast-export: quote paths in output
2011-08-11Merge branch 'rc/maint-http-wrong-free'Libravatar Junio C Hamano2-9/+5
* rc/maint-http-wrong-free: Makefile: some changes for http-related flag documentation http.c: fix an invalid free() Conflicts: Makefile
2011-08-11Merge branch 'rs/grep-function-context'Libravatar Junio C Hamano5-23/+67
* rs/grep-function-context: grep: long context options grep: add option to show whole function as context
2011-08-11Merge branch 'ef/ipv4-connect-error-report'Libravatar Junio C Hamano1-13/+10
* ef/ipv4-connect-error-report: connect: only log if all attempts failed (ipv4)
2011-08-08Merge branch 'oa/pull-reflog'Libravatar Junio C Hamano1-1/+1
* oa/pull-reflog: pull: remove extra space from reflog message Conflicts: git-pull.sh
2011-08-08Merge branch 'ms/reflog-show-is-default'Libravatar Junio C Hamano1-2/+1
* ms/reflog-show-is-default: reflog: actually default to subcommand 'show'
2011-08-08Merge branch 'jl/submodule-status-summary-doc'Libravatar Junio C Hamano1-12/+26
* jl/submodule-status-summary-doc: Documentation/submodule: add command references and update options
2011-08-08Merge branch 'jn/gitweb-config-list-case'Libravatar Junio C Hamano1-0/+7
* jn/gitweb-config-list-case: gitweb: Git config keys are case insensitive, make config search too
2011-08-08Merge branch 'jl/submodule-update-quiet'Libravatar Junio C Hamano2-4/+11
* jl/submodule-update-quiet: submodule: update and add must honor --quiet flag
2011-08-08Merge branch 'js/ls-tree-error'Libravatar Junio C Hamano2-3/+25
* js/ls-tree-error: Ensure git ls-tree exits with a non-zero exit code if read_tree_recursive fails. Add a test to check that git ls-tree sets non-zero exit code on error.
2011-08-08Merge branch 'jn/gitweb-system-config'Libravatar Junio C Hamano4-7/+53
* jn/gitweb-system-config: gitweb: Introduce common system-wide settings for convenience
2011-08-08Merge branch 'jk/reset-reflog-message-fix'Libravatar Junio C Hamano2-37/+20
* jk/reset-reflog-message-fix: reset: give better reflog messages
2011-08-08Merge branch 'jc/diff-index-refactor'Libravatar Junio C Hamano1-52/+19
* jc/diff-index-refactor: diff-lib: refactor run_diff_index() and do_diff_cache() diff-lib: simplify do_diff_cache()
2011-08-08Merge branch 'maint'Libravatar Junio C Hamano3-1/+3
* maint: filter-branch: Export variable `workdir' for --commit-filter Documentation/Makefile: add *.pdf to `clean' target Documentation: ignore *.pdf files
2011-08-08filter-branch: Export variable `workdir' for --commit-filterLibravatar Michael Witten1-1/+1
According to `git help filter-branch': --commit-filter <command> ... You can use the _map_ convenience function in this filter, and other convenience functions, too... ... However, it turns out that `map' hasn't been usable because it depends on the variable `workdir', which is not propogated to the environment of the shell that runs the commit-filter <command> because the shell is created via a simple-command rather than a compound-command subshell: @SHELL_PATH@ -c "$filter_commit" "git commit-tree" \ $(git write-tree) $parentstr < ../message > ../map/$commit || die "could not write rewritten commit" One solution is simply to export `workdir'. However, it seems rather heavy-handed to export `workdir' to the environments of all commands, so instead this commit exports `workdir' for only the duration of the shell command in question: workdir=$workdir @SHELL_PATH@ -c "$filter_commit" "git commit-tree" \ $(git write-tree) $parentstr < ../message > ../map/$commit || die "could not write rewritten commit" Signed-off-by: Michael Witten <mfwitten@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-08Documentation/Makefile: add *.pdf to `clean' targetLibravatar Emilio G. Cota1-0/+1
user-manual.pdf is not removed by `make clean'; fix it. Signed-off-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-08Documentation: ignore *.pdf filesLibravatar Emilio G. Cota1-0/+1
user-manual.pdf is generated by the build and therefore should be ignored by git. Signed-off-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-05fast-export: quote paths in outputLibravatar Jeff King2-8/+51
Many pathnames in a fast-import stream need to be quoted. In particular: 1. Pathnames at the end of an "M" or "D" line need quoting if they contain a LF or start with double-quote. 2. Pathnames on a "C" or "R" line need quoting as above, but also if they contain spaces. For (1), we weren't quoting at all. For (2), we put double-quotes around the paths to handle spaces, but ignored the possibility that they would need further quoting. This patch checks whether each pathname needs c-style quoting, and uses it. This is slightly overkill for (1), which doesn't actually need to quote many characters that vanilla c-style quoting does. However, it shouldn't hurt, as any implementation needs to be ready to handle quoted strings anyway. In addition to adding a test, we have to tweak a test which blindly assumed that case (2) would always use double-quotes, whether it needed to or not. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-05Merge branch 'tc/minix'Libravatar Junio C Hamano1-1/+29
* tc/minix: Makefile: add Minix configuration options.
2011-08-05Merge branch 'jc/pack-order-tweak'Libravatar Junio C Hamano5-1/+165
* jc/pack-order-tweak: pack-objects: optimize "recency order" core: log offset pack data accesses happened
2011-08-04docs: put listed example commands in backticksLibravatar Jeff King13-66/+66
Many examples of git command invocation are given in asciidoc listing blocks, which makes them monospaced and avoids further interpretation of special characters. Some manpages make a list of examples, like: git foo:: Run git foo. git foo -q:: Use the "-q" option. to quickly show many variants. However, they can sometimes be hard to read, because they are shown in a proportional-width font (so, for example, seeing the difference between "-- foo" and "--foo" can be difficult). This patch puts all such examples into backticks, which gives the equivalent formatting to a listing block (i.e., monospaced and without character interpretation). As a bonus, this also fixes an example in the git-push manpage, in which "git push origin :::" was accidentally considered a newly-indented list, and not a list item with "git push origin :" in it. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04gitweb: pass string after encoding in utf-8 to syntax highlighterLibravatar 张忠山1-1/+1
Otherwise the highlight filter would work on a corrupt byte sequence. Signed-off-by: 张忠山 <zzs213@126.com> Acked-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04Add option hooks.diffopts to customize change summary in post-receive-emailLibravatar Jon Jensen1-1/+8
This makes it easy to customize the git diff-tree options, for example to include -p to include inline diffs. It defaults to the current options "--stat --summary --find-copies-harder" and thus is backward-compatible. Signed-off-by: Jon Jensen <jon@endpoint.com> Improved-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-03Merge branch 'maint'Libravatar Junio C Hamano2-11/+16
* maint: add gitignore entry to description about how to write a builtin gitattributes: Reword "attribute macro" to "macro attribute" gitattributes: Clarify discussion of attribute macros
2011-08-03add gitignore entry to description about how to write a builtinLibravatar Heiko Voigt1-0/+2
If the author forgets the gitignore entry the built result will show up as new file in the git working directory. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-03Makefile: some changes for http-related flag documentationLibravatar Tay Ray Chuan1-3/+3
Rename git-http-pull to git-http-fetch. This was passed over in 215a7ad (Big tool rename, Wed Sep 7 17:26:23 2005 -0700). Also, distinguish between dumb and smart in flag docs, as the "warnings" in NO_CURL and NO_EXPACT are no longer accurate given the introduction of smart http(s). Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-03http.c: fix an invalid free()Libravatar Tay Ray Chuan1-6/+2
Remove a free() on the static buffer returned by sha1_file_name(). While we're at it, replace xmalloc() calls on the structs http_(object|pack)_request with xcalloc() so that pointers in the structs get initialized to NULL. That way, free()'s are safe - for example, a free() on the url string member when aborting. This fixes an invalid free(). Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Helped-by: Jeff King peff@peff.net Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-03gitattributes: Reword "attribute macro" to "macro attribute"Libravatar Michael Haggerty1-9/+9
The new wording makes it clearer that such a beast is an attribute in addition to being a macro (as opposed to being only a macro that is used for attributes). Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-03gitattributes: Clarify discussion of attribute macrosLibravatar Michael Haggerty1-5/+8
In particular, make it clear that attribute macros are themselves recorded as attributes in addition to setting other attributes. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-03Skip archive --remote tests on WindowsLibravatar Johannes Sixt1-4/+4
These depend on a working git-upload-archive, which is broken on Windows, because it depends on fork(). Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-02commit: allow partial commits with relative pathsLibravatar Clemens Buchacher4-38/+39
In order to do partial commits, git-commit overlays a tree on the cache and checks pathspecs against the result. Currently, the overlaying is done using "prefix" which prevents relative pathspecs with ".." and absolute pathspec from matching when they refer to files not under "prefix" and absent from the index, but still in the tree (i.e. files staged for removal). The point of providing a prefix at all is performance optimization. If we say there is no common prefix for the files of interest, then we have to read the entire tree into the index. But even if we cannot use the working directory as a prefix, we can still figure out if there is a common prefix for all given paths, and use that instead. The pathspec_prefix() routine from ls-files.c does exactly that. Any use of global variables is removed from pathspec_prefix() so that it can be called from commit.c. Reported-by: Reuben Thomas <rrt@sc3d.org> Analyzed-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-01grep: long context optionsLibravatar René Scharfe2-13/+21
Take long option names for -A (--after-context), -B (--before-context) and -C (--context) from GNU grep and add a similar long option name for -W (--function-context). Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-01grep: add option to show whole function as contextLibravatar René Scharfe5-11/+47
Add a new option, -W, to show the whole surrounding function of a match. It uses the same regular expressions as -p and diff to find the beginning of sections. Currently it will not display comments in front of a function, but those that are following one. Despite this shortcoming it is already useful, e.g. to simply see a more complete applicable context or to extract whole functions. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-01pull: remove extra space from reflog messageLibravatar Ori Avtalion1-1/+1
When executing "git pull" with no arguments, the reflog message was: "pull : Fast-forward" Signed-off-by: Ori Avtalion <ori@avtalion.name> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-01Documentation/submodule: add command references and update optionsLibravatar Jens Lehmann1-12/+26
Reference the "git diff" and "git status" commands where they learned functionality that in earlier git versions was only available through the 'summary' and 'status' subcommands of "git submodule". The short option '-n' for '--summary-limit' was missing from the synopsis and the --init option was missing from the "options" section, add those there. And while at it, quote all options in backticks so they are decorated properly in the output formats which support that. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-01Merge branch 'vi/make-test-vector-less-specific'Libravatar Junio C Hamano8-13/+13
* vi/make-test-vector-less-specific: tests: cleanup binary test vector files
2011-08-01Merge branch 'jk/clone-detached'Libravatar Junio C Hamano4-6/+88
* jk/clone-detached: clone: always fetch remote HEAD make copy_ref globally available consider only branches in guess_remote_head t: add tests for cloning remotes with detached HEAD
2011-08-01Merge branch 'jc/streaming-filter'Libravatar Junio C Hamano1-1/+3
* jc/streaming-filter: streaming: free git_istream upon closing
2011-08-01Merge branch 'sr/transport-helper-fix'Libravatar Junio C Hamano15-187/+475
* sr/transport-helper-fix: (21 commits) transport-helper: die early on encountering deleted refs transport-helper: implement marks location as capability transport-helper: Use capname for refspec capability too transport-helper: change import semantics transport-helper: update ref status after push with export transport-helper: use the new done feature where possible transport-helper: check status code of finish_command transport-helper: factor out push_update_refs_status fast-export: support done feature fast-import: introduce 'done' command git-remote-testgit: fix error handling git-remote-testgit: only push for non-local repositories remote-curl: accept empty line as terminator remote-helpers: export GIT_DIR variable to helpers git_remote_helpers: push all refs during a non-local export transport-helper: don't feed bogus refs to export push git-remote-testgit: import non-HEAD refs t5800: document some non-functional parts of remote helpers t5800: use skip_all instead of prereq t5800: factor out some ref tests ...
2011-08-01Merge branch 'jc/maint-reset-unmerged-path'Libravatar Junio C Hamano3-2/+18
* jc/maint-reset-unmerged-path: reset [<commit>] paths...: do not mishandle unmerged paths
2011-08-01Merge branch 'maint'Libravatar Junio C Hamano1-1/+1
* maint: connect: correctly number ipv6 network adapter