summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2011-10-31t9500: Add test for handling incomplete lines in diff by gitwebLibravatar Jakub Narebski1-0/+47
Check that "commitdiff" action in gitweb can handle (without errors) incomplete lines as added and removed lines, and as context lines. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-27Merge branch 'maint'Libravatar Junio C Hamano1-0/+50
* maint: clone: Quote user supplied path in a single quote pair read-cache.c: fix index memory allocation
2011-10-27Merge branch 'rs/maint-estimate-cache-size' into maintLibravatar Junio C Hamano1-0/+50
* rs/maint-estimate-cache-size: read-cache.c: fix index memory allocation
2011-10-26Merge branch 'lh/gitweb-site-html-head'Libravatar Junio C Hamano1-0/+1
* lh/gitweb-site-html-head: gitweb: provide a way to customize html headers
2011-10-26Merge branch 'jn/libperl-git-config'Libravatar Junio C Hamano2-1/+9
* jn/libperl-git-config: Add simple test for Git::config_path() in t/t9700-perl-git.sh libperl-git: refactor Git::config_*
2011-10-26Merge branch 'cn/fetch-prune'Libravatar Junio C Hamano1-0/+50
* cn/fetch-prune: fetch: treat --tags like refs/tags/*:refs/tags/* when pruning fetch: honor the user-provided refspecs when pruning refs remote: separate out the remote_find_tracking logic into query_refspecs t5510: add tests for fetch --prune fetch: free all the additional refspecs Conflicts: remote.c
2011-10-26Merge branch 'maint-1.7.6' into maintLibravatar Junio C Hamano4-18/+85
* maint-1.7.6: notes_merge_commit(): do not pass temporary buffer to other function gitweb: Fix links to lines in blobs when javascript-actions are enabled mergetool: no longer need to save standard input mergetool: Use args as pathspec to unmerged files t9159-*.sh: skip for mergeinfo test for svn <= 1.4 date.c: Support iso8601 timezone formats remote: only update remote-tracking branch if updating refspec remote rename: warn when refspec was not updated remote: "rename o foo" should not rename ref "origin/bar" remote: write correct fetch spec when renaming remote 'remote'
2011-10-26Merge branch 'jm/mergetool-pathspec' into maint-1.7.6Libravatar Junio C Hamano1-18/+40
* jm/mergetool-pathspec: mergetool: no longer need to save standard input mergetool: Use args as pathspec to unmerged files
2011-10-26Merge branch 'mz/remote-rename' into maint-1.7.6Libravatar Junio C Hamano1-0/+31
* mz/remote-rename: remote: only update remote-tracking branch if updating refspec remote rename: warn when refspec was not updated remote: "rename o foo" should not rename ref "origin/bar" remote: write correct fetch spec when renaming remote 'remote'
2011-10-26Merge branch 'rj/maint-t9159-svn-rev-notation' into maint-1.7.6Libravatar Junio C Hamano1-0/+8
* rj/maint-t9159-svn-rev-notation: t9159-*.sh: skip for mergeinfo test for svn <= 1.4
2011-10-26Merge branch 'hl/iso8601-more-zone-formats' into maint-1.7.6Libravatar Junio C Hamano1-0/+6
* hl/iso8601-more-zone-formats: date.c: Support iso8601 timezone formats
2011-10-26Merge branch 'maint-1.7.6' into maintLibravatar Junio C Hamano2-0/+6
* maint-1.7.6: make the sample pre-commit hook script reject names with newlines, too git-read-tree.txt: update sparse checkout examples git-read-tree.txt: correct sparse-checkout and skip-worktree description git-read-tree.txt: language and typography fixes unpack-trees: print "Aborting" to stderr Documentation/git-update-index: refer to 'ls-files' Documentation: basic configuration of notes.rewriteRef
2011-10-26Merge branch 'mg/maint-doc-sparse-checkout' into maint-1.7.6Libravatar Junio C Hamano2-0/+6
* mg/maint-doc-sparse-checkout: git-read-tree.txt: correct sparse-checkout and skip-worktree description git-read-tree.txt: language and typography fixes unpack-trees: print "Aborting" to stderr
2011-10-26read-cache.c: fix index memory allocationLibravatar René Scharfe1-0/+50
estimate_cache_size() tries to guess how much memory is needed for the in-memory representation of an index file. It does that by using the file size, the number of entries and the difference of the sizes of the on-disk and in-memory structs -- without having to check the length of the name of each entry, which varies for each entry, but their sums are the same no matter the representation. Except there can be a difference. First of all, the size is really calculated by ce_size and ondisk_ce_size based on offsetof(..., name), not sizeof, which can be different. And entries are padded with 1 to 8 NULs at the end (after the variable name) to make their total length a multiple of eight. So in order to allocate enough memory to hold the index, change the delta calculation to be based on offsetof(..., name) and round up to the next multiple of eight. On a 32-bit Linux, this delta was used before: sizeof(struct cache_entry) == 72 sizeof(struct ondisk_cache_entry) == 64 --- 8 The actual difference for an entry with a filename length of one was, however (find the definitions are in cache.h): offsetof(struct cache_entry, name) == 72 offsetof(struct ondisk_cache_entry, name) == 62 ce_size == (72 + 1 + 8) & ~7 == 80 ondisk_ce_size == (62 + 1 + 8) & ~7 == 64 --- 16 So eight bytes less had been allocated for such entries. The new formula yields the correct delta: (72 - 62 + 7) & ~7 == 16 Reported-by: John Hsing <tsyj2007@gmail.com> Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-21Merge branch 'pw/p4-update'Libravatar Junio C Hamano5-324/+731
* pw/p4-update: git-p4: handle files with shell metacharacters git-p4: keyword flattening fixes git-p4: stop ignoring apple filetype git-p4: recognize all p4 filetypes git-p4: handle utf16 filetype properly git-p4 tests: refactor and cleanup
2011-10-21Merge branch 'sc/difftool-skip'Libravatar Junio C Hamano1-1/+42
* sc/difftool-skip: t7800: avoid arithmetic expansion notation git-difftool: allow skipping file by typing 'n' at prompt
2011-10-21Merge branch 'ph/transport-with-gitfile'Libravatar Junio C Hamano1-0/+14
* ph/transport-with-gitfile: Fix is_gitfile() for files too small or larger than PATH_MAX to be a gitfile Add test showing git-fetch groks gitfiles Teach transport about the gitfile mechanism Learn to handle gitfiles in enter_repo enter_repo: do not modify input
2011-10-21Add simple test for Git::config_path() in t/t9700-perl-git.shLibravatar Jakub Narebski2-1/+9
Tests "~/foo" path expansion and multiple values. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-21Merge branch 'jm/maint-apply-detects-corrupt-patch-header' into maintLibravatar Junio C Hamano1-0/+43
* jm/maint-apply-detects-corrupt-patch-header: fix "git apply --index ..." not to deref NULL
2011-10-21Merge branch 'jc/checkout-from-tree-keep-local-changes' into maintLibravatar Junio C Hamano1-0/+42
* jc/checkout-from-tree-keep-local-changes: checkout $tree $path: do not clobber local changes in $path not in $tree
2011-10-21Merge branch 'mm/maint-config-explicit-bool-display' into maintLibravatar Junio C Hamano1-0/+6
* mm/maint-config-explicit-bool-display: config: display key_delim for config --bool --get-regexp
2011-10-21gitweb: provide a way to customize html headersLibravatar Lénaïc Huard1-0/+1
This allows web sites to add some specific html headers to the pages generated by gitweb. The new variable $site_html_head_string can be set to an html snippet that will be inserted at the end of the <head> section of each page generated by gitweb. Signed-off-by: Lénaïc Huard <lenaic@lhuard.fr.eu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-20tests: add missing executable bitsLibravatar Jeff King2-0/+0
Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-19t/t3000-ls-files-others.sh: use $SHELL_PATH to run git-new-workdir scriptLibravatar Brandon Casey1-1/+1
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-19Merge branch 'js/merge-edit-option'Libravatar Junio C Hamano1-0/+23
* js/merge-edit-option: Teach merge the '[-e|--edit]' option Conflicts: builtin/merge.c
2011-10-19Merge branch 'rs/diff-whole-function'Libravatar Junio C Hamano1-0/+92
* rs/diff-whole-function: diff: add option to show whole functions as context xdiff: factor out get_func_line()
2011-10-19Merge branch 'js/no-cherry-pick-head-after-punted'Libravatar Junio C Hamano1-0/+15
* js/no-cherry-pick-head-after-punted: cherry-pick: do not give irrelevant advice when cherry-pick punted revert.c: defer writing CHERRY_PICK_HEAD till it is safe to do so
2011-10-19Merge branch 'bk/submodule-in-recursive-merge'Libravatar Junio C Hamano1-0/+51
* bk/submodule-in-recursive-merge: submodule: Search for merges only at end of recursive merge submodule: Demonstrate known breakage during recursive merge
2011-10-19Merge branch 'jm/maint-apply-detects-corrupt-patch-header'Libravatar Junio C Hamano1-0/+43
* jm/maint-apply-detects-corrupt-patch-header: fix "git apply --index ..." not to deref NULL
2011-10-19Merge branch 'jk/config-test-cleanup'Libravatar Junio C Hamano1-12/+7
* jk/config-test-cleanup: t1300: attempting to remove a non-existent .git/config is not an error
2011-10-19t1300: attempting to remove a non-existent .git/config is not an errorLibravatar Johannes Sixt1-12/+7
Since some tests before test number 79 ("quoting") are skipped, .git/config does not exist and 'rm .git/config' fails. Fix this particular case. While at it, move other instance of 'rm .git/config' that occur in this file inside the test function to document that the test cases want to protect themselves from remnants of earlier tests. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-18Merge branch 'cb/httpd-test-fix-port'Libravatar Junio C Hamano1-1/+1
* cb/httpd-test-fix-port: use test number as port number
2011-10-18Merge branch 'pt/mingw-misc-fixes'Libravatar Junio C Hamano4-20/+18
* pt/mingw-misc-fixes: t9901: fix line-ending dependency on windows mingw: ensure sockets are initialized before calling gethostname mergetools: use the correct tool for Beyond Compare 3 on Windows t9300: do not run --cat-blob-fd related tests on MinGW git-svn: On MSYS, escape and quote SVN_SSH also if set by the user t9001: do not fail only due to CR/LF issues t1020: disable the pwd test on MinGW
2011-10-17Merge branch 'jk/http-auth'Libravatar Junio C Hamano2-8/+53
* jk/http-auth: http_init: accept separate URL parameter http: use hostname in credential description http: retry authentication failures for all http requests remote-curl: don't retry auth failures with dumb protocol improve httpd auth tests url: decode buffers that are not NUL-terminated
2011-10-17Merge branch 'js/check-ref-format-test-mingw'Libravatar Junio C Hamano1-36/+52
* js/check-ref-format-test-mingw: t1402-check-ref-format: skip tests of refs beginning with slash on Windows
2011-10-17Merge branch 'jk/config-test-cleanup'Libravatar Junio C Hamano1-83/+120
* jk/config-test-cleanup: t1300: test mixed-case variable retrieval t1300: put git invocations inside test function
2011-10-17Merge branch 'bc/attr-ignore-case'Libravatar Junio C Hamano1-1/+58
* bc/attr-ignore-case: attr.c: respect core.ignorecase when matching attribute patterns attr: read core.attributesfile from git_default_core_config builtin/mv.c: plug miniscule memory leak cleanup: use internal memory allocation wrapper functions everywhere attr.c: avoid inappropriate access to strbuf "buf" member Conflicts: transport-helper.c
2011-10-17Merge branch 'mm/maint-config-explicit-bool-display'Libravatar Junio C Hamano1-0/+6
* mm/maint-config-explicit-bool-display: config: display key_delim for config --bool --get-regexp
2011-10-17Merge branch 'ph/push-to-delete-nothing'Libravatar Junio C Hamano1-0/+197
* ph/push-to-delete-nothing: receive-pack: don't pass non-existent refs to post-{receive,update} hooks Conflicts: builtin/receive-pack.c
2011-10-17Merge branch 'jc/checkout-from-tree-keep-local-changes'Libravatar Junio C Hamano1-0/+42
* jc/checkout-from-tree-keep-local-changes: checkout $tree $path: do not clobber local changes in $path not in $tree
2011-10-17git-p4: handle files with shell metacharactersLibravatar Luke Diamand1-0/+64
git-p4 used to simply pass strings into system() and popen(), and relied on the shell doing the necessary expansion. This though meant that shell metacharacters in file names would be corrupted - for example files with $ or space in them. Switch to using subprocess.Popen() and friends, and pass in explicit arrays in the places where it matters. This then avoids needing shell expansion. Add trivial helper functions for some common perforce operations. Add test case. [pw: test cleanup] Signed-off-by: Luke Diamand <luke@diamand.org> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-17git-p4: handle utf16 filetype properlyLibravatar Pete Wyckoff1-0/+108
One of the filetypes that p4 supports is utf16. Its behavior is odd in this case. The data delivered through "p4 -G print" is not encoded in utf16, although "p4 print -o" will produce the proper utf16-encoded file. When dealing with this filetype, discard the data from -G, and instead read the contents directly. An alternate approach would be to try to encode the data in python. That worked for true utf16 files, but for other files marked as utf16, p4 delivers mangled text in no recognizable encoding. Add a test case to check utf16 handling, and +k and +ko handling. Reported-by: Chris Li <git@chrisli.org> Acked-by: Luke Diamand <luke@diamand.org> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-17git-p4 tests: refactor and cleanupLibravatar Pete Wyckoff3-324/+559
Introduce a library for functions that are common to multiple git-p4 test files. Be a bit more clever about starting and stopping p4d. Specify a unique port number for each test, so that tests can run in parallel. Start p4d not in daemon mode, and save the pid, to be able to kill it cleanly later. Never kill p4d at startup; always shutdown cleanly. Handle directory changes better. Always chdir inside a subshell, and remove any post-test directory changes. Clean up whitespace, and use test_cmp and test_must_fail more consistently. Separate the tests related to detecting p4 branches into their own file, and add a few more. Acked-by: Luke Diamand <luke@diamand.org> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-17use test number as port numberLibravatar Clemens Buchacher1-1/+1
Test 5550 was apparently using the default port number by mistake. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-17resolve_gitlink_packed_ref(): fix mismergeLibravatar Junio C Hamano1-0/+19
2c5c66b (Merge branch 'jp/get-ref-dir-unsorted', 2011-10-10) merged a topic that forked from the mainline before a new helper function get_packed_refs() refactored code to read packed-refs file. The merge made the call to the helper function with an incorrect argument. The parameter to the function has to be a path to the submodule. Fix the mismerge. Helped-by: Mark Levedahl <mlevedahl@gmail.com> Helped-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-16git svn dcommit: new option --interactive.Libravatar Frédéric Heitzmann1-0/+64
Allow the user to check the patch set before it is commited to SVN. It is then possible to accept/discard one patch, accept all, or quit. This interactive mode is similar with 'git send email' behaviour. However, 'git svn dcommit' returns as soon as one patch is discarded. Part of the code was taken from git-send-email.perl (see 'ask' function) Tests several combinations of potential answers to 'git svn dcommit --interactive'. For each of them, test whether patches were commited to SVN or not. Thanks-to Eric Wong <normalperson@yhbt.net> for the initial idea. Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Frédéric Heitzmann <frederic.heitzmann@gmail.com>
2011-10-15fetch: treat --tags like refs/tags/*:refs/tags/* when pruningLibravatar Carlos Martín Nieto1-2/+2
If --tags is specified, add that refspec to the list given to prune_refs so it knows to treat it as a filter on what refs to should consider for prunning. This way git fetch --prune --tags origin only prunes tags and doesn't delete the branch refs. Signed-off-by: Carlos Martín Nieto <cmn@elego.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-15fetch: honor the user-provided refspecs when pruning refsLibravatar Carlos Martín Nieto1-2/+2
If the user gave us refspecs on the command line, we should use those when deciding whether to prune a ref instead of relying on the refspecs in the config. Previously, running git fetch --prune origin refs/heads/master:refs/remotes/origin/master would delete every other ref under the origin namespace because we were using the refspec to filter the available refs but using the configured refspec to figure out if a ref had been deleted on the remote. This is clearly the wrong thing to do. Change prune_refs and get_stale_heads to simply accept a list of references and a list of refspecs. The caller of either function needs to decide what refspecs should be used to decide whether a ref is stale. Signed-off-by: Carlos Martín Nieto <cmn@elego.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-15http: use hostname in credential descriptionLibravatar Michael J Gruber1-2/+2
Until now, a request for an http password looked like: Username: Password: Now it will look like: Username for 'example.com': Password for 'example.com': Picked-from: Jeff King <peff@peff.net> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-15Merge branch 'bk/ancestry-path' into maintLibravatar Junio C Hamano1-0/+38
* bk/ancestry-path: t6019: avoid refname collision on case-insensitive systems revision: do not include sibling history in --ancestry-path output revision: keep track of the end-user input from the command line rev-list: Demonstrate breakage with --ancestry-path --all