1
0
mirror of https://github.com/git/git.git synced 2024-09-30 07:51:31 +02:00
Commit Graph

1534 Commits

Author SHA1 Message Date
Junio C Hamano
aa57328d60 Merge branch 'bc/maint-makefile-fixes'
* bc/maint-makefile-fixes:
  Makefile: work around ksh's failure to handle missing list argument to for loop
  Makefile: remove some unnecessary curly braces
2010-07-15 12:06:11 -07:00
Brandon Casey
49a43f5468 Makefile: work around ksh's failure to handle missing list argument to for loop
ksh does not like it when the list argument is missing in a 'for' loop.
This can happen when NO_CURL is set which causes REMOTE_CURL_ALIASES to be
unset.  In this case, the 'for' loop in the Makefile is expanded to look
like this:

   for p in ; do

and ksh complains like this:

   /bin/ksh: syntax error at line 15 : `;' unexpected

The existing attempt to work around this issue, introduced by 70b89f87,
tried to protect the 'for' loop by first testing whether REMOTE_CURL_ALIASES
was empty, but this does not work since, as Johannes Sixt explains, "Before
the test for emptyness can happen, the complete statement must be parsed,
but ksh finds a syntax error in the statement and, therefore, cannot even
begin to execute the statement. (ksh doesn't follow POSIX in this regard,
where this would not be a syntax error.)".

Make's $(foreach) function could be used to avoid this shell glitch, but
since it has already caused a problem once before by generating a command
line that exceeded the maximum argument list length on IRIX, let's adopt
Bruce Stephens's suggestion for working around this issue in the same way
the OpenSSL folks have done it.  This solution first assigns the contents
of the REMOTE_CURL_ALIASES make variable to a shell variable and then
supplies the shell variable as the list argument in the 'for' loop.  This
satisfies ksh and has the expected behavior even if $(REMOTE_CURL_ALIASES)
is empty.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-06 21:18:21 -07:00
Brandon Casey
ba2b4d7c59 Makefile: remove some unnecessary curly braces
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-05 11:21:00 -07:00
Junio C Hamano
d5cff17eda Merge branch 'eb/core-eol'
* eb/core-eol:
  Add "core.eol" config variable
  Rename the "crlf" attribute "text"
  Add per-repository eol normalization
  Add tests for per-repository eol normalization

Conflicts:
	Documentation/config.txt
	Makefile
2010-06-21 06:02:49 -07:00
Junio C Hamano
8d676d85f7 Merge branch 'gv/portable'
* gv/portable:
  test-lib: use DIFF definition from GIT-BUILD-OPTIONS
  build: propagate $DIFF to scripts
  Makefile: Tru64 portability fix
  Makefile: HP-UX 10.20 portability fixes
  Makefile: HPUX11 portability fixes
  Makefile: SunOS 5.6 portability fix
  inline declaration does not work on AIX
  Allow disabling "inline"
  Some platforms lack socklen_t type
  Make NO_{INET_NTOP,INET_PTON} configured independently
  Makefile: some platforms do not have hstrerror anywhere
  git-compat-util.h: some platforms with mmap() lack MAP_FAILED definition
  test_cmp: do not use "diff -u" on platforms that lack one
  fixup: do not unconditionally disable "diff -u"
  tests: use "test_cmp", not "diff", when verifying the result
  Do not use "diff" found on PATH while building and installing
  enums: omit trailing comma for portability
  Makefile: -lpthread may still be necessary when libc has only pthread stubs
  Rewrite dynamic structure initializations to runtime assignment
  Makefile: pass CPPFLAGS through to fllow customization

Conflicts:
	Makefile
	wt-status.h
2010-06-21 06:02:44 -07:00
Junio C Hamano
919e06b228 Merge branch 'bc/portable'
* bc/portable:
  Remove python 2.5'isms
  Makefile: add PYTHON_PATH to GIT-BUILD-OPTIONS
  t/aggregate-results: accomodate systems with small max argument list length
  t/t7006: ignore return status of shell's unset builtin
  t/t5150: remove space from sed script
  git-request-pull.sh: remove -e switch to shell interpreter which breaks ksh
  t/t5800: skip if python version is older than 2.5
2010-06-21 06:02:42 -07:00
Junio C Hamano
ecdb3ec984 Merge branch 'ab/maint-perl-use-instlibdir'
* ab/maint-perl-use-instlibdir:
  Makefile: remove redundant munging of @@INSTLIBDIR@@
2010-06-18 11:16:55 -07:00
Junio C Hamano
7c1b228d26 Merge branch 'jn/gitweb-plackup'
* jn/gitweb-plackup:
  git-instaweb: Add support for running gitweb via 'plackup'
  git-instaweb: Wait for server to start before running web browser
  git-instaweb: Remove pidfile after stopping web server
  git-instaweb: Configure it to work with new gitweb structure
  git-instaweb: Put httpd logs in a "$httpd_only" subdirectory
  gitweb: Set default destination directory for installing gitweb in Makefile
  gitweb: Move static files into seperate subdirectory
2010-06-18 11:16:55 -07:00
Junio C Hamano
bcacc0ebdb Merge branch 'jk/url-decode'
* jk/url-decode:
  decode file:// and ssh:// URLs
  make url-related functions reusable
2010-06-18 11:16:55 -07:00
Junio C Hamano
7e74a73e6b Merge branch 'cw/maint-exec-defpath' into maint
* cw/maint-exec-defpath:
  autoconf: Check if <paths.h> exists and set HAVE_PATHS_H
  exec_cmd.c: replace hard-coded path list with one from <paths.h>
2010-06-16 16:33:47 -07:00
Brandon Casey
ae45732214 Makefile: add PYTHON_PATH to GIT-BUILD-OPTIONS
The PYTHON_PATH environment variable is not set when running test scripts
manually i.e. when not using 'make test'.  Scripts which attempt to use
this variable will fail.  So add it to the list of variables written to
the GIT-BUILD-OPTIONS file so that the test suite will import it when
running the test scripts.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-13 20:02:45 -07:00
Junio C Hamano
04d30ce622 Merge branch 'js/maint-windows'
* js/maint-windows:
  Recent MinGW has a C99 implementation of snprintf functions
  mingw: use _commit to implement fsync
2010-06-13 11:21:30 -07:00
Junio C Hamano
57af58e888 Merge branch 'jn/make-header-dependency'
* jn/make-header-dependency:
  Makefile: let header dependency checker override COMPUTE_HEADER_DEPENDENCIES
  Makefile: fix header dependency checker to allow NO_CURL builds
2010-06-13 11:21:17 -07:00
Junio C Hamano
5e87eae97d test-lib: use DIFF definition from GIT-BUILD-OPTIONS
Otherwise running individual tests from t/ directory may lack the definition
of $DIFF, $GIT_TEST_CMP and friends.

Noticed and initial patch provided by Thomas Rast, alternative solution
suggested by Brandon Casey, which this patch implements.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Thomas Rast <trast@student.ethz.ch>
2010-06-11 13:45:05 -07:00
Jeff King
f4c2eb8b34 Makefile: default pager on AIX to "more"
AIX doesn't ship with "less" by default, and their "more" is
more featureful than average, so the latter is a more
sensible choice.  People who really want less can set the
compile-time option themselves, or users can set $PAGER.

Signed-off-by: Jeff King <peff@peff.net>
Tested-by: Tor Arntsen <tor@spacetec.no>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-11 09:05:34 -07:00
Jeff King
19b9b0b220 Makefile: default pager on AIX to "more"
AIX doesn't ship with "less" by default, and their "more" is
more featureful than average, so the latter is a more
sensible choice.  People who really want less can set the
compile-time option themselves, or users can set $PAGER.

Signed-off-by: Jeff King <peff@peff.net>
Tested-by: Tor Arntsen <tor@spacetec.no>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-10 07:56:11 -07:00
Eyvind Bernhardsen
942e774767 Add "core.eol" config variable
Introduce a new configuration variable, "core.eol", that allows the user
to set which line endings to use for end-of-line-normalized files in the
working directory.  It defaults to "native", which means CRLF on Windows
and LF everywhere else.

Note that "core.autocrlf" overrides core.eol.  This means that

[core]
	autocrlf = true

puts CRLFs in the working directory even if core.eol is set to "lf".

Signed-off-by: Eyvind Bernhardsen <eyvind.bernhardsen@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-06 21:20:04 -07:00
Junio C Hamano
09ce4bb6ea build: propagate $DIFF to scripts
git-merge-one-file expects to run "-u" capable "diff", but using
$DIFF is not the right way to do so.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-05 09:36:13 -07:00
Gary V. Vaughan
46856f4e9d Makefile: Tru64 portability fix
Add defaults for Tru64 Unix.  Without this patch I cannot compile
git on Tru64 5.1.

Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-02 10:24:27 -07:00
Gary V. Vaughan
e78673ff0b Makefile: HP-UX 10.20 portability fixes
HP-UX 10.20 has no pread definition, the inline keyword doesn't work,
and has no inet_ntop/inet_pton definitions.

Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-02 10:24:27 -07:00
Gary V. Vaughan
176959d742 Makefile: HPUX11 portability fixes
There is no nanosecond field on HPUX, the inline keyword is
spelled "__inline", and there are no inet_ntop/inet_pton definitions
on HP-UX 11.00

Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-02 10:24:27 -07:00
Pavan Kumar Sunkara
c0cb4ed3e6 git-instaweb: Configure it to work with new gitweb structure
git-instaweb in its current form (re)creates gitweb.cgi and
(some of) required static files in $GIT_DIR/gitweb/ directory.
Splitting gitweb would make it difficult for git-instaweb to
continue with this method.

Use the instaweb.gitwebdir config variable to point git-instaweb script
to a global directory which contains gitweb files as server root
and the httpd.conf along with server logs and pid go into
'$(GIT_DIR)/gitweb' directory.

Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Mentored-by: Petr Baudis <pasky@ucw.cz>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Acked-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 17:56:53 -07:00
Pavan Kumar Sunkara
bc9519683c gitweb: Set default destination directory for installing gitweb in Makefile
Currently installing gitweb requires to give a target directory
(via 'gitwebdir' build variable).  Giving it a default value
protects against user errors.

Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Mentored-by: Petr Baudis <pasky@ucw.cz>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Acked-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 17:56:39 -07:00
Pavan Kumar Sunkara
18d05328f3 gitweb: Move static files into seperate subdirectory
Create a new subdirectory called 'static' in gitweb/, and move
all static files required by gitweb.cgi when running, which means
styles, images and Javascript code. This should make gitweb more
readable and easier to maintain.

Update t/gitweb-lib.sh to reflect this change.The install-gitweb
now also include moving of static files into 'static' subdirectory
in target directory: update Makefile, gitweb's INSTALL, README and
Makefile accordingly.

Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Mentored-by: Petr Baudis <pasky@ucw.cz>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Acked-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 17:56:29 -07:00
Ævar Arnfjörð Bjarmason
a6c6060a0a Makefile: remove redundant munging of @@INSTLIBDIR@@
Junio originally added this in f6276fe159 for use in `unshift @INC,
'@@INSTLIBDIR@@'' in git-fmt-merge-msg.perl. That program was since
then rewritten in C in 00449f992b. And since 6fcca938b0 all Perl
programs use `use lib' to set their @INC path.

There's been no @@INSTLIBDIR@@ in any Perl script to replace since
then. So there's no reason to keep it around.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 17:47:36 -07:00
Gary V. Vaughan
614dd90506 Makefile: SunOS 5.6 portability fix
Although configure takes care of most of this, set some default values
for Solaris 2.6 (aka SunOS-5.6) to ensure git compiles even when
configure is not used to build it.

Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 17:36:28 -07:00
Gary V. Vaughan
520fbc2a0d inline declaration does not work on AIX
Define away inline declaration on AIX.

Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 17:36:27 -07:00
Gary V. Vaughan
f9f33cdc78 Allow disabling "inline"
Compiler support for inline is sometimes buggy, and occasionally
missing entirely.  This patch adds a test for inline support, and
redefines the keyword with the preprocessor if necessary at compile
time.

Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 17:36:27 -07:00
Gary V. Vaughan
e88a135bc5 Some platforms lack socklen_t type
Some platforms do not have a socklen_t type declaration.

Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 17:36:27 -07:00
Gary V. Vaughan
b2b0026eed test_cmp: do not use "diff -u" on platforms that lack one
By default the testsuite calls 'diff -u' whenever a file comparison is
called for.  Unfortunately that throws a "diff: unknown option '-u'"
error for most non-GNU diffs.

This patch sets GIT_TEST_CMP to 'cmp' on all the architectures where
that happens.  The previous version of this patch forgot to export
GIT_TEST_CMP from t/Makefile, which is why 'make test' continued to
fail most tests on most architectures - test-lib.sh was falling back
on its default of `diff -u' for GIT_TEST_CMP.  This version of this
patch shows a vast improvement in testsuite results where either GNU
diff is in the path at configure time, or where Makefile knows that
GIT_TEST_CMP=cmp is required.

Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 17:36:27 -07:00
Junio C Hamano
7b3bdbb335 fixup: do not unconditionally disable "diff -u"
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 17:35:20 -07:00
Gary V. Vaughan
d1b1a91946 Do not use "diff" found on PATH while building and installing
Some of the flags used with the first diff found in PATH cause the
vendor diff to choke.

Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 16:59:27 -07:00
Gary V. Vaughan
48793cf46a Makefile: -lpthread may still be necessary when libc has only pthread stubs
Without this patch, systems that provide stubs for pthread functions
in libc, but which still require libpthread for full the pthread
implementation are not detected correctly.

