Commit graph

5775 commits

Author SHA1 Message Date
Stefan Naewe db85b3a74f t3200: add test case for 'branch -m'
Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-02 12:36:56 -07:00
Junio C Hamano 79eec363d2 Sync with 1.7.7.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-01 16:43:50 -07:00
Junio C Hamano 60a31eccca Merge branch 'rs/maint-estimate-cache-size' into maint
* rs/maint-estimate-cache-size:
  t7511: avoid use of reserved filename on Windows.
2011-11-01 16:41:41 -07:00
Junio C Hamano a4fdd79f13 Merge branch 'bc/attr-ignore-case' into maint
* 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:
	remote.c
2011-11-01 15:54:46 -07:00
Junio C Hamano ffa4c364f4 Merge branch 'cn/fetch-prune' into maint
* 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
2011-11-01 15:51:01 -07:00
Junio C Hamano b919f8404a Merge branch 'ss/blame-textconv-fake-working-tree'
* ss/blame-textconv-fake-working-tree:
  (squash) test for previous
  blame.c: Properly initialize strbuf after calling, textconv_object()

Conflicts:
	t/t8006-blame-textconv.sh
2011-11-01 15:20:28 -07:00
Junio C Hamano 7406aa203f Merge branch 'ef/mingw-upload-archive'
* ef/mingw-upload-archive:
  mingw: poll.h is no longer in sys/
  upload-archive: use start_command instead of fork
  compat/win32/poll.c: upgrade from upstream
  mingw: move poll out of sys-folder
2011-11-01 15:20:22 -07:00
Pat Thoyts b323c6451d t7511: avoid use of reserved filename on Windows.
PRN is a special filename on Windows to send data to the printer. As
this is generated during test 3 substitute an alternate prefix to avoid this.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-31 12:31:42 -07:00
Erik Faye-Lund c09cd77ea2 upload-archive: use start_command instead of fork
The POSIX-function fork is not supported on Windows. Use our
start_command API instead.

As this is the last call-site that depends on the fork-stub in
compat/mingw.h, remove that as well.

Add an undocumented flag to git-archive that tells it that the
action originated from a remote, so features can be disabled.
Thanks to Jeff King for work on this part.

Remove the NOT_MINGW-prereq for t5000, as git-archive --remote
now works.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-30 18:45:21 -07:00
Junio C Hamano 55e7c0aaa1 (squash) test for previous
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-28 09:36:55 -07:00
Junio C Hamano 82bc9f515c Merge branch 'maint'
* maint:
  clone: Quote user supplied path in a single quote pair
  read-cache.c: fix index memory allocation
2011-10-27 12:03:37 -07:00
Junio C Hamano a76a326b2a Merge branch 'rs/maint-estimate-cache-size' into maint
* rs/maint-estimate-cache-size:
  read-cache.c: fix index memory allocation
2011-10-27 12:03:16 -07:00
Junio C Hamano 208a1cc3d3 Merge branch 'lh/gitweb-site-html-head'
* lh/gitweb-site-html-head:
  gitweb: provide a way to customize html headers
2011-10-26 16:16:31 -07:00
Junio C Hamano 3b6a5d2d05 Merge branch 'jn/libperl-git-config'
* jn/libperl-git-config:
  Add simple test for Git::config_path() in t/t9700-perl-git.sh
  libperl-git: refactor Git::config_*
2011-10-26 16:16:30 -07:00
Junio C Hamano 9c0c09f791 Merge branch 'cn/fetch-prune'
* 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-26 16:16:29 -07:00
Junio C Hamano f0911b996c Merge branch 'maint-1.7.6' into maint
* 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-26 16:13:27 -07:00
Junio C Hamano 87d99c64df Merge branch 'jm/mergetool-pathspec' into maint-1.7.6
* jm/mergetool-pathspec:
  mergetool: no longer need to save standard input
  mergetool: Use args as pathspec to unmerged files
2011-10-26 16:12:25 -07:00
Junio C Hamano 716b64a73e Merge branch 'mz/remote-rename' into maint-1.7.6
* 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-26 16:12:19 -07:00
Junio C Hamano 8371e91463 Merge branch 'rj/maint-t9159-svn-rev-notation' into maint-1.7.6
* rj/maint-t9159-svn-rev-notation:
  t9159-*.sh: skip for mergeinfo test for svn <= 1.4
2011-10-26 16:12:13 -07:00
Junio C Hamano 1f7a2abcc1 Merge branch 'hl/iso8601-more-zone-formats' into maint-1.7.6
* hl/iso8601-more-zone-formats:
  date.c: Support iso8601 timezone formats
2011-10-26 16:11:28 -07:00
Junio C Hamano 411e6cf197 Merge branch 'maint-1.7.6' into maint
* 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-26 16:09:28 -07:00
Junio C Hamano df9701e28c Merge branch 'mg/maint-doc-sparse-checkout' into maint-1.7.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-26 16:09:03 -07:00
René Scharfe 8f41c07f90 read-cache.c: fix index memory allocation
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-26 14:35:16 -07:00
Junio C Hamano 5a4fcc28e1 Merge branch 'pw/p4-update'
* 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-21 16:04:33 -07:00
Junio C Hamano 1ad4b17b06 Merge branch 'sc/difftool-skip'
* sc/difftool-skip:
  t7800: avoid arithmetic expansion notation
  git-difftool: allow skipping file by typing 'n' at prompt
