Commit Graph

27296 Commits

Author SHA1 Message Date
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
Junio C Hamano
84a9ea90e1 Merge branch 'dm/pack-objects-update'
* dm/pack-objects-update:
  pack-objects: don't traverse objects unnecessarily
  pack-objects: rewrite add_descendants_to_write_order() iteratively
  pack-objects: use unsigned int for counter and offset values
  pack-objects: mark add_to_write_order() as inline
2011-11-01 15:20:07 -07:00
Junio C Hamano
c17f1a9117 Merge branch 'nd/pretty-commit-log-message'
* nd/pretty-commit-log-message:
  pretty.c: use original commit message if reencoding fails
  pretty.c: free get_header() return value
2011-11-01 15:20:03 -07:00
Ted Percival
0e7e30f560 svn: Quote repository root in regex match
Fixes a problem matching repository URLs, especially those with a '+' in
the URL, such as svn+ssh:// URLs. Parts of the URL were interpreted as
special characters by the regex matching.

Signed-off-by: Ted Percival <ted.percival@quest.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
2011-11-01 20:05:33 +00:00
Erik Faye-Lund
2d52ea93a7 mingw: poll.h is no longer in sys/
Earlier we moved this header file in the code but forgot to
update the Makefile that refers to it.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-01 10:02:11 -07:00
Vincent van Ravesteijn
439fbb8072 MSVC: Remove unneeded header stubs
These headers are no longer needed since they are no longer
unnecessarily included in git-compat-util.h.

Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
Acked-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-31 20:06:06 -07:00
Vincent van Ravesteijn
7b05949be0 Compile fix for MSVC: Include <io.h>
This include is needed for _commit(..) which is used in mingw.h.

Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
Acked-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-31 20:06:03 -07:00
Vincent van Ravesteijn
cfc755d30e Compile fix for MSVC: Do not include sys/resources.h
Do not include header files when compiling with MSVC that do not
exist and which are also not included when compiling with MINGW.
A direct consequence is that git can be compiled again with MSVC
because the missing "sys/resources.h" is no longer included.

Instead of current

	#ifndef mingw32 is the only one that is strange
        ... everything for systems that is not strange ...
        #else
        ... include mingw specific tweaks ...
        #endif
        #ifdef msvc is also strange
        ... include msvc specific tweaks ...
        #endif

it turns things around and says what it wants to achieve in a more direct
way, i.e.

	#if mingw32
        #include "compat/mingw.h"
	#elif msvc
        #include "compat/msvc.h"
	#else
        ... all the others ...
	#endif

which makes it a lot simpler.

Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
Helped-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-31 20:05:57 -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
Dejan Ribič
4198579b0a git-gui: fix spelling error in sshkey.tcl
Spelling error originally reported to Ubuntu as launchpad bug #879427.

Acked-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Dejan Ribič <dejan.ribic@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2011-10-31 08:58:18 +00:00
Junio C Hamano
be3fa9125e Git 1.7.8-rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-30 19:14:24 -07:00
Junio C Hamano
324bc2a7ee Merge branch 'jk/git-tricks'
* jk/git-tricks:
  completion: match ctags symbol names in grep patterns
  contrib: add git-jump script
  contrib: add diff highlight script
2011-10-30 19:13:13 -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
Erik Faye-Lund
f0bd664977 compat/win32/poll.c: upgrade from upstream
poll.c is updated from revision adc3a5b in
git://git.savannah.gnu.org/gnulib.git

The changes are applied with --whitespace=fix to reduce noise.

poll.h is not upgraded, because the most recent version now
contains template-stuff that breaks compilation for us.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-30 18:45:16 -07:00
Erik Faye-Lund
0f77dea9a8 mingw: move poll out of sys-folder
Both XSI and upstream Gnulib versions expects to find poll.h at
the root of some include path, not inside the sys-folder.

This helps us when upgrading Gnulib.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-30 18:44:28 -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
Sebastian Schuberth
2564aa48ce blame.c: Properly initialize strbuf after calling, textconv_object()
For a plain string where only the length is known, strbuf.alloc needs to
be initialized to the length. Otherwise strbuf.alloc is 0 and a later
call to strbuf_setlen() will fail.

This bug surfaced when calling git blame under Windows on a *.doc file.
The *.doc file is converted to plain text by antiword via the textconv
mechanism. However, the plain text returned by antiword contains DOS line
endings instead of Unix line endings which triggered the strbuf_setlen()
which previous to this patch failed.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-28 08:41:56 -07:00
Junio C Hamano
e8e1c29021 Update draft release notes to 1.7.8
Getting very close to -rc0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-27 12:06:44 -07:00
Junio C Hamano
4801546528 Merge branch 'sn/complete-bash-wo-process-subst'
* sn/complete-bash-wo-process-subst:
  completion: fix issue with process substitution not working on Git for Windows
2011-10-27 12:04:28 -07:00
Junio C Hamano
f124fe3061 Merge branch 'rj/gitweb-clean-js'
* rj/gitweb-clean-js:
  gitweb/Makefile: Remove static/gitweb.js in the clean target