Also, some systems require -pthread in CFLAGS for each compilation
unit for a successful link of an mt binary, which is also addressed by
this patch.

Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 16:59:26 -07:00
Gary V. Vaughan
ebef827765 Makefile: pass CPPFLAGS through to fllow customization
Without this patch there is no straight forward way to pass additional
CPPFLAGS at configure-time.  At TWW, everything non-vendor package is
installed to its own subdirectory, so we need the following to show
the preprocessor where the headers for the libraries we will link
later can be found:

	$SHELL ./configure \
	CPPFLAGS="-I${SB_VAR_CURL_INC}\
	 -I${SB_VAR_LIBEXPAT_INC}\
	 -I${SB_VAR_LIBZ_INC}\
	${CPPFLAGS+ $CPPFLAGS}" <<...>>

Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 16:59:26 -07:00
Junio C Hamano
81fa024cd8 Merge branch 'maint'
* maint:
  Makefile: reenable install with NO_CURL
  completion: --set-upstream option for git-branch
  get_cwd_relative(): do not misinterpret suffix as subdirectory
2010-05-28 16:59:42 -07:00
Junio C Hamano
371276bf29 Merge branch 'maint-1.7.0' into maint
* maint-1.7.0:
  Makefile: reenable install with NO_CURL
2010-05-28 16:59:36 -07:00
Michael J Gruber
70b89f871e Makefile: reenable install with NO_CURL
Setting NO_CURL leaves some variables like REMOTE_CURL_ALIASES
empty, which creates no fun when for-looping over
$(REMOTE_CURL_ALIASES) unconditionally. Make it conditional.

Reported-by: Paul Walker <PWalker752@aol.com>
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-28 16:46:09 -07:00
Jeff King
638794cde0 make url-related functions reusable
The is_url function and url percent-decoding functions were
static, but are generally useful. Let's make them available
to other parts of the code.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-24 16:48:32 -07:00
Junio C Hamano
14b8512f87 Merge branch 'jn/gitweb-install'
* jn/gitweb-install:
  gitweb: Create install target for gitweb in Makefile
  gitweb: Improve installation instructions in gitweb/INSTALL
2010-05-21 04:02:21 -07:00
Junio C Hamano
455bda993c Merge branch 'cw/maint-exec-defpath'
* cw/maint-exec-defpath:
  autoconf: Check if <paths.h> exists and set HAVE_PATHS_H
  exec_cmd.c: replace hard-coded path list with one from <paths.h>
2010-05-21 04:02:17 -07:00
Junio C Hamano
af655431f5 Merge branch 'sr/remote-helper-export'
* sr/remote-helper-export:
  t5800: testgit helper requires Python support
  Makefile: Simplify handling of python scripts
  remote-helpers: add tests for testgit helper
  remote-helpers: add testgit helper
  remote-helpers: add support for an export command
  remote-helpers: allow requesing the path to the .git directory
  fast-import: always create marks_file directories
  clone: also configure url for bare clones
  clone: pass the remote name to remote_get

Conflicts:
	Makefile
2010-05-21 04:02:15 -07:00
Johannes Sixt
ec47a33fd2 Recent MinGW has a C99 implementation of snprintf functions
Starting with MinGW 3.14, released end of 2007, a working snprintf
is available. This means we do not need our own replacement that works
around the broken implementation in Microsoft's C runtime.

People who build git in an old MinGW environment are expected to set
SNPRINTF_RETURNS_BOGUS in their config.mak. msysgit is sufficiently
recent, of course.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-20 16:13:10 -07:00
Junio C Hamano
dd75d07899 Merge branch 'jk/cached-textconv'
* jk/cached-textconv:
  diff: avoid useless filespec population
  diff: cache textconv output
  textconv: refactor calls to run_textconv
  introduce notes-cache interface
  make commit_tree a library function
2010-05-08 22:33:08 -07:00
Jonathan Nieder
57e8743d1a Makefile: let header dependency checker override COMPUTE_HEADER_DEPENDENCIES
This way, if you have “COMPUTE_HEADER_DEPENDENCIES = YesPlease” in your
config.mak, you can still “make CHECK_HEADER_DEPENDENCIES=Yes” to check
the makefile after a successful build.

This change does not affect the result of the command
“make CHECK_HEADER_DEPENDENCIES=Yes COMPUTE_HEADER_DEPENDENCIES=Yes”.
That will still die with an error message:

	cannot compute header dependencies outside a normal build

