summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-09-18Add scripts to generate projects for other buildsystems (MSVC vcproj, QMake)Libravatar Marius Storm-Olsen8-1/+1503
These scripts generate projects for the MSVC IDE (.vcproj files) or QMake (.pro files), based on the output of a 'make -n MSVC=1 V=1' run. This enables us to simply do the necesarry changes in the Makefile, and you can update the other buildsystems by regenerating the files. Keeping the other buildsystems up-to-date with main development. The generator system is designed to easily drop in pm's for other buildsystems as well, if someone has an itch. However, the focus has been Windows development, so the 'engine' might need patches to support any platform. Also add some .gitignore entries for MSVC files. Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-18Add README for MSVC buildLibravatar Marius Storm-Olsen1-0/+39
Based on original README patch from Frank Li, describe the steps to build git with VS2008 (aka MSVC). Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-18Add MSVC to MakefileLibravatar Marius Storm-Olsen3-1/+128
Enable MSVC builds with GNU Make by simply calling make MSVC=1 (Debug build possible by adding DEBUG=1 as well) Two scripts, clink.pl and lib.pl, are used to convert certain GCC specific command line options into something MSVC understands. By building for MSVC with GNU Make, we can ensure that the MSVC port always follows the latest code, and does not lag behind due to unmaintained NMake Makefile or IDE projects. Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-18Define strncasecmp and ftruncate for MSVCLibravatar Marius Storm-Olsen1-0/+2
Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-18Make usage of windows.h lean and meanLibravatar Marius Storm-Olsen7-12/+13
Centralize the include of windows.h in git-compat-util.h, turn on WIN32_LEAN_AND_MEAN to avoid including plenty of other header files which is not needed in Git. Also ensure we load winsock2.h first, so we don't load the older winsock definitions at a later stage, since they contain duplicate definitions. When moving windows.h into git-compat-util.h, we need to protect the definition of struct pollfd in mingw.h, since this file is used by both MinGW and MSVC, and the latter defines this struct in winsock2.h. We need to keep the windows.h include in compat/win32.h, since its shared by both MinGW and Cygwin, and we're not touching Cygwin in this commit. The include in git-compat-util.h is protected with an ifdef WIN32, which is not the case when compiling for Cygwin. Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-18Add platform files for porting to MSVCLibravatar Frank Li3-0/+93
Add msvc.c and msvc.h to build git under MSVC. Signed-off-by: Frank Li <lznuaa@gmail.com> Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-18Add MinGW header files to build git with MSVCLibravatar Frank Li5-0/+256
Added the header files dirent.h, unistd.h and utime.h Add alloca.h, which simply includes malloc.h, which defines alloca(). Signed-off-by: Frank Li <lznuaa@gmail.com> Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-18Add empty header files for MSVC portLibravatar Marius Storm-Olsen14-0/+14
MSVC lacks many of the header files included by git-compat-util.h; add blank header files for these instead of going ifdef crazy. Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-18Test for WIN32 instead of __MINGW32_Libravatar Frank Li6-13/+15
The code which is conditional on MinGW32 is actually conditional on Windows. Use the WIN32 symbol, which is defined by the MINGW32 and MSVC environments, but not by Cygwin. Define SNPRINTF_SIZE_CORR=1 for MSVC too, as its vsnprintf function does not add NUL at the end of the buffer if the result fits the buffer size exactly. Signed-off-by: Frank Li <lznuaa@gmail.com> Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-18Fix __stdcall placement and function prototypeLibravatar Frank Li2-3/+3
MSVC requires __stdcall to be between the functions return value and the function name, and that the function pointer type is in the form of return_type (WINAPI *function_name)(arguments...) Signed-off-by: Frank Li <lznuaa@gmail.com> Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-18Set _O_BINARY as default fmode for both MinGW and MSVCLibravatar Marius Storm-Olsen2-2/+5
MinGW set the _CRT_fmode to set both the default fmode and _O_BINARY on stdin/stdout/stderr. Rather use the main() define in mingw.h to set this for both MinGW and MSVC. This will ensure that a MinGW and MSVC build will handle input and output identically. Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-18Change regerror() declaration from K&R style to ANSI C (C89)Libravatar Frank Li1-5/+2
The MSVC headers typedef errcode as int, and thus confused the compiler in the K&R style definition. ANSI style deconfuses it. Signed-off-by: Frank Li <lznuaa@gmail.com> Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-18Add include guards to compat/win32.hLibravatar Marius Storm-Olsen1-0/+5
Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-18Avoid declaration after statementLibravatar Frank Li3-5/+14
MSVC does not understand this C99 style. Signed-off-by: Frank Li <lznuaa@gmail.com> Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-18pack-objects: remove SP at the end of usage stringLibravatar Thiago Farina1-9/+9
These spaces immediately before the end of lines are unnecessary. While at it, instead of using a single string literal with backslashes at end of each line, split the lines into individual string literals and tell the compiler to concatenate them. Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-18Update the usage bundle string.Libravatar Thiago Farina1-3/+7
"git bundle -h" gives a single long line that is hard to read. Rewrite it into a multi-line format similar to the one used by other commands, e.g "git stash -h". Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-17cvs: initialize empty passwordLibravatar Clemens Buchacher1-0/+1
If we do not read a password from the command line, and there are no passwords stored in .cvspass, we have to initialize the password with just "A". This fixes a regression introduced by 3fb9d582 (Do not scramble password read from .cvspass). Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-16Merge 1.6.4.4 inLibravatar Junio C Hamano2-1/+28
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-16GIT 1.6.4.4Libravatar Junio C Hamano4-3/+30
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-16Merge branch 'jc/maint-unpack-objects-strict' into maintLibravatar Junio C Hamano2-7/+44
* jc/maint-unpack-objects-strict: Fix "unpack-objects --strict" Conflicts: builtin-unpack-objects.c
2009-09-16Merge branch 'tf/diff-whitespace-incomplete-line' into maintLibravatar Junio C Hamano1-33/+53
* tf/diff-whitespace-incomplete-line: xutils: Fix xdl_recmatch() on incomplete lines xutils: Fix hashing an incomplete line with whitespaces at the end
2009-09-16Merge branch 'jk/maint-1.6.3-checkout-unborn' into maintLibravatar Junio C Hamano2-9/+43
* jk/maint-1.6.3-checkout-unborn: checkout: do not imply "-f" on unborn branches
2009-09-16Merge branch 'jc/maint-checkout-index-to-prefix' into maintLibravatar Junio C Hamano3-5/+18
* jc/maint-checkout-index-to-prefix: check_path(): allow symlinked directories to checkout-index --prefix
2009-09-14Merge branch 'maint'Libravatar Junio C Hamano1-1/+1
* maint: http.c: avoid freeing an uninitialized pointer
2009-09-14Merge branch 'rc/maint-http-no-head-pack-check' into maintLibravatar Junio C Hamano1-1/+1
* rc/maint-http-no-head-pack-check: http.c: avoid freeing an uninitialized pointer
2009-09-14http.c: avoid freeing an uninitialized pointerLibravatar Junio C Hamano1-1/+1
An earlier 59b8d38 (http.c: remove verification of remote packs) left the variable "url" uninitialized; "goto cleanup" codepath can free it which is not very nice. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-14web--browse: fix Mac OS X GUI detection for 10.6Libravatar Heiko Voigt1-1/+2
Since OS X 10.6 the variable $SECURITYSESSIONID does not exist anymore, so lets look for the $TERM_PROGRAM variable as backup. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-14remove logical typo in documentation of sample update hookLibravatar Heiko Voigt1-1/+1
Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-14Nicolas Pitre has a new email addressLibravatar Nicolas Pitre6-5/+6
Due to problems at cam.org, my nico@cam.org email address is no longer valid. From now on, nico@fluxnic.net should be used instead. Signed-off-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13git-archive: infer output format from filename when unspecifiedLibravatar Dmitry Potapov2-3/+41
A command line $ git archive -o my-v2.0.zip v2.0 almost certainly wants the output in zip format, even though it does not specify any --format option. When --format is not given, but output filename is, try to infer what format is requested from the filename extension. Currently this code only knows about '.zip'. When the format is unspecified and the filename does not tell us, the output will be in 'tar' format as before. Of course, an explicit --format will not trigger this guesswork. Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13completion: Replace config --list with --get-regexpLibravatar Todd Zullinger1-21/+9
James Bardin noted that the completion spewed warnings when no git config file is present. This is likely a bug to be fixed in git config, but it's also good to simplify the completion code by using the --get-regexp option as Jeff King pointed out. Signed-off-by: Todd Zullinger <tmz@pobox.com> Trivially-acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13git-archive: add '-o' as a alias for '--output'Libravatar Dmitry Potapov3-3/+4
The '-o' option is commonly used in many tools to specify the output file. Typing '--output' every time is a bit too long to be a practical alternative to redirecting output. But specifying the output name has the advantage of making possible to guess the desired output format by filename extension. Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13test local clone by copyingLibravatar Clemens Buchacher1-21/+33
Test the effect of an earlier change by f7835a2 (preserve mtime of local clone, 2009-09-12) to keep stale loose object files stale in the new repository when a local clone is made by copying files in .git/ directory. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13git-clone doc: typofixLibravatar Johannes Gilger1-1/+1
Signed-off-by: Johannes Gilger <heipei@hackvalue.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13git-push: Accept -n as a synonym for --dry-run.Libravatar Nelson Elhage2-3/+4
git-push is not currently using -n for anything else, and it seems unlikely we will want to use it to mean anything else in the future, so add it as an alias for convenience. Signed-off-by: Nelson Elhage <nelhage@mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13git-commit doc: remove duplicated --dry-run descriptionLibravatar Junio C Hamano1-7/+1
60c2993 (Documentation/git-commit.txt: describe --dry-run, 2009-08-15) wanted to update the documentation to say that "git status" is not the same as "git commit --dry-run" anymore, but it screwed up and also added the description of --dry-run that was already present. Noticed by Johannes Gilger. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13GIT 1.6.5-rc1Libravatar Junio C Hamano1-0/+31
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13Improve --patch option documentation in git-addLibravatar Jari Aalto1-3/+8
Signed-off-by: Jari Aalto <jari.aalto@cante.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13Merge branch 'pk/fast-import-tars'Libravatar Junio C Hamano1-4/+46
* pk/fast-import-tars: import-tars: Allow per-tar author and commit message.
2009-09-13Merge branch 'pk/fast-import-dirs'Libravatar Junio C Hamano1-0/+416
* pk/fast-import-dirs: Add script for importing bits-and-pieces to Git.
2009-09-13Merge branch 'jt/pushinsteadof'Libravatar Junio C Hamano5-32/+131
* jt/pushinsteadof: Add url.<base>.pushInsteadOf: URL rewriting for push only Wrap rewrite globals in a struct in preparation for adding another set
2009-09-13Merge branch 'jk/unwanted-advices'Libravatar Junio C Hamano8-1/+66
* jk/unwanted-advices: status: make "how to stage" messages optional push: make non-fast-forward help message configurable
2009-09-13Merge branch 'jc/merge-saner-messages'Libravatar Junio C Hamano1-4/+21
* jc/merge-saner-messages: merge-recursive: give less scary messages when merge did not start
2009-09-13quiltimport documentation: --dry-run and -n are synonymsLibravatar Junio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13preserve mtime of local cloneLibravatar Clemens Buchacher3-1/+23
A local clone without hardlinks copies all objects, including dangling ones, to the new repository. Since the mtimes are renewed, those dangling objects cannot be pruned by "git gc --prune", even if they would have been old enough for pruning in the original repository. Instead, preserve mtime during copy. "git gc --prune" will then work in the clone just like it did in the original. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13don't dereference NULL upon fdopen failureLibravatar Jim Meyering5-8/+8
There were several unchecked use of fdopen(); replace them with xfdopen() that checks and dies. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13use write_str_in_full helper to avoid literal string lengthsLibravatar Jim Meyering1-7/+3
This is the same fix to use write_str_in_full() helper to write a constant string out without counting the length of it ourselves. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13Merge branch 'db/vcs-helper'Libravatar Junio C Hamano9-144/+406
* db/vcs-helper: Makefile: remove remnant of separate http/https/ftp helpers Use a clearer style to issue commands to remote helpers Make the "traditionally-supported" URLs a special case Makefile: install hardlinks for git-remote-<scheme> supported by libcurl if possible Makefile: do not link three copies of git-remote-* programs Makefile: git-http-fetch does not need expat http-fetch: Fix Makefile dependancies Add transport native helper executables to .gitignore git-http-fetch: not a builtin Use an external program to implement fetching with curl Add support for external programs for handling native fetches
2009-09-13use write_str_in_full helper to avoid literal string lengthsLibravatar Jim Meyering7-9/+14
In 2d14d65 (Use a clearer style to issue commands to remote helpers, 2009-09-03) I happened to notice two changes like this: - write_in_full(helper->in, "list\n", 5); + + strbuf_addstr(&buf, "list\n"); + write_in_full(helper->in, buf.buf, buf.len); + strbuf_reset(&buf); IMHO, it would be better to define a new function, static inline ssize_t write_str_in_full(int fd, const char *str) { return write_in_full(fd, str, strlen(str)); } and then use it like this: - strbuf_addstr(&buf, "list\n"); - write_in_full(helper->in, buf.buf, buf.len); - strbuf_reset(&buf); + write_str_in_full(helper->in, "list\n"); Thus not requiring the added allocation, and still avoiding the maintenance risk of literal string lengths. These days, compilers are good enough that strlen("literal") imposes no run-time cost. Transformed via this: perl -pi -e \ 's/write_in_full\((.*?), (".*?"), \d+\)/write_str_in_full($1, $2)/'\ $(git grep -l 'write_in_full.*"') Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13wrap git's main usage string.Libravatar Matthieu Moy1-1/+4
It's now similar wrapped the same way as in Documentation/git.txt, and fits in a 67 characters wide terminal. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>