Commit graph

6060 commits

Author SHA1 Message Date
Ryan Anderson 7c49cb2881 annotate: Fix bug when parsing merges with differing real and logical parents.
Signed-off-by: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-07 11:46:04 -07:00
Ryan Anderson 1dcb69224c log-tree: show_log() should respect the setting of diffopt->line_termination
Signed-off-by: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-07 11:38:53 -07:00
Michael Krelin b20805af60 handle https:// protocol in git-clone
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-07 11:35:16 -07:00
Junio C Hamano b7e58b17b5 Racy git: avoid having to be always too careful
Immediately after a bulk checkout, most of the paths in the
working tree would have the same timestamp as the index file,
and this would force ce_match_stat() to take slow path for all
of them.  When writing an index file out, if many of the paths
have very new (read: the same timestamp as the index file being
written out) timestamp, we are better off delaying the return
from the command, to make sure that later command to touch the
working tree files will leave newer timestamps than recorded in
the index, thereby avoiding to take the slow path.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-07 01:58:53 -07:00
Jakub Narebski d5c31a1ccf autoconf: Unset NO_STH and NEED_STH when it is detected not needed
When configure detects some NO_XXX or NEEDS_XXX is unneeded, unset
this variable (actually set it to empty string).  This allow
autodetection to override the default set in Makefile.

[jc: while at it fixed a thinko in IPv6 detection.]

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-07 01:22:13 -07:00
Matthias Lederhofer dd04c428cf gitweb: fix $project usage
There were some places where $project was used even if it was not
defined.

Signed-off-by: Matthias Lederhofer <matled@gmx.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-06 13:50:43 -07:00
Matthias Lederhofer 1568515d5b gitweb: fix commitdiff_plain for root commits
Signed-off-by: Matthias Lederhofer <matled@gmx.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-06 13:42:41 -07:00
Jakub Narebski e349d21ab4 gitweb: Skip nonmatching lines in difftree output, consistently
This fixes error for commitdiff on root commit (without parents).

Noticed-by: Matthias Lederhofer (matled)
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-06 13:42:39 -07:00
Jakub Narebski b5ff2cf9a6 gitweb: fix commitdiff for root commits
After changing all "-|" open invocations to list form, commitdiff for
initial commit (without parent) got broken; it returned incorrectly
empty patch earlier.  Use '--root' option to git-diff-tree for initial
(root) commit.

No checking for empty $hash_parent in git_commitdiff_plain -- we rely
on gitweb to give correct parameters for commitdiff_plain action.

Noticed by Matthias Lederhofer (matled).

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-06 13:41:49 -07:00
Matthias Lederhofer bd943f4757 gitweb: check if HTTP_ACCEPT is really set
Signed-off-by: Matthias Lederhofer <matled@gmx.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-06 13:40:19 -07:00
Matthias Kestenholz 403ccc4f36 Add gitweb.cgi to .gitignore
Signed-off-by: Matthias Kestenholz <matthias@spinlock.ch>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-06 13:38:14 -07:00
Jakub Narebski f16db173a4 gitweb: Refactor untabifying - converting tabs to spaces
Add untabify subroutine and use it.  It also fixes git_diff_print
which used to get the tabstop wrong.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-06 02:00:32 -07:00
Jakub Narebski 10161355ba gitweb: Inline $rss_link
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-06 02:00:32 -07:00
Jakub Narebski 668e34d7cc gitweb: PATH_INFO=/ means no project
Prepared for refactoring input validation.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-06 01:59:45 -07:00
Jakub Narebski e2860ead31 gitweb: No error messages with unescaped/unprotected user input
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-06 01:59:36 -07:00
Jakub Narebski cac4bd94fb gitweb: No periods for error messages
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Acked-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-06 01:58:21 -07:00
Jakub Narebski e484a2d6ad gitweb: Cleanup and uniquify error messages
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-06 01:53:54 -07:00
Jakub Narebski dbd954a896 gitweb: Don't undefine query parameter related variables before die_error
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-06 01:53:38 -07:00
Jakub Narebski 623e4aeb42 gitweb: Use undef for die_error to use default first (status) parameter value
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-06 01:53:26 -07:00
Jakub Narebski cfd8266936 gitweb: die_error first (optional) parameter is HTTP status
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-06 01:53:16 -07:00
Jakub Narebski 154b4d78cf gitweb: Separate input validation and dispatch, add comment about opml action
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-06 01:52:51 -07:00
Junio C Hamano f25b79397c Fix "grep -w"
We used to find the first match of the pattern and then if the
match is not for the entire word, declared that the whole line
does not match.