The message is appropriate because still true.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-08 22:30:51 -07:00
Jonathan Nieder
e3925b1222 Makefile: fix header dependency checker to allow NO_CURL builds
Do not expect to find http-related dependency fragments after a build
with HTTP support disabled.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-08 22:30:36 -07:00
Ramsay Jones
e5bd0a1b36 Makefile: Fix 'clean' target to remove all gitweb build files
In particular the gitweb/GITWEB-BUILD-OPTIONS file was not being
removed by the main Makefile. However, the gitweb/Makefile has a
'clean' target that correctly removes all the build products.
In order to fix the problem, rather than duplicate the clean-up
instructions, we change the main Makefile so that it delegates
the clean-up actions to the gitweb Makefile.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-08 11:14:40 -07:00
Jakub Narebski
152d94348f gitweb: Create install target for gitweb in Makefile
Installing gitweb is now as easy as

  # make gitwebdir=/var/www/cgi-bin gitweb-install  ;# as root

The gitweb/INSTALL file was updated accordingly, to make use of this
new target.

Fix shell quoting, i.e. setting bindir_SQ etc., in gitweb/Makefile.
Those variables were not used previously.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-01 15:42:19 -07:00
Junio C Hamano
dd0c5133c6 Merge branch 'da/maint-python-startup' into maint
* da/maint-python-startup:
  Makefile: Remove usage of deprecated Python "has_key" method
2010-04-22 22:29:07 -07:00
Chris Webb
cb6a22c076 exec_cmd.c: replace hard-coded path list with one from <paths.h>
The default executable path list used by exec_cmd.c is hard-coded to
be "/usr/local/bin:/usr/bin:/bin".  Use an appropriate value for the
system from <paths.h> when available.

Add HAVE_PATHS_H make variables and enable it on Linux, FreeBSD,
NetBSD, OpenBSD and GNU where it is known to exist for now. Somebody
else may want to do an autoconf support later.

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-15 12:07:51 -07:00
Junio C Hamano
b92cbb62de Merge branch 'mr/gitweb-jsmin'
* mr/gitweb-jsmin:
  gitweb: update INSTALL to use shorter make target
  gitweb: add documentation to INSTALL regarding gitweb.js
  instaweb: add minification awareness
  Gitweb: add autoconfigure support for minifiers
  Gitweb: add support for minifying gitweb.css
  Gitweb: add ignore and clean rules for minified files
2010-04-10 13:02:22 -07:00
Junio C Hamano
581b26c82d Merge branch 'rb/maint-python-path' into maint
* rb/maint-python-path:
  Correct references to /usr/bin/python which does not exist on FreeBSD
2010-04-09 22:22:19 -07:00
Brian Gernhardt
f733f6a0c6 Makefile: Simplify handling of python scripts
The sed script intended to add a standard opening to python scripts
was non-compatible and overly complex.  Simplifying it down to a set
of one-liners removes the compatibility issues of newlines.  Moving
the environment alterations from the Makefile to the python scripts
makes also makes the scripts easier to run in-place.

Specifically, the new sed script:

 - Alters the shebang line to use the configured Python.
 - Alters any os.getenv("GITPYTHONLIB") calls to use @@INSTLIBDIR@@ as the
   default.  This will replace any existing default or add a default if
   none is provided.
 - Replaces the @@INSTLIBDIR@@ placeholder with the directory git installs
   its python libraries to.

The last two steps could be combined into a single step, but is left
separate in case someone has another need for @@INSTLIBDIR@@ in their
script.

Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-09 20:47:22 -07:00
Junio C Hamano
b807c524df Merge branch 'da/maint-python-startup'
* da/maint-python-startup:
  Makefile: Remove usage of deprecated Python "has_key" method
2010-04-06 14:50:47 -07:00
Junio C Hamano
8b5fe8c9ec Revert "Link against libiconv on IRIX"
Brandon Casey reports:

    Subject: Re: [PATCH] Link against libiconv on IRIX
    Date: Mon, 05 Apr 2010 11:45:32 -0500
    Message-Id: <1UypQMCHLT57SnjSQIM66RTkLalsvavG8xXoQJv4rEQ@cipher.nrlssc.navy.mil>

    This breaks compilation on IRIX 6.5.29m for me since there
    is no separate libiconv.so.

    What version of IRIX are you using?

    On my system, even the iconv utility doesn't link against
    a libiconv shared object.  It seems the iconv functionality is in libc.

       # ldd /usr/bin/iconv
	       libc.so.1  =>    /usr/lib32/libc.so.1

    Could it be that you are using a third party iconv library?
    I've experienced this on another system and the problem was related
    to curl.  In that case, curl was linked against an external iconv and
    not the native library, so if I tried to build with curl support, I had
    to also build against the external iconv library.

While we wait for an improved solution, revert the regression caused by
21704227904b51197976c61c595b52d807677533.
2010-04-05 10:16:11 -07:00
Junio C Hamano
4de113cdf5 Merge branch 'rb/maint-python-path'
* rb/maint-python-path:
  Correct references to /usr/bin/python which does not exist on FreeBSD
2010-04-03 12:28:41 -07:00
Junio C Hamano
0cb050abc2 Merge branch 'bw/template-tool-buildconfig'
* bw/template-tool-buildconfig:
  Modernize git calling conventions in hook templates
  Make templates honour SHELL_PATH and PERL_PATH
2010-04-03 12:28:40 -07:00
Jonathan Nieder
ecebd1e1a7 Makefile: future-proof Cygwin version check
Tweak the condition that detects old Cygwin versions to not include
versions such as 1.8, 1.11, and 2.1.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-03 11:26:35 -07:00
Mark Rada
09b89d1a08 instaweb: add minification awareness
This patch will cause git-instaweb to use the minified version of gitweb
support files (e.g. CSS and JavaScript) if they were generated.

Without minification awareness, generating the minified version of
gitweb's support files will generate a broken instaweb script since the
copy of gitweb.cgi will look for gitweb.min.* which will not exist.

Signed-off-by: Mark Rada <marada@uwaterloo.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-02 21:23:40 -07:00
Mark Rada
bb4bbf7582 Gitweb: add autoconfigure support for minifiers
This will allow users to set a JavaScript/CSS minifier when/if they run
the autoconfigure script while building git.

Signed-off-by: Mark Rada <marada@uwaterloo.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-02 21:23:38 -07:00
Mark Rada
0e6ce21361 Gitweb: add support for minifying gitweb.css
The build system added support minifying gitweb.js through a
JavaScript minifier, but most minifiers come with support for
minifying CSS files as well, so we should use it if we can.

This patch will add the same facilities to gitweb.css that
gitweb.js has for minification. That does not mean that they
will use the same minifier though, as it is not safe to assume
that all JavaScript minifiers will also minify CSS files.

This patch also adds the GITWEB_PROGRAMS variable to the Makefile
to keep a list of potential gitweb dependencies separate from
OTHER_PROGRAMS when we need to know just the gitweb dependencies.

Though the bandwidth savings will not be as dramatic as with
the JavaScript minifier, every byte saved is important.

Signed-off-by: Mark Rada <marada@uwaterloo.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-02 21:23:35 -07:00
Mark Rada
8830bf4bc5 Gitweb: add ignore and clean rules for minified files
Signed-off-by: Mark Rada <marada@uwaterloo.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-02 21:23:26 -07:00
Jeff King
a941d5e395 introduce notes-cache interface
Notes provide a fast lookup mechanism for data keyed by
sha1. This is ideal for caching certain operations, like
textconv filters.

This patch builds some infrastructure to make it simpler to
use notes trees as caches. In particular, caches:

  1. don't have arbitrary commit messages. They store a
     cache validity string in the commit, and clear the tree
     when the cache validity string changes.

  2. don't keep any commit history. The accumulated history
     of a a cache is just useless cruft.

  3. use a looser form of locking for ref updates. If two
     processes try to write to the cache simultaneously, it
     is OK if one overwrites the other, losing some changes.
     It's just a cache, so we will just end up with an extra
     miss.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-01 23:58:30 -07:00
Eric Blake
a50dec22f2 Makefile: update defaults for modern Cygwin
Now that Cygwin 1.7.x has enabled lots of new features, and Cygwin 1.5
is no longer actively supported by the Cygwin mailing lists, we might
as well update the defaults to cater to those new features.

NO_TRUSTABLE_FILEMODE is only necessary on FAT drives; the Cygwin
community recommends NTFS drives, but there is still too much use
for FAT to switch the default.  Likewise, UNRELIABLE_FSTAT is probably
file-system specific, but worth keeping unchanged.

This commit does not change the default for NO_MMAP, although definitive
proof of whether this option is necessary is lacking.

Signed-off-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-01 23:43:16 -07:00
Sverre Rabbelier
7aeaa2fc0a remote-helpers: add testgit helper
Currently the remote helper infrastructure is only used by the curl
helper, which does not give a good impression of how remote helpers
can be used to interact with foreign repositories. Since implementing
such a helper is non-trivial it would be good to have at least one
easy-to-follow example demonstrating how to implement a helper that
interacts with a foreign vcs using fast-import/fast-export.