2011-10-21 16:04:32 -07:00
Junio C Hamano afd6284a7f Merge branch 'ph/transport-with-gitfile'
* 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-21 16:04:32 -07:00
Jakub Narebski cb9c9df37a Add simple test for Git::config_path() in t/t9700-perl-git.sh
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-21 14:34:08 -07:00
Junio C Hamano cec3e186f7 Merge branch 'jm/maint-apply-detects-corrupt-patch-header' into maint
* jm/maint-apply-detects-corrupt-patch-header:
  fix "git apply --index ..." not to deref NULL
2011-10-21 10:49:24 -07:00
Junio C Hamano df6840855d Merge branch 'jc/checkout-from-tree-keep-local-changes' into maint
* jc/checkout-from-tree-keep-local-changes:
  checkout $tree $path: do not clobber local changes in $path not in $tree
2011-10-21 10:49:24 -07:00
Junio C Hamano 634b29d270 Merge branch 'mm/maint-config-explicit-bool-display' into maint
* mm/maint-config-explicit-bool-display:
  config: display key_delim for config --bool --get-regexp
2011-10-21 10:49:24 -07:00
Lénaïc Huard c1355b7ffb gitweb: provide a way to customize html headers
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-21 10:18:37 -07:00
Jeff King 6cf53d7df6 tests: add missing executable bits
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-20 16:52:28 -07:00
Brandon Casey 40d6987d24 t/t3000-ls-files-others.sh: use $SHELL_PATH to run git-new-workdir script
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-19 10:50:18 -07:00
Junio C Hamano 3dfbe68fc2 Merge branch 'js/merge-edit-option'
* js/merge-edit-option:
  Teach merge the '[-e|--edit]' option

Conflicts:
	builtin/merge.c
2011-10-19 10:49:27 -07:00
Junio C Hamano 9b55aa03da Merge branch 'rs/diff-whole-function'
* rs/diff-whole-function:
  diff: add option to show whole functions as context
  xdiff: factor out get_func_line()
2011-10-19 10:49:13 -07:00
Junio C Hamano 541b9cf146 Merge branch 'js/no-cherry-pick-head-after-punted'
* 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-19 10:49:05 -07:00
Junio C Hamano 2201cc8c97 Merge branch 'bk/submodule-in-recursive-merge'
* bk/submodule-in-recursive-merge:
  submodule: Search for merges only at end of recursive merge
  submodule: Demonstrate known breakage during recursive merge
2011-10-19 10:48:38 -07:00
Junio C Hamano c31b87d111 Merge branch 'jm/maint-apply-detects-corrupt-patch-header'
* jm/maint-apply-detects-corrupt-patch-header:
  fix "git apply --index ..." not to deref NULL
2011-10-19 10:48:29 -07:00
Junio C Hamano e283548b85 Merge branch 'jk/config-test-cleanup'
* jk/config-test-cleanup:
  t1300: attempting to remove a non-existent .git/config is not an error
2011-10-19 10:47:59 -07:00
Johannes Sixt 795290e528 t1300: attempting to remove a non-existent .git/config is not an error
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-19 10:11:42 -07:00
Junio C Hamano 43a3b0284f Merge branch 'cb/httpd-test-fix-port'
* cb/httpd-test-fix-port:
  use test number as port number
2011-10-18 21:59:11 -07:00
Junio C Hamano 578183bcb0 Merge branch 'pt/mingw-misc-fixes'
* 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-18 21:59:11 -07:00
Junio C Hamano 963838402a Merge branch 'jk/http-auth'
* 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-17 21:37:15 -07:00
Junio C Hamano 7f8a9387fd Merge branch 'js/check-ref-format-test-mingw'
* js/check-ref-format-test-mingw:
  t1402-check-ref-format: skip tests of refs beginning with slash on Windows
2011-10-17 21:37:15 -07:00
Junio C Hamano 0c762702a0 Merge branch 'jk/config-test-cleanup'
* jk/config-test-cleanup:
  t1300: test mixed-case variable retrieval
  t1300: put git invocations inside test function
2011-10-17 21:37:14 -07:00
Junio C Hamano a200dc8e62 Merge branch 'bc/attr-ignore-case'
* 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-17 21:37:14 -07:00
Junio C Hamano e22bb14d80 Merge branch 'mm/maint-config-explicit-bool-display'
* mm/maint-config-explicit-bool-display:
  config: display key_delim for config --bool --get-regexp
2011-10-17 21:37:12 -07:00
Junio C Hamano cdc2b2f32c Merge branch 'ph/push-to-delete-nothing'
* 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-17 21:37:10 -07:00
Junio C Hamano 66d2c22f41 Merge branch 'jc/checkout-from-tree-keep-local-changes'
* jc/checkout-from-tree-keep-local-changes:
  checkout $tree $path: do not clobber local changes in $path not in $tree
2011-10-17 21:37:09 -07:00
Luke Diamand 6de040df56 git-p4: handle files with shell metacharacters
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-17 20:46:49 -07:00