But that is wrong.  The command "git grep -w -e mmap" should
find that a line "foo_mmap bar mmap baz" matches, by tring the
second instance of pattern "mmap" on the same line.

Problems an earlier round of "fix" had were pointed out by Morten
Welinder, which have been incorporated in the t7002 tests.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-06 01:37:08 -07:00
Junio C Hamano 0d958ac47a Makefile: Cygwin does not seem to need NO_STRLCPY
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-05 13:52:05 -07:00
Ramsay Jones 19c4588178 commit walkers: setup_ident() to record correct committer in ref-log.
The function pull() in fetch.c calls write_ref_sha1(), which may
need committer identity to update the ref-log, so they need to
call setup_ident() before calling git_config() function.

Acked-by: Shawn Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-05 13:51:58 -07:00
Johannes Schindelin 61ffbcb988 http-push: avoid fork() by calling merge_bases() directly
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-04 17:40:50 -07:00
Ramsay Jones 07efc6a6b6 Allow config file to specify Signed-off-by identity in format-patch.
Unlike git-commit, git-format-patch was not picking up and using the
user.email config variable for the email part of the committer info.
I was forced to use the GIT_COMMITTER_EMAIL environment variable to
override the default <user@localhost.localdomain>. The fix was to
simply move the call to setup_ident() to come before the git_config()
call.

Signed-off-by: Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-04 17:30:24 -07:00
Luben Tuikov f9f02d0129 gitweb: git_tree displays blame based on repository config
git_tree() will now conditionally display "blame"
depending on how "gitweb.blame" variable is configured
using "git-repo-config".

Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-04 17:21:41 -07:00
Junio C Hamano 8c6ab35efe autoconf: NO_IPV6
We would need both "struct addrinfo" and getaddrinfo()
available.  Check them and set NO_IPV6 otherwise.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-04 16:46:16 -07:00
Jakub Narebski f7b5e8d03a autoconf: Set NEEDS_LIBICONV unconditionally if there is no iconv in libc
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-04 16:34:30 -07:00
Junio C Hamano 3068f6c47d autoconf: fix NEEDS_SSL_WITH_CRYPTO
NEEDS_SSL_WITH_CRYPTO means you cannot just say "-lcrypto" to
use SHA1 stuff, but need to say "-lcrypto -lssl".

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-04 16:33:18 -07:00
Junio C Hamano 4e273c9dcf Merge branch 'jc/c99'
* jc/c99:
  Cygwin needs NO_C99_FORMAT???