The testgit helper can be used to interact with remote git
repositories by prefixing the url with "testgit::".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-31 21:40:16 -07:00
Junio C Hamano
890a13a452 Sync with 1.7.0.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-31 15:14:27 -07:00
Holger Weiß
2170422790 Link against libiconv on IRIX
On IRIX, "-liconv" must be added to the linker command line in order to
get iconv(3) support; set the according Makefile variable appropriately.

Signed-off-by: Holger Weiß <holger@zedat.fu-berlin.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-31 14:22:06 -07:00
David Aguilar
0ae08401be Makefile: Remove usage of deprecated Python "has_key" method
"has_key" is a deprecated dictionary method in Python 2.6+.
Simplify the sys.path manipulation for installed scripts by
passing a default value to os.getenv() that takes a default
value to be used when the environment variable is missing.

SCRIPT_PYTHON is currently empty but this future-proofs us.
It also fixes things for users who maintain local git forks
with their own SCRIPT_PYTHON additions.

Old code replaced the first element of sys.path[] which is
typically '' (i.e. import library files relative to the script).
It is safer to prepend the extra library path instead.

Signed-off-by: David Aguilar <davvid@gmail.com>
Acked-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-28 21:35:09 -07:00
R. Tyler Ballance
44211e8c2e Correct references to /usr/bin/python which does not exist on FreeBSD
On FreeBSD, Python does not ship as part of the base system but is available
via the ports system, which install the binary in /usr/local/bin.

Signed-off-by: R. Tyler Ballance <tyler@monkeypox.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-24 14:33:54 -07:00
Junio C Hamano
96203bb074 Merge branch 'maint'
* maint:
  Update draft release notes to 1.7.0.3
  fetch: Fix minor memory leak
  fetch: Future-proof initialization of a refspec on stack
  fetch: Check for a "^{}" suffix with suffixcmp()
  daemon: parse_host_and_port SIGSEGV if port is specified
  Makefile: Fix CDPATH problem
  pull: replace unnecessary sed invocation
2010-03-20 11:29:19 -07:00
Ben Walton
502be95953 Make templates honour SHELL_PATH and PERL_PATH
The hook script templates were hard coded to use /bin/sh and perl.
This patch ensures that they use the same tools specified for the rest
of the suite.

The impetus for the change was noticing that, as shipped, some of the
hooks used shell constructs that wouldn't work under Solaris' /bin/sh
(eg: $(cmd...) substitutions).

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-20 09:03:52 -07:00
Jonathan Nieder
a673cfede6 Makefile: Fix occasional GIT-CFLAGS breakage
GNU make’s target-specific variables facility has one weird facet: any
variables set for a given target apply to all of its dependencies,
too.  For example, when running “make exec_cmd.o”, since exec_cmd.o
depends on GIT-CFLAGS, the variable assignment in

	exec_cmd.s exec_cmd.o: ALL_CFLAGS += \
		'-DGIT_EXEC_PATH="$(gitexecdir_SQ)"' \
		'-DBINDIR="$(bindir_relative_SQ)"' \
		'-DPREFIX="$(prefix_SQ)"'

applies when refreshing GIT-CFLAGS, and the extra options get included
in the tracked compiler flags.  If an object file like this is the
first target built, GIT-CFLAGS will appear to be out of date,
resulting in useless rebuilds and the dreaded “new build flags or
prefix” message.

This does not happen with every build because GIT-CFLAGS is only
refreshed once in a given “make” run, and usually the first target
does not set any variables.  When this problem does rear its head, it
is very annoying.