2011-10-27 12:04:21 -07:00
Junio C Hamano
220c0453c1 Merge branch 'js/grep-mutex'
* js/grep-mutex:
  builtin/grep: simplify lock_and_read_sha1_file()
  builtin/grep: make lock/unlock into static inline functions
  git grep: be careful to use mutexes only when they are initialized
2011-10-27 12:04:02 -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
Richard Hartmann
8debf69638 clone: Quote user supplied path in a single quote pair
Without this patch,

    $ git clone foo .

results in this:

    Cloning into ....
    done.

With it:

    Cloning into '.'...
    done.

Signed-off-by: Richard Hartmann <richih.mailinglist@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-27 12:02:02 -07:00
Junio C Hamano
ea4f9685cb unpack_object_header_buffer(): clear the size field upon error
The callers do not use the returned size when the function says
it did not use any bytes and sets the type to OBJ_BAD, so this
should not matter in practice, but it is a good code hygiene
anyway.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-27 11:42:57 -07:00
Nguyễn Thái Ngọc Duy
9c6bebd142 tree_entry_interesting: make use of local pointer "item"
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-27 11:38:24 -07:00
Nguyễn Thái Ngọc Duy
d688cf07b1 tree_entry_interesting(): give meaningful names to return values
It is a basic code hygiene to avoid magic constants that are unnamed.
Besides, this helps extending the value later on for "interesting, but
cannot decide if the entry truely matches yet" (ie. prefix matches)

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-27 11:38:24 -07:00
Nguyễn Thái Ngọc Duy
02cb67530e read_directory_recursive: reduce one indentation level
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-27 11:27:57 -07:00
Junio C Hamano
5fb8c05f2e get_tree_entry(): do not call find_tree_entry() on an empty tree
We know we will find nothing.

This incidentally squelches false warning from gcc about potentially
uninitialized usage of t.entry fields. For an empty tree, it is true that
init_tree_desc() does not call decode_tree_entry() and the tree_desc is
left uninitialized, but find_tree_entry() only calls tree_entry_extract()
that uses the tree_desc while it has more things to read from the tree, so
the uninitialized t.entry fields are never used in such a case anyway.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-27 11:24:01 -07:00
Nguyễn Thái Ngọc Duy
0de1633783 tree-walk.c: do not leak internal structure in tree_entry_len()
tree_entry_len() does not simply take two random arguments and return
a tree length. The two pointers must point to a tree item structure,
or struct name_entry. Passing random pointers will return incorrect
value.

Force callers to pass struct name_entry instead of two pointers (with
hope that they don't manually construct struct name_entry themselves)

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-27 11:08:26 -07:00
Junio C Hamano
997a1946a5 Merge branch 'maint'
* maint:
  make the sample pre-commit hook script reject names with newlines, too
2011-10-26 16:24:55 -07:00
Junio C Hamano
425c771534 Update draft release notes to 1.7.8
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-26 16:23:26 -07:00
Junio C Hamano
0b26d1e8b2 Merge branch 'tc/submodule-clone-name-detection'
* tc/submodule-clone-name-detection:
  submodule::module_clone(): silence die() message from module_name()
  submodule: whitespace fix
2011-10-26 16:16:32 -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
2ef89f3856 Merge branch 'mm/mediawiki-author-fix'
* mm/mediawiki-author-fix:
  git-remote-mediawiki: don't include HTTP login/password in author
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
aface4c390 Merge branch 'jm/maint-gitweb-filter-forks-fix'
* jm/maint-gitweb-filter-forks-fix:
  gitweb: fix regression when filtering out forks
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
25f745fbec Merge branch 'jn/gitweb-highlite-sanitise' into maint
* jn/gitweb-highlite-sanitise:
  gitweb: Strip non-printable characters from syntax highlighter output
2011-10-26 16:13:31 -07:00
Junio C Hamano
60f60b4962 Merge branch 'jk/argv-array' into maint
* jk/argv-array:
  run_hook: use argv_array API
  checkout: use argv_array API
  bisect: use argv_array API
  quote: provide sq_dequote_to_argv_array
  refactor argv_array into generic code
  quote.h: fix bogus comment
  add sha1_array API docs
2011-10-26 16:13:31 -07:00
Junio C Hamano
7bb07f6fbf Merge branch 'jc/run-receive-hook-cleanup' into maint
* jc/run-receive-hook-cleanup:
  refactor run_receive_hook()
2011-10-26 16:13:31 -07:00
Junio C Hamano
a5ad8d1bdd Merge branch 'cn/eradicate-working-copy' into maint
* cn/eradicate-working-copy:
  Remove 'working copy' from the documentation and C code
2011-10-26 16:13:31 -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
8280baf565 Merge branch 'mh/maint-notes-merge-pathbuf-fix' into maint-1.7.6
* mh/maint-notes-merge-pathbuf-fix:
  notes_merge_commit(): do not pass temporary buffer to other function
2011-10-26 16:12:48 -07:00
Junio C Hamano
58f75bcf32 Merge branch 'ps/gitweb-js-with-lineno' into maint-1.7.6
* ps/gitweb-js-with-lineno:
  gitweb: Fix links to lines in blobs when javascript-actions are enabled
2011-10-26 16:12:35 -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