1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-02 16:26:10 +02:00
Commit Graph

1465 Commits

Author SHA1 Message Date
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
2170422790.
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