So put target-specific flags in a separate EXTRA_CPPFLAGS variable
that is not included in $(TRACK_CFLAGS).

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-20 08:28:16 -07:00
Jonathan Nieder
c40d92e4c7 Makefile: Fix CDPATH problem
If CDPATH is set, "cd" prints its destination to stdout, causing
the common (cd a && tar cf - .) | (cd b && tar xf -) idiom to fail.
For example:

 make -C templates DESTDIR='' install
 make[1]: Entering directory `/users/e477610/exptool/src/git-1.7.0.2/templates'
 install -d -m 755 '/home/e477610/exptool/share/git-core/templates'
 (cd blt && gtar cf - .) | \
	(cd '/home/e477610/exptool/share/git-core/templates' && umask 022 && gtar xof -)
 gtar: This does not look like a tar archive

Most git scripts already protect against use of CDPATH through
git-sh-setup, but the Makefile doesn’t.

Reported-by: Michael Cox <mhcox@bluezoosoftware.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-20 08:25:31 -07:00
Junio C Hamano
2949151fe9 Merge branch 'jh/notes'
* jh/notes: (33 commits)
  Documentation: fix a few typos in git-notes.txt
  notes: fix malformed tree entry
  builtin-notes: Minor (mostly parse_options-related) fixes
  builtin-notes: Add "copy" subcommand for copying notes between objects
  builtin-notes: Misc. refactoring of argc and exit value handling
  builtin-notes: Add -c/-C options for reusing notes
  builtin-notes: Refactor handling of -F option to allow combining -m and -F
  builtin-notes: Deprecate the -m/-F options for "git notes edit"
  builtin-notes: Add "append" subcommand for appending to note objects
  builtin-notes: Add "add" subcommand for adding notes to objects
  builtin-notes: Add --message/--file aliases for -m/-F options
  builtin-notes: Add "list" subcommand for listing note objects
  Documentation: Generalize git-notes docs to 'objects' instead of 'commits'
  builtin-notes: Add "prune" subcommand for removing notes for missing objects
  Notes API: prune_notes(): Prune notes that belong to non-existing objects
  t3305: Verify that removing notes triggers automatic fanout consolidation
  builtin-notes: Add "remove" subcommand for removing existing notes
  Teach builtin-notes to remove empty notes
  Teach notes code to properly preserve non-notes in the notes tree
  t3305: Verify that adding many notes with git-notes triggers increased fanout
  ...

Conflicts:
	Makefile
2010-03-15 00:52:06 -07:00
Junio C Hamano
c88cd03edb Makefile: update check-docs target
When we added bunch of git-remote-* helper backends, we should have
done this to squelch complaints that they do not have their own
manual pages.  Also the entry for git-remote-helpers was not
properly marked as a non-command.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-10 15:31:34 -08:00
Junio C Hamano
2e0e8b68e3 Merge branch 'lt/deepen-builtin-source'
* lt/deepen-builtin-source:
  Move 'builtin-*' into a 'builtin/' subdirectory

Conflicts:
	Makefile
2010-03-10 15:25:18 -08:00
Junio C Hamano
87912fd617 Merge branch 'mm/mkstemps-mode-for-packfiles'
* mm/mkstemps-mode-for-packfiles:
  Use git_mkstemp_mode instead of plain mkstemp to create object files
  git_mkstemps_mode: don't set errno to EINVAL on exit.
  Use git_mkstemp_mode and xmkstemp_mode in odb_mkstemp, not chmod later.
  git_mkstemp_mode, xmkstemp_mode: variants of gitmkstemps with mode argument.
  Move gitmkstemps to path.c
  Add a testcase for ACL with restrictive umask.
2010-03-07 12:47:14 -08:00
Junio C Hamano
a026d5318c Merge branch 'jn/makedepend'
* jn/makedepend:
  Makefile: clarify definition of TEST_OBJS
  Makefile: always remove .depend directories on 'make clean'
  Makefile: tuck away generated makefile fragments in .depend
  Teach Makefile to check header dependencies
  Makefile: list standalone program object files in PROGRAM_OBJS
  Makefile: lazily compute header dependencies
  Makefile: list generated object files in OBJECTS
  Makefile: disable default implicit rules
  Makefile: rearrange dependency rules
  Makefile: transport.o depends on branch.h now
  Makefile: drop dependency on $(wildcard */*.h)
  Makefile: clean up http-walker.o dependency rules
  Makefile: remove wt-status.h from LIB_H
  Makefile: make sure test helpers are rebuilt when headers change
  Makefile: add missing header file dependencies

Conflicts:
	Makefile
2010-03-02 12:44:08 -08:00
Jonathan Nieder
5b8805e75c Makefile: clarify definition of TEST_OBJS
The definition of TEST_OBJS in commit daa99a91 (Makefile: make sure
test helpers are rebuilt when headers change, 2010-01-26) moved a use
of $X to before the platform-specific section where it gets defined.
There are at least two ways to fix that:

 - Change the definition of TEST_OBJS to use the = delayed
   evaluation operator.  This way, one need not worry about $(X)
   needing to be defined before TEST_OBJS is set.

 - Move the definition of TEST_OBJS to below the definition of $X.

Carry out the second.  The later site of definition makes the code more
readable, since now a reader only has to look down one line to see what
TEST_OBJS is meant to be used for.

Oddly enough, with or without this change the behavior of the Makefile
is the same.  Since TEST_PROGRAMS is defined with delayed evaluation,
the value of

 TEST_OBJS := $(patsubst test-%$X,test-%.o,$(TEST_PROGRAMS))

is independent of the value of $X when it is evaluated: the $X in the
pattern and the $X in $(TEST_PROGRAMS) will simply always cancel out.
Make sure $X has the expected expansion anyway to make the code and
the reader’s sanity more robust in the face of future changes.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-28 10:58:50 -08:00
Matthieu Moy
00787ed55a Move gitmkstemps to path.c
This function used to be only a compatibility function, but we're
going to extend it and actually use it, so make it part of Git.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-22 15:24:45 -08:00
Linus Torvalds
81b50f3ce4 Move 'builtin-*' into a 'builtin/' subdirectory
This shrinks the top-level directory a bit, and makes it much more
pleasant to use auto-completion on the thing. Instead of

	[torvalds@nehalem git]$ em buil<tab>
	Display all 180 possibilities? (y or n)
	[torvalds@nehalem git]$ em builtin-sh
	builtin-shortlog.c     builtin-show-branch.c  builtin-show-ref.c
	builtin-shortlog.o     builtin-show-branch.o  builtin-show-ref.o
	[torvalds@nehalem git]$ em builtin-shor<tab>
	builtin-shortlog.c  builtin-shortlog.o
	[torvalds@nehalem git]$ em builtin-shortlog.c

you get

	[torvalds@nehalem git]$ em buil<tab>		[type]
	builtin/   builtin.h
	[torvalds@nehalem git]$ em builtin		[auto-completes to]
	[torvalds@nehalem git]$ em builtin/sh<tab>	[type]
	shortlog.c     shortlog.o     show-branch.c  show-branch.o  show-ref.c     show-ref.o
	[torvalds@nehalem git]$ em builtin/sho		[auto-completes to]
	[torvalds@nehalem git]$ em builtin/shor<tab>	[type]
	shortlog.c  shortlog.o
	[torvalds@nehalem git]$ em builtin/shortlog.c

which doesn't seem all that different, but not having that annoying
break in "Display all 180 possibilities?" is quite a relief.

NOTE! If you do this in a clean tree (no object files etc), or using an
editor that has auto-completion rules that ignores '*.o' files, you
won't see that annoying 'Display all 180 possibilities?' message - it
will just show the choices instead.  I think bash has some cut-off
around 100 choices or something.

So the reason I see this is that I'm using an odd editory, and thus
don't have the rules to cut down on auto-completion.  But you can
simulate that by using 'ls' instead, or something similar.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-22 14:29:41 -08:00
Junio C Hamano
7fa2b1f60b Merge branch 'jn/makefile-script-lib'
* jn/makefile-script-lib:
  Do not install shell libraries executable
2010-02-21 11:59:22 -08:00
Johan Herland
cd067d3bf4 Builtin-ify git-notes
The builtin-ification includes some minor behavioural changes to the
command-line interface: It is no longer allowed to mix the -m and -F
arguments, and it is not allowed to use multiple -F options.

As part of the builtin-ification, we add the commit_notes() function
to the builtin API. This function (together with the notes.h API) can
be easily used from other builtins to manipulate the notes tree.

Also includes needed changes to t3301.

This patch has been improved by the following contributions:
- Stephen Boyd: Use die() instead of fprintf(stderr, ...) followed by exit(1)

Cc: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-13 19:36:13 -08:00
Junio C Hamano
484e669aa7 Merge branch 'jh/gitweb-caching' (early part)
* 'jh/gitweb-caching' (early part):
  gitweb: Add optional extra parameter to die_error, for extended explanation
  gitweb: add a "string" variant of print_sort_th
  gitweb: add a "string" variant of print_local_time
  gitweb: Check that $site_header etc. are defined before using them
  gitweb: Makefile improvements
  gitweb: Load checking
  gitweb: Make running t9501 test with '--debug' reliable and usable
2010-02-02 21:48:22 -08:00
Jonathan Nieder
010acc1519 Makefile: always remove .depend directories on 'make clean'
Even if COMPUTE_HEADER_DEPENDENCIES is not set, some .o.d files
might be lying around from previous builds when it was.  This
is especially likely because using the CHECK_HEADER_DEPENDENCIES
feature requires building sometimes with COMPUTE... on and
sometimes with it off.  At the end of such an exercise, to get
a blank slate, the user ought to be able to just run 'make clean'.
Make it so.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-31 14:08:55 -08:00
Jonathan Nieder
ec5e0bb860 Makefile: tuck away generated makefile fragments in .depend
When building with COMPUTE_HEADER_DEPENDENCIES on, save
dependency information to .depend/ instead of deps/ so it does
not show up in ‘ls’ output.  Otherwise, the extra directories can
be distracting.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-31 14:08:50 -08:00
Jonathan Nieder
46bac90458 Do not install shell libraries executable
Some scripts are expected to be sourced instead of executed on their own.
Avoid some confusion by not marking them executable.

The executable bit was confusing the valgrind support of our test scripts,
which assumed that any executable without a #!-line should be intercepted
and run through valgrind.  So during valgrind-enabled tests, any script
sourcing these files actually sourced the valgrind interception script
instead.

Reported-by: Jeff King <peff@peff.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-31 11:53:10 -08:00
Dan McGee
7eb151d6e2 Make NO_PTHREADS the sole thread configuration variable
When the first piece of threaded code was introduced in commit 8ecce684, it
came with its own THREADED_DELTA_SEARCH Makefile option. Since this time,
more threaded code has come into the codebase and a NO_PTHREADS option has
also been added. Get rid of the original option as the newer, more generic
option covers everything we need.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-31 11:50:50 -08:00
John 'Warthog9' Hawley
62331ef163 gitweb: Makefile improvements
Adjust the main Makefile so you can simply run

     make gitweb

which in turn calls gitweb/Makefile.  This means that in order to
generate gitweb, you can simply run 'make' from gitweb subdirectory:

     cd gitweb
     make

Targets gitweb/gitweb.cgi and (dependent on JSMIN being defined)
gitweb/gitweb.min.js in main Makefile are preserved for backward
compatibility.

Signed-off-by: John 'Warthog9' Hawley <warthog9@kernel.org>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-30 15:53:52 -08:00
Jonathan Nieder
f2fabbf76e Teach Makefile to check header dependencies
Add a target to use the gcc-generated makefile snippets for
dependencies on header files to check the hard-coded dependencies.

With this patch applied, if any dependencies are missing, then

	make clean
	make COMPUTE_HEADER_DEPENDENCIES=YesPlease
	make CHECK_HEADER_DEPENDENCIES=YesPlease

will produce an error message like the following:

	CHECK fast-import.o
	missing dependencies: exec_cmd.h
	make: *** [fast-import.o] Error 1

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2010-01-27 02:47:43 -06:00
Jonathan Nieder
1b22c99c14 Makefile: list standalone program object files in PROGRAM_OBJS
Because of new commands like git-remote-http, the OBJECTS list
contains fictitious objects such as remote-http.o.  Thus any
out-of-tree rules that require all $(OBJECTS) to be buildable
are broken.  Add a list of real program objects to avoid this
problem.

To avoid duplication of effort, calculate the command list in
the PROGRAMS variable using the expansion of PROGRAM_OBJS.
This calculation occurs at the time $(PROGRAMS) is expanded,
so later additions to PROGRAM_OBJS will be reflected in it,
provided they occur before the build rules begin on line 1489.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2010-01-27 02:41:36 -06:00
Jonathan Nieder
dfea575017 Makefile: lazily compute header dependencies
Use the gcc -MMD -MP -MF options to generate dependency rules as
a byproduct when building .o files if the
COMPUTE_HEADER_DEPENDENCIES variable is defined.  That variable
is left undefined by default for now.

As each object file is built, write a makefile fragment
containing its dependencies in the deps/ subdirectory of its
containing directory.  The deps/ directories should be generated
if they are missing at the start of each build.  So let each
object file depend on $(missing_dep_dirs), which lists only the
directories of this kind that are missing to avoid needlessly
regenerating files when the directories' timestamps change.

gcc learned the -MMD -MP -MF options in version 3.0, so most gcc
users should have them by now.

The dependencies this option computes are more specific than the
rough estimates hard-coded in the Makefile, greatly speeding up
rebuilds when only a little-used header file has changed.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2010-01-26 10:08:55 -06:00
Jonathan Nieder
c373991375 Makefile: list generated object files in OBJECTS
Set the OBJECTS variable to a comprehensive list of all object
file targets.  To make sure it is truly comprehensive, restrict
the scope of the %.o pattern rule to only generate objects in
this list.

Attempts to build other object files will fail loudly:

	$ touch foo.c
	$ make foo.o
	make: *** No rule to make target `foo.o'.  Stop.

providing a reminder to add the new object to the OBJECTS list.

The new variable is otherwise unused.  The intent is for later
patches to take advantage of it.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2010-01-26 10:08:55 -06:00
Jonathan Nieder
30248886ce Makefile: disable default implicit rules
The git makefile never uses any default implicit rules.
Unfortunately, if a prerequisite for one of the intended rules is
missing, a default rule can be used in its place:

	$ make var.s
	    CC var.s
	$ rm var.c
	$ make var.o
	    as   -o var.o var.s