2006-08-04 12:09:53 -07:00
Jakub Narebski 34d4a67f47 Copy description of new build configuration variables to configure.ac
Copy description of new build configuration variables from the
commentary in the top Makefile, namely NO_FINK and NO_DARWIN_PORTS
configuration variables, putting them in site configuration section.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-04 11:55:42 -07:00
Jakub Narebski 465e649d0c autoconf: Typo cleanup, reordering etc.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-04 11:53:13 -07:00
Jakub Narebski 656517b9ef autoconf: Check for ll hh j z t size specifiers introduced by C99
Add custom test for checking whether formatted IO functions
(printf/scanf et.al.) support 'size specifiers' introduced by C99,
namely ll, hh, j, z, t. (representing long long int, char, intmax_t,
size_t, ptrdiff_t).

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-04 11:46:27 -07:00
Johannes Schindelin 3a3c3fc42a Fix crash when GIT_DIR is invalid
We used to test if a pointer was NULL, and if it was, try to access it.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-04 11:30:19 -07:00
Rene Scharfe 7e18e56920 git-tar-tree: fix minor memory leak
Free the root tree object buffer when we're done, plugging a minor leak
in generate_tar().  Note: we cannot simply free(tree.buf) because this
pointer is modified by tree_entry() calls in traverse_tree().

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-04 02:08:20 -07:00
Uwe Zeisberger d249b45547 Document rev-list's option --merge
Signed-off-by: Uwe Zeisberger <Uwe_Zeisberger@digi.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-04 02:08:02 -07:00
Junio C Hamano efffea0334 git.c: Rename NEEDS_PREFIX to RUN_SETUP
As Matthias Kestenholz noted, the flag does not quite mean
"needs prefix" -- it is more like "run setup_git_directory()
before running this command", so rename it to avoid future
confusion.

While we are at it, rewrite the definition of options to make it
obvious that we are talking about flag bits by using standard (1<<n)
notation.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-04 02:04:00 -07:00
Junio C Hamano f754fa9c54 builtins: Makefile clean-up
This cleans up the build procedure for built-in commands by:

 - generating mostly redundant definition of BUILT_INS from
   BUILTIN_OBJS in the Makefile,
 - renaming a few files to make the above possible, and
 - sorting the built-in command table in git.c.

It might be a good idea to binary search (or perfect hash) the built-in
command table, but that can be done later when somebody feels like.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-04 01:51:04 -07:00
Junio C Hamano e414156ab6 Make git-checkout-index a builtin
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-04 01:23:19 -07:00
Matthias Kestenholz 640ce1052b Make git-symbolic-ref a builtin
Signed-off-by: Matthias Kestenholz <matthias@spinlock.ch>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-03 23:15:11 -07:00
Matthias Kestenholz 6441363079 Make git-unpack-objects a builtin
Signed-off-by: Matthias Kestenholz <matthias@spinlock.ch>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-03 23:15:11 -07:00
Matthias Kestenholz 5d4a600335 Make git-pack-objects a builtin
Signed-off-by: Matthias Kestenholz <matthias@spinlock.ch>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-03 23:15:11 -07:00
Matthias Kestenholz d6b64ed0f3 Make git-name-rev a builtin
Signed-off-by: Matthias Kestenholz <matthias@spinlock.ch>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-03 23:15:11 -07:00
Junio C Hamano cba05fa840 Further clean-up: usage() vs die()
This hopefully finishes the clean-up Ramsay started with recent
commit 15e593e4d3 and commit
8cdf33643d.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-03 21:55:41 -07:00
Ramsay Allan Jones 8cdf33643d Replace some calls to die(usage_str) with usage(usage_str).
The only change in behaviour should be having a "usage: " prefix
on the output string rather than "fatal: ", and an exit code of
129 rather than 128.

Signed-off-by: Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-03 21:44:13 -07:00
Ramsay Allan Jones 15e593e4d3 Fixup command names in some usage strings.
Most usage strings, such as for command xxx, start with "git-xxx".
This updates the rebels to conform to the general pattern.
(The git wrapper is an exception to this, of course ...)

Signed-off-by: Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-03 21:38:24 -07:00
Junio C Hamano 5a716826a6 GIT 1.4.2-rc3
We ended up merging too many stuff after -rc2, so here is
another round of release candidate.  Non bugfixes will be
queued to "next" from now on until a real 1.4.2 happens.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-03 16:40:20 -07:00
Junio C Hamano f5fffbd3e8 Documentation/git.txt: link git-svn and git-instaweb from the main page.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-03 16:28:24 -07:00
Junio C Hamano 962ad61874 Merge branch 'jc/sideband'
* jc/sideband:
  sideband: do not use color, just say "remote:"
  fetch/clone: mark messages from remote side stand out.
2006-08-03 16:02:14 -07:00