* 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
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>
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>
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>
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>
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>
* maint:
Makefile: reenable install with NO_CURL
completion: --set-upstream option for git-branch
get_cwd_relative(): do not misinterpret suffix as subdirectory
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>
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>
* 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
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>
* 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
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>
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>
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>
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>
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>
* 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
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>
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.
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>
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>
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>
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>
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>
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>
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>
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>
"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>
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>
* 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
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>
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>
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>
* 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
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>