Avoiding the default rules avoids this hard-to-debug behavior.
It also should speed things up a little in the normal case.

Future patches may restrict the scope of the %.o: %.c pattern.
This patch would then ensure that for targets not listed, we do
not fall back to the default rule.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2010-01-26 10:08:55 -06:00
Jonathan Nieder
beeb4564bb Makefile: rearrange dependency rules
Put rules listing dependencies of compiled objects (.o files) on
header files (.h files) in one place, to make them easier to
compare and modify all at once.

Add a GIT_OBJS variable listing objects that depend on LIB_H,
for similar reasons.

No change in build-time behavior intended.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2010-01-26 10:08:55 -06:00
Jonathan Nieder
75df714487 Makefile: transport.o depends on branch.h now
Since commit e9fcd1e2 (Add push --set-upstream, 2010-01-16),
transport.c uses branch.h.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2010-01-26 10:08:54 -06:00
Jonathan Nieder
225f78c817 Merge branch 'master' of git://repo.or.cz/alt-git into jn/autodep
* 'master' of git://repo.or.cz/alt-git: (384 commits)
  am: fix patch format detection for Thunderbird "Save As" emails
  t0022: replace non-portable literal CR
  tests: consolidate CR removal/addition functions
  commit-tree: remove unused #define
  t5541-http-push: make grep expression check for one line only
  rebase: replace antiquated sed invocation
  Add test-run-command to .gitignore
  git_connect: use use_shell instead of explicit "sh", "-c"
  gitweb.js: Workaround for IE8 bug
  Make test numbers unique
  Windows: Remove dependency on pthreadGC2.dll
  Documentation: move away misplaced 'push --upstream' description
  Documentation: add missing :: in config.txt
  pull: re-fix command line generation
  Documentation: merge: use MERGE_HEAD to refer to the remote branch
  Documentation: simplify How Merge Works
  Documentation: merge: add a section about fast-forward
  Documentation: emphasize when git merge terminates early
  Documentation: merge: add an overview
  Documentation: merge: move merge strategy list to end
  ...

Conflicts:
	Makefile
2010-01-26 10:08:44 -06:00
Jonathan Nieder
3e6577b45e Makefile: drop dependency on $(wildcard */*.h)
The files this pulls in are already pulled in by other dependency
rules (some recently added).

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2010-01-26 10:07:34 -06:00
Jonathan Nieder
066ddda6cd Makefile: clean up http-walker.o dependency rules
http-walker.o depends on http.h twice: once in the rule listing
files that use http.h, and again in the rule explaining how to
build it.  Messy.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2010-01-26 10:07:34 -06:00
Jonathan Nieder
7a1894e303 Makefile: remove wt-status.h from LIB_H
A list of the few translation units using this header is
half-populated already.  Including the dependency on this header
twice (once explicitly, once through LIB_H) makes it difficult to
figure out where future headers should be added to the Makefile.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2010-01-26 10:07:34 -06:00
Jonathan Nieder
daa99a9172 Makefile: make sure test helpers are rebuilt when headers change
It is not worth the bother to maintain an up-to-date list of
which headers each test helper uses, so depend on $(LIB_H) to
catch them all.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2010-01-26 10:07:34 -06:00
Jonathan Nieder
21528abc36 Makefile: add missing header file dependencies
LIB_H is missing exec_cmd.h and color.h.  cache.h includes
SHA1_HEADER, and thus so does almost everything else, so add that
to LIB_H, too.  xdiff-interface.h is not included by any header
files, but so many source files use xdiff that it is simplest to
include it in LIB_H, too.

xdiff-interface.o uses the xdiff library heavily; let it depend
on all xdiff headers to avoid needing to keep track of which
headers it uses.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2010-01-26 10:07:33 -06:00
Michael Lukashov
767f8b31cb Windows: Remove dependency on pthreadGC2.dll
Commit 44626dc7 (MSVC: Windows-native implementation for subset
of threads API, 2010-01-15) introduces builtin replacement of
pthreadGC2.dll functionality, thus we can completely drop
dependency on this dll.

Signed-off-by: Michael Lukashov <michael.lukashov@gmail.com>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-24 11:13:48 -08:00
Linus Torvalds
3bb7256281 make "index-pack" a built-in
This required some fairly trivial packfile function 'const' cleanup,
since the builtin commands get a const char *argv[] array.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-22 10:10:27 -08:00
Linus Torvalds
377d0276ca make "git pack-redundant" a built-in
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-22 10:07:14 -08:00
Linus Torvalds
b53258182b make "git unpack-file" a built-in
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-22 10:02:16 -08:00
Linus Torvalds
112dd51465 make "mktag" a built-in
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-22 10:01:33 -08:00
Linus Torvalds
0ecace728f make "merge-index" a built-in
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-22 10:01:21 -08:00
Linus Torvalds
dedc0ec5d7 make "git patch-id" a built-in
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-21 22:06:12 -08:00
Linus Torvalds
55b6745d63 make "git var" a built-in
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-21 22:04:42 -08:00
Linus Torvalds
b28a1ce04c make "git hash-object" a built-in
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-21 20:07:06 -08:00
Linus Torvalds
907a7cb51c make "git merge-tree" a built-in
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-21 20:06:58 -08:00
Linus Torvalds
a5031214c4 slim down "git show-index"
As the documentation says, this is primarily for debugging, and
in the longer term we should rename it to test-show-index or something.

In the meantime, just avoid xmalloc (which slurps in the rest of git), and
separating out the trivial hex functions into "hex.o".

This results in

  [torvalds@nehalem git]$ size git-show-index
       text    data     bss     dec     hex filename
     222818    2276  112688  337782   52776 git-show-index (before)
       5696     624    1264    7584    1da0 git-show-index (after)

which is a whole lot better.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-21 20:03:45 -08:00
Junio C Hamano
6751e0471d Merge branch 'jc/cache-unmerge'
* jc/cache-unmerge:
  rerere forget path: forget recorded resolution
  rerere: refactor rerere logic to make it independent from I/O
  rerere: remove silly 1024-byte line limit
  resolve-undo: teach "update-index --unresolve" to use resolve-undo info
  resolve-undo: "checkout -m path" uses resolve-undo information
  resolve-undo: allow plumbing to clear the information
  resolve-undo: basic tests
  resolve-undo: record resolved conflicts in a new index extension section
  builtin-merge.c: use standard active_cache macros

Conflicts:
	builtin-ls-files.c
	builtin-merge.c
	builtin-rerere.c
2010-01-20 14:46:35 -08:00
Junio C Hamano
030b1a77f7 Merge branch 'js/exec-error-report'
* js/exec-error-report:
  Improve error message when a transport helper was not found
  start_command: detect execvp failures early
  run-command: move wait_or_whine earlier
  start_command: report child process setup errors to the parent's stderr

Conflicts:
	Makefile
2010-01-20 14:44:12 -08:00
Junio C Hamano
34349bea60 Merge branch 'jc/grep-lookahead'
* jc/grep-lookahead:
  grep --no-index: allow use of "git grep" outside a git repository
  grep: prepare to run outside of a work tree
  grep: rip out pessimization to use fixmatch()
  grep: rip out support for external grep
  grep: optimize built-in grep by skipping lines that do not hit

Conflicts:
	builtin-grep.c
	t/t7002-grep.sh
2010-01-20 14:43:41 -08:00
Johannes Sixt
4256f36c58 Makefile: honor NO_CURL when setting REMOTE_CURL_* variables
Previously, these variables were set before there was a chance to set
NO_CURL.

This made a difference only during 'make install', because by installing
$(REMOTE_CURL_ALIASES), the rule  tries to access $(REMOTE_CURL_PRIMARY),
which was never installed. On Windows, this fails; on Unix, stale symbolic
links are created.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Acked-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-19 15:27:40 -08:00
Junio C Hamano
3cd02df46a Merge branch 'js/windows'
* js/windows:
  Do not use date.c:tm_to_time_t() from compat/mingw.c
  MSVC: Windows-native implementation for subset of Pthreads API
  MSVC: Fix an "incompatible pointer types" compiler warning
  Windows: avoid the "dup dance" when spawning a child process
  Windows: simplify the pipe(2) implementation
  Windows: boost startup by avoiding a static dependency on shell32.dll
  Windows: disable Python
2010-01-18 18:12:49 -08:00
Junio C Hamano
a4c3616b19 Merge branch 'jn/makefile'
* jn/makefile:
  Makefile: consolidate .FORCE-* targets
  Makefile: learn to generate listings for targets requiring special flags
  Makefile: use target-specific variable to pass flags to cc
  Makefile: regenerate assembler listings when asked
2010-01-17 15:59:44 -08:00
Andrzej K. Haczewski
44626dc7d5 MSVC: Windows-native implementation for subset of Pthreads API
This patch implements native to Windows subset of pthreads API used by Git.
It allows to remove Pthreads for Win32 dependency for MSVC, msysgit and
Cygwin.

[J6t: If the MinGW build was built as part of the msysgit build
environment, then threading was already enabled because the
pthreads-win32 package is available in msysgit. With this patch, we can now
enable threaded code unconditionally.]

Signed-off-by: Andrzej K. Haczewski <ahaczewski@gmail.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-16 18:16:06 -08:00
Erik Faye-Lund
56932249cf Windows: disable Python
Python is not commonly installed on Windows machines, so
we should disable it there by default.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-16 16:43:49 -08:00
Junio C Hamano
bd33a29283 Merge branch 'il/vcs-helper'
* il/vcs-helper:
  Reset possible helper before reusing remote structure
  Remove special casing of http, https and ftp
  Support remote archive from all smart transports
  Support remote helpers implementing smart transports
  Support taking over transports
  Refactor git transport options parsing
  Pass unknown protocols to external protocol handlers
  Support mandatory capabilities
  Add remote helper debug mode

Conflicts:
	Documentation/git-remote-helpers.txt
	transport-helper.c
2010-01-13 12:30:39 -08:00
Junio C Hamano
73d66323ac Merge branch 'nd/sparse'
* nd/sparse: (25 commits)
  t7002: test for not using external grep on skip-worktree paths
  t7002: set test prerequisite "external-grep" if supported
  grep: do not do external grep on skip-worktree entries
  commit: correctly respect skip-worktree bit
  ie_match_stat(): do not ignore skip-worktree bit with CE_MATCH_IGNORE_VALID
  tests: rename duplicate t1009
  sparse checkout: inhibit empty worktree
  Add tests for sparse checkout
  read-tree: add --no-sparse-checkout to disable sparse checkout support
  unpack-trees(): ignore worktree check outside checkout area
  unpack_trees(): apply $GIT_DIR/info/sparse-checkout to the final index
  unpack-trees(): "enable" sparse checkout and load $GIT_DIR/info/sparse-checkout
  unpack-trees.c: generalize verify_* functions
  unpack-trees(): add CE_WT_REMOVE to remove on worktree alone
  Introduce "sparse checkout"
  dir.c: export excluded_1() and add_excludes_from_file_1()
  excluded_1(): support exclude files in index
  unpack-trees(): carry skip-worktree bit over in merged_entry()
  Read .gitignore from index if it is skip-worktree
  Avoid writing to buffer in add_excludes_from_file_1()
  ...

Conflicts:
	.gitignore
	Documentation/config.txt
	Documentation/git-update-index.txt
	Makefile
	entry.c
	t/t7002-grep.sh
2010-01-13 11:58:34 -08:00
Junio C Hamano
bbc09c22b9 grep: rip out support for external grep
We still allow people to pass --[no-]ext-grep on the command line,
but the option is ignored.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-13 01:04:54 -08:00
Johannes Sixt
2b541bf8be start_command: detect execvp failures early
Previously, failures during execvp could be detected only by
finish_command. However, in some situations it is beneficial for the
parent process to know earlier that the child process will not run.

The idea to use a pipe to signal failures to the parent process and
the test case were lifted from patches by Ilari Liusvaara.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-10 10:15:03 -08:00
Junio C Hamano
79f6ce5717 Merge branch 'mo/bin-wrappers'
* mo/bin-wrappers:
  INSTALL: document a simpler way to run uninstalled builds
  run test suite without dashed git-commands in PATH
  build dashless "bin-wrappers" directory similar to installed bindir
2010-01-07 15:35:52 -08:00
Jonathan Nieder
13fca9f36b Makefile: consolidate .FORCE-* targets
Providing multiple targets to force a rebuild is unnecessary
complication.

Avoid using a name that could conflict with future special
targets in GNU make (a leading period followed by uppercase
letters).

The corresponding change to the git-gui Makefile is left for
another patch.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-06 01:33:45 -08:00
Jonathan Nieder
de54e67c1a Makefile: learn to generate listings for targets requiring special flags
'make git.s' to debug code generation of main() fails because
git.c makes use of preprocessor symbols such as GIT_VERSION that
are not set.  make does not generate code listings for
builtin_help.c, exec_cmd.c, builtin-init-db.c, config.c, http.c,
or http-walker.c either, for the same reason.

So pass the flags used to generate each .o file when generating
the corresponding assembler listing.

Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-06 01:33:35 -08:00
Jonathan Nieder
373a5ede53 Makefile: use target-specific variable to pass flags to cc
This allows reusing the standard %.o: %.c pattern rule even for
targets that require special flags to be set.  Thus after this
change, any changes in the command for compilation only have to
be performed in one place.

Target-specific variables have been supported in GNU make since
version 3.77, which has been available since 1998.

Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-06 01:33:22 -08:00
Jonathan Nieder
31838b4dcd Makefile: regenerate assembler listings when asked
'make var.s' fails to regenerate an assembler listing if var.c
has not changed but a header it includes has:

	$ make var.s
	    CC var.s
	$ touch cache.h
	$ make var.s
	$

The corresponding problem for 'make var.o' does not occur because
the Makefile lists dependencies for each .o target explicitly;
analogous dependency rules for the .s targets are not present.
Rather than add some, it seems better to force 'make' to always
regenerate assembler listings, since the assembler listing
targets are only invoked when specifically requested on the make
command line.

Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-06 01:33:02 -08:00
Jonathan Nieder
4ecbc65fa7 Makefile: make ppc/sha1ppc.o depend on GIT-CFLAGS
The %.o: %.S pattern rule should depend on GIT-CFLAGS to avoid
trouble when ALL_CFLAGS changes.

The pattern only applies to one file (ppc/sha1ppc.S) and that
file does not use any #ifdefs, so leaving the dependency out is
probably harmless.  Nevertheless, it is safer to include the
dependency in case future code's behavior does depend on the
build flags.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-05 22:40:58 -08:00
Ilari Liusvaara
28ca0c9008 Remove special casing of http, https and ftp
HTTP, HTTPS and FTP are no longer special to transport code. Also
add support for FTPS (curl supports it so it is easy).

Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-28 00:24:15 -08:00
Junio C Hamano
1d85dd6fb2 Merge branch 'maint'
* maint:
  Makefile: FreeBSD (both 7 and 8) needs OLD_ICONV
  Start 1.6.6.X maintenance track
  Add git-http-backend to command-list.
  t4019 "grep" portability fix
  t1200: work around a bug in some implementations of "find"

Conflicts:
	RelNotes
2009-12-26 14:33:05 -08:00
Junio C Hamano
21a0d9b42d Makefile: FreeBSD (both 7 and 8) needs OLD_ICONV
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-26 14:32:36 -08:00
Junio C Hamano
e74f43f9b7 Merge branch 'sr/vcs-helper'
* sr/vcs-helper:
  tests: handle NO_PYTHON setting
  builtin-push: don't access freed transport->url
  Add Python support library for remote helpers
  Basic build infrastructure for Python scripts
  Allow helpers to report in "list" command that the ref is unchanged
  Fix various memory leaks in transport-helper.c
  Allow helper to map private ref names into normal names
  Add support for "import" helper command
  Allow specifying the remote helper in the url
  Add a config option for remotes to specify a foreign vcs
  Allow fetch to modify refs
  Use a function to determine whether a remote is valid
  Allow programs to not depend on remotes having urls
  Fix memory leak in helper method for disconnect

Conflicts:
	Documentation/git-remote-helpers.txt
	Makefile
	builtin-ls-remote.c
	builtin-push.c
	transport-helper.c
2009-12-26 14:03:16 -08:00
Junio C Hamano
cfc5789ada resolve-undo: record resolved conflicts in a new index extension section
When resolving a conflict using "git add" to create a stage #0 entry, or
"git rm" to remove entries at higher stages, remove_index_entry_at()
function is eventually called to remove unmerged (i.e. higher stage)
entries from the index.  Introduce a "resolve_undo_info" structure and
keep track of the removed cache entries, and save it in a new index
extension section in the index_state.

Operations like "read-tree -m", "merge", "checkout [-m] <branch>" and
"reset" are signs that recorded information in the index is no longer
necessary.  The data is removed from the index extension when operations
start; they may leave conflicted entries in the index, and later user
actions like "git add" will record their conflicted states afresh.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-25 17:10:10 -08:00
Jeff King
ac10a85785 tests: handle NO_PYTHON setting
Without this, test-lib checks that the git_remote_helpers
directory has been built. However, if we are building
without python, we will not have done anything at all in
that directory, and test-lib's sanity check will fail.

We bump the inclusion of GIT-BUILD-OPTIONS further up in
test-lib; it contains configuration, and as such should be
read before we do any checks (and in this particular case,
we need its value to do our check properly).

Signed-off-by: Jeff King <peff@peff.net>
Looks-fine-to-me-by: Brandon Casey <brandon.casey.ctr@nrlssc.navy.mil>
Acked-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-07 00:41:51 -08:00
Junio C Hamano
a24a32ddb3 Merge branch 'master' into il/vcs-helper
* master: (334 commits)
  bash: update 'git commit' completion
  Git 1.6.5.5
  Fix diff -B/--dirstat miscounting of newly added contents
  reset: improve worktree safety valves
  Documentation: Avoid use of xmlto --stringparam
  archive: clarify description of path parameter
  rerere: don't segfault on failure to open rr-cache
  Prepare for 1.6.5.5
  gitweb: Describe (possible) gitweb.js minification in gitweb/README
  Documentation: xmlto 0.0.18 does not know --stringparam
  Fix crasher on encountering SHA1-like non-note in notes tree
  t9001: use older Getopt::Long boolean prefix '--no' rather than '--no-'
  t4201: use ISO8859-1 rather than ISO-8859-1
  Git 1.6.5.4
  Unconditionally set man.base.url.for.relative.links
  Documentation/Makefile: allow man.base.url.for.relative.link to be set from Make
  Git 1.6.6-rc1
  git-pull.sh: Fix call to git-merge for new command format
  Prepare for 1.6.5.4
  merge: do not add standard message when message is given with -m option
  ...

Conflicts:
	Documentation/git-remote-helpers.txt
	Makefile
	builtin-ls-remote.c
	builtin-push.c
	transport-helper.c

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-06 22:40:16 -08:00
Matthew Ogilvie
ea925196f1 build dashless "bin-wrappers" directory similar to installed bindir
The new bin-wrappers directory contains wrapper scripts
for executables that will be installed into the standard
bindir.  It explicitly does not contain most dashed-commands.
The scripts automatically set environment variables to run out
of the source tree, not the installed directory.

This will allow running the test suite without dashed commands in
the PATH.  It also provides a simplified way to test run custom
built git executables without installing them first.

bin-wrappers also contains wrappers for some test suite support
executables, where the test suite will soon make use of them.

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-03 11:37:47 -08:00
Junio C Hamano
8678bc09e3 Merge branch 'jn/gitweb-blame'
* jn/gitweb-blame:
  gitweb: Add link to other blame implementation in blame views
  gitweb: Make linking to actions requiring JavaScript a feature
  gitweb.js: fix padLeftStr() and its usage
  gitweb.js: Harden setting blamed commit info in incremental blame
  gitweb.js: fix null object exception in initials calculation
  gitweb: Minify gitweb.js if JSMIN is defined
  gitweb: Create links leading to 'blame_incremental' using JavaScript
  gitweb: Colorize 'blame_incremental' view during processing
  gitweb: Incremental blame (using JavaScript)
  gitweb: Add optional "time to generate page" info in footer

Conflicts:
	Makefile
	gitweb/gitweb.css
2009-12-01 11:28:15 -08:00
Jonathan Nieder
7fc9d1526e Makefile: do not clean arm directory
The ARM SHA-1 implementation was removed by commit 30ae47b
(remove ARM and Mozilla SHA1 implementations, 2009-08-17).  Prune
its directory from the list of object files to delete in 'make
clean'.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-28 10:09:56 -08:00
Sverre Rabbelier
2fe40b6300 Add Python support library for remote helpers
This patch introduces parts of a Python package called
"git_remote_helpers" containing the building blocks for
remote helpers written in Python.

No actual remote helpers are part of this patch, this patch only
includes the common basics needed to start writing such helpers.

The patch includes the necessary Makefile additions to build and
install the git_remote_helpers Python package along with the rest of
Git.

This patch is based on Johan Herland's git_remote_cvs patch and
has been improved by the following contributions:
- David Aguilar: Lots of Python coding style fixes
- David Aguilar: DESTDIR support in Makefile

Cc: David Aguilar <davvid@gmail.com>
Cc: Johan Herland <johan@herland.net>
Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-24 15:50:20 -08:00
Junio C Hamano
ba2c747688 Merge branch 'rj/maint-cygwin-count-objects'
* rj/maint-cygwin-count-objects:
  git-count-objects: Fix a disk-space under-estimate on Cygwin
2009-11-24 15:42:55 -08:00
Martin Storsjö
fe3b2b7b82 Enable support for IPv6 on MinGW
The IPv6 support functions are loaded dynamically, to maintain backwards
compatibility with versions of Windows prior to XP, and fallback wrappers
are provided, implemented in terms of gethostbyname and gethostbyaddr.

Signed-off-by: Martin Storsjo <martin@martin.st>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-24 00:58:17 -08:00
Junio C Hamano
37e3b6104e Merge branch 'pb/maint-use-custom-perl'
* pb/maint-use-custom-perl:
  Make sure $PERL_PATH is defined when the test suite is run.
2009-11-22 16:28:46 -08:00
Junio C Hamano
885d492f69 Merge branch 'jh/notes' (early part)
* 'jh/notes' (early part):
  Add selftests verifying concatenation of multiple notes for the same commit
  Refactor notes code to concatenate multiple notes annotating the same object
  Add selftests verifying that we can parse notes trees with various fanouts
  Teach the notes lookup code to parse notes trees with various fanout schemes
  Teach notes code to free its internal data structures on request
  Add '%N'-format for pretty-printing commit notes
  Add flags to get_commit_notes() to control the format of the note string
  t3302-notes-index-expensive: Speed up create_repo()
  fast-import: Add support for importing commit notes
  Teach "-m <msg>" and "-F <file>" to "git notes edit"
  Add an expensive test for git-notes
  Speed up git notes lookup
  Add a script to edit/inspect notes
  Introduce commit notes

Conflicts:
	.gitignore
	Documentation/pretty-formats.txt
	pretty.c
2009-11-20 23:53:55 -08:00
Junio C Hamano
905bf7742c Merge branch 'sp/smart-http'
* sp/smart-http: (37 commits)
  http-backend: Let gcc check the format of more printf-type functions.
  http-backend: Fix access beyond end of string.
  http-backend: Fix bad treatment of uintmax_t in Content-Length
  t5551-http-fetch: Work around broken Accept header in libcurl
  t5551-http-fetch: Work around some libcurl versions
  http-backend: Protect GIT_PROJECT_ROOT from /../ requests
  Git-aware CGI to provide dumb HTTP transport
  http-backend: Test configuration options
  http-backend: Use http.getanyfile to disable dumb HTTP serving
  test smart http fetch and push
  http tests: use /dumb/ URL prefix
  set httpd port before sourcing lib-httpd
  t5540-http-push: remove redundant fetches
  Smart HTTP fetch: gzip requests
  Smart fetch over HTTP: client side
  Smart push over HTTP: client side
  Discover refs via smart HTTP server when available
  http-backend: more explict LocationMatch
  http-backend: add example for gitweb on same URL
  http-backend: use mod_alias instead of mod_rewrite
  ...

Conflicts:
	.gitignore
	remote-curl.c
2009-11-20 23:51:23 -08:00
Junio C Hamano
376f39fbea Merge branch 'jn/editor-pager'
* jn/editor-pager:
  Provide a build time default-pager setting
  Provide a build time default-editor setting
  am -i, git-svn: use "git var GIT_PAGER"
  add -i, send-email, svn, p4, etc: use "git var GIT_EDITOR"
  Teach git var about GIT_PAGER
  Teach git var about GIT_EDITOR
  Suppress warnings from "git var -l"
  Do not use VISUAL editor on dumb terminals
  Handle more shell metacharacters in editor names
2009-11-20 23:48:52 -08:00
Junio C Hamano
7a4383cf13 Merge branch 'rj/cygwin-msvc'
* rj/cygwin-msvc:
  MSVC: Add support for building with NO_MMAP
  Makefile: keep MSVC and Cygwin configuration separate
2009-11-20 23:48:11 -08:00
Junio C Hamano
8102453318 Merge branch 'rj/maint-simplify-cygwin-makefile'
* rj/maint-simplify-cygwin-makefile:
  Makefile: merge two Cygwin configuration sections into one
2009-11-20 23:47:43 -08:00
Junio C Hamano
750054cd3f Merge branch 'jn/help-everywhere'
* jn/help-everywhere: (23 commits)
  diff --no-index: make the usage string less scary
  merge-{recursive,subtree}: use usagef() to print usage
  Introduce usagef() that takes a printf-style format
  Let 'git <command> -h' show usage without a git dir
  Show usage string for 'git http-push -h'
  Let 'git http-fetch -h' show usage outside any git repository
  Show usage string for 'git stripspace -h'
  Show usage string for 'git unpack-file -h'
  Show usage string for 'git show-index -h'
  Show usage string for 'git rev-parse -h'
  Show usage string for 'git merge-one-file -h'
  Show usage string for 'git mailsplit -h'
  Show usage string for 'git imap-send -h'
  Show usage string for 'git get-tar-commit-id -h'
  Show usage string for 'git fast-import -h'
  Show usage string for 'git check-ref-format -h'
  http-fetch: add missing initialization of argv0_path
  Show usage string for 'git show-ref -h'
  Show usage string for 'git merge-ours -h'
  Show usage string for 'git commit-tree -h'
  ...

Conflicts:
	imap-send.c
2009-11-20 23:44:52 -08:00