Commit Graph

9780 Commits

Author SHA1 Message Date
Arjen Laarhoven
e4e92b3f4b Document 'opendiff' value in config.txt and git-mergetool.txt
Signed-off-by: Arjen Laarhoven <arjen@yaph.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-03 22:56:23 -07:00
Bryan Larsen
5318f69812 Allow PERL_PATH="/usr/bin/env perl"
There is a mechanism PERL_PATH in the Makefile to specify path to
Perl binary, but sometimes it is convenient to let 'env' figure
out where Perl comes from, with PERL_PATH="/usr/bin/env perl".

Allowing this would make things easier to MacPorts, where we wish
to work with the MacPorts perl if it is installed, but fall back
to the system perl if it isn't.

Signed-off-by: Bryan Larsen <bryan@larsen.st>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-03 22:36:32 -07:00
Daniel Barkalow
5094102e13 Make xstrndup common
This also improves the implementation to match how strndup is
specified (by GNU): if the length given is longer than the string,
only the string's length is allocated and copied, but the string need
not be null-terminated if it is at least as long as the given length.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-03 22:28:55 -07:00
Junio C Hamano
cdda666201 diff.c: fix "size cache" handling.
We broke the size-cache handling when we changed the function
signature of sha1_object_info() in 21666f1a.  We obviously
wanted to cache the size we obtained when sha1_object_info()
succeeded, not when it failed.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-03 22:12:40 -07:00
Alexandre Julliard
9cf04301b1 http-fetch: Disable use of curl multi support for libcurl < 7.16.
curl_multi_remove_handle() is broken in libcurl < 7.16, in that it
doesn't correctly update the active handles count when a request is
aborted. This causes the transfer to hang forever waiting for the
handle count to become less than the number of active requests.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-03 22:12:40 -07:00
Junio C Hamano
50acc58914 blame: use .mailmap unconditionally
There really isn't any point in turning off .mailmap.  The
number of mailmap lookups are bounded by number of lines in the
target file, and the real blame processing is much more
expensive.  If it turns out to be too costly, we should optimize
the mailmap lookup itself, instead of avoiding the call.

If the author information of commits of the project are
relatively clean, .mailmap would have only small number of
entries, and the overhead of looking it up will not be high.  On
the other hand, if the author information is really screwed up
that a good .mailmap needs to be maintained to run shortlog,
giving uncleaned names in blame output is not helpful at all
either.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-03 00:03:15 -07:00
Junio C Hamano
6644d2f2c4 Merge branch 'maint'
* maint:
  cvsserver: Handle re-added files correctly
  Fix compilation of test-delta
2007-05-02 11:27:31 -07:00
Junio C Hamano
7a33b0bfce Merge branch 'maint' of git://repo.or.cz/git/fastimport into maint
* 'maint' of git://repo.or.cz/git/fastimport:
  Teach import-tars about GNU tar's @LongLink extension.
2007-05-02 11:00:16 -07:00
Frank Lichtenheld
a7da9adb1f cvsserver: Handle re-added files correctly
We can't unconditionally assign revision 1.1 to
newly added files. In case the file did exist in the
past and was deleted we need to honor the old
revision number.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-02 10:41:52 -07:00
Shawn O. Pearce
b3431bc603 Don't use seq in tests, not everyone has it
For example Mac OS X lacks the seq command.  So we cannot use it
there.  A good old while loop works just as good.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-05-02 13:24:23 -04:00
Shawn O. Pearce
cbc6bdab08 Reuse fixup_pack_header_footer in index-pack
Now that fast-import is using a "library function" to handle
correcting its packfile's object count and trailing SHA-1 we
should reuse the same function in index-pack, to reduce the
size of the code we must maintain.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-05-02 13:24:21 -04:00
Dana L. How
8b0eca7c7b Create pack-write.c for common pack writing code
Include a generalized fixup_pack_header_footer() in this new file.
Needed by git-repack --max-pack-size feature in a later patchset.

[sp: Moved close(pack_fd) to callers, to support index-pack, and
     changed name to better indicate it is for packfiles.]

Signed-off-by: Dana L. How <danahow@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-05-02 13:24:18 -04:00
Shawn O. Pearce
db81e67a7d Merge branch 'gfi-maint' into gfi-master
* gfi-maint:
  Teach import-tars about GNU tar's @LongLink extension.
2007-05-02 13:24:10 -04:00
Johannes Schindelin
775477aa1d Teach import-tars about GNU tar's @LongLink extension.
This extension allows GNU tar to process file names in excess of the 100
characters defined by the original tar standard. It does this by faking a
file, named '././@LongLink' containing the true file name, and then adding
the file with a truncated name. The idea is that tar without this
extension will write out a file with the long file name, and write the
contents into a file with truncated name.

Unfortunately, GNU tar does a lousy job at times. When truncating results
in a _directory_ name, it will happily use _that_ as a truncated name for
the file.

An example where this actually happens is gcc-4.1.2, where the full path
of the file WeThrowThisExceptionHelper.java truncates _exactly_ before the
basename. So, we have to support that ad-hoc extension.

This bug was noticed by Chris Riddoch on IRC.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-05-02 13:22:34 -04:00
Shawn O. Pearce
c6a5e40303 git-gui: Track our own embedded values and rebuild when they change
Like core-Git we now track the values that we embed into our shell
script wrapper, and we "recompile" that wrapper if they are changed.
This concept was lifted from git.git's Makefile, where a similar
thing was done by Eygene Ryabinkin.  Too bad it wasn't just done
here in git-gui from the beginning, as the git.git Makefile support
for GIT-GUI-VARS was really just because git-gui doesn't do it on
its own.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-05-02 13:06:11 -04:00
Shawn O. Pearce
dc6716b83d git-gui: Refactor to use our git proc more often
Whenever we want to execute a git subcommand from the plumbing
layer (and on rare occasion, the more porcelain-ish layer) we
tend to use our proc wrapper, just to make the code slightly
cleaner at the call sites.  I wasn't doing that in a couple of
places, so this is a simple cleanup to correct that.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-05-02 13:06:11 -04:00
Shawn O. Pearce
7416bbc65c git-gui: Use option database defaults to set the font
Rather than passing "-font font_ui" to every widget that we
create we can instead reconfigure the option database for
all widget classes to use our font_ui as the default widget
font.  This way Tk will automatically setup their defaults
for us, and we can reduce the size of the application.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-05-02 13:06:10 -04:00
Shawn O. Pearce
2739291b77 git-gui: Cleanup common font handling for font_ui
An earlier change tossed these optionMenu font configurations
all over the code, when really we can just rename the proc to
a hidden internal name and provide our own wrapper to install
the font configuration we really want.

We also don't need to set these option database entries in all
of the procedures that open dialogs; instead we should just set
one time, them after we have the font configuration ready for use.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-05-02 13:06:10 -04:00
Shawn O. Pearce
d45b52b540 git-gui: Correct line wrapping for too many branch message
Since Tk automatically wraps lines for us in tk_messageBox
widgets we don't need to try to wrap them ourselves.  Its
actually worse that we linewrapped this here in the script,
as not all fonts will render this dialog nicely.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-05-02 13:06:10 -04:00
Shawn O. Pearce
1afd1ec107 git-gui: Warn users before making an octopus merge
A coworker who was new to git-gui recently tried to make an octopus
merge when he did not quite mean to.  Unfortunately in his case the
branches had file level conflicts and failed to merge with the octopus
strategy, and he didn't quite know why this happened.  Since most users
really don't want to perform an octopus merge this additional safety
valve in front of the merge process is a good thing.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-05-02 13:06:09 -04:00
Shawn O. Pearce
2f1a955b99 git-gui: Include the subject in the status bar after commit
Now that the command line git-commit has made displaying
the subject (first line) of the newly created commit popular
we can easily do the same thing here in git-gui, without the
ugly part of forking off a child process to obtain that first
line.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-05-02 13:06:09 -04:00
Shawn O. Pearce
3f28f63f5a Merge branch 'maint'
* maint:
  git-gui: Allow spaces in path to 'wish'
2007-05-02 12:45:31 -04:00
Shawn O. Pearce
681bfd59ce git-gui: Allow spaces in path to 'wish'
If the path of our wish executable that are running under
contains spaces we need to make sure they are escaped in
a proper Tcl list, otherwise we are unable to start gitk.

Reported by Randal L. Schwartz on #git.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-05-02 12:44:44 -04:00
Martin Koegler
adb7b5fc86 Fix compilation of test-delta
The code used write_in_full() without pulling its declarations from the
header file.  When header is included, usage[] collides with usage()
function.

Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-01 02:59:08 -07:00
Junio C Hamano
4c16112494 GIT v1.5.2-rc1
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-30 17:30:02 -07:00
Junio C Hamano
07c785dbb7 Merge branch 'maint'
* maint:
  GIT v1.5.1.3
  send-email documentation: clarify --smtp-server
  git.7: Mention preformatted html doc location
  Clarify SubmittingPatches Checklist
  git-svn: Add 'find-rev' command
  Fix symlink handling in git-svn, related to PerlIO
2007-04-30 17:16:19 -07:00
Junio C Hamano
b5cc62f701 GIT v1.5.1.3
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-30 17:09:48 -07:00
Alex Riesen
fe5d30b630 Include mailmap.h in mailmap.c to catch mailmap interface changes
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-30 16:57:59 -07:00
Alex Riesen
e44b5d106c Remove pointless calls to access(2) when checking for .mailmap
read_mailmap already returns not 0 in case of error, and nothing
seem to be interested in it. It also is silent about the fact
(read_mailmap being to chatty would justify the call to access,
but there is no point for it to be and it isn't).

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-30 16:57:52 -07:00
Alex Riesen
8503ee4394 Fix read_mailmap to handle a caller uninterested in repo abbreviation
The only such a caller builtin-blame.c would pass NULL as the place
where to store the abbreviation.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-30 16:57:50 -07:00
Alex Riesen
600682aaa1 Use strlcpy instead of strncpy in mailmap.c
strncpy does not NUL-terminate output in case of output buffer too short,
and map_email prototype (and usage) does not allow for figuring out
what the length of the name is.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-30 16:57:47 -07:00
Jari Aalto
928a559000 send-email documentation: clarify --smtp-server
It can be either hostname/address, or a full path to a
local executable.

Signed-off-by: Jari Aalto <jari.aalto@cante.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-30 16:50:55 -07:00
Jari Aalto
34b604af29 git.7: Mention preformatted html doc location
Signed-off-by: Jari Aalto <jari.aalto@cante.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-30 16:43:12 -07:00
Jari Aalto
a7af09d2db Clarify SubmittingPatches Checklist
Separate things to be checked when making commits, and things
to be checked when sending patches.

Signed-off-by: Jari Aalto <jari.aalto@cante.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-30 16:39:18 -07:00
Adam Roben
b3cb7e4582 git-svn: Add 'find-rev' command
This patch adds a new 'find-rev' command to git-svn that lets you easily
translate between SVN revision numbers and git tree-ish.

Signed-off-by: Adam Roben <aroben@apple.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-30 15:58:37 -07:00
Junio C Hamano
bcd8ee5b43 Fix symlink handling in git-svn, related to PerlIO
After reading the leading contents from a symlink data obtained
from subversion, which we expect to begin with 'link ', the code
forked to hash the remainder (which should match readlink()
result) using git-hash-objects, by redirecting its STDIN from
the filehandle we read that 'link ' from.  This was Ok with Perl
on modern Linux, but on Mac OS, the read in the parent process
slurped more than we asked for in stdio buffer, and the child
did not correctly see the "remainder".

This attempts to fix the issue by using lower level sysseek and
sysread instead of seek and read to bypass the stdio buffer.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
Acked-by: Seth Falcon <sethfalcon@gmail.com>
2007-04-30 15:50:13 -07:00
Junio C Hamano
a07157ac62 Merge branch 'jc/attr'
* jc/attr:
  Add 'filter' attribute and external filter driver definition.
  Add 'ident' conversion.
2007-04-29 11:01:27 -07:00
Junio C Hamano
96651ef508 Make sure test-genrandom and test-chmtime are builtas part of the main build.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-29 02:05:11 -07:00
Junio C Hamano
e0173ad9fc Make macros to prevent double-inclusion in headers consistent.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-29 02:05:11 -07:00
Junio C Hamano
f95673849c Apply mailmap in git-blame output.
This makes git-blame to use the same mailmap used by
git-shortlog.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-29 02:05:06 -07:00
Junio C Hamano
7c1c6782e0 Split out mailmap handling out of shortlog
This splits out a few functions to deal with mailmap from
shortlog and makes it a bit more usable from other programs.
Most notably, it does not clobber input e-mail address anymore.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-29 02:05:06 -07:00
Junio C Hamano
093dc5bee6 blame -s: suppress author name and time.
With this "git blame -b -s HEAD~n..HEAD" becomes a nicer way to
review the result of recent changes in context.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-29 02:05:06 -07:00
Josh Triplett
28a94f885a Fall back to $EMAIL for missing GIT_AUTHOR_EMAIL and GIT_COMMITTER_EMAIL
Some other programs get the user's email address from $EMAIL, so fall back to
that if we don't have a Git-specific email address.

Signed-off-by: Josh Triplett <josh@freedesktop.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-29 02:05:06 -07:00
Junio C Hamano
25dc5e2995 Merge commit 'gfi/master'
* commit 'gfi/master':
2007-04-29 01:54:28 -07:00
Junio C Hamano
39231b1c32 Merge branch 'maint'
* maint:
  http.c: Fix problem with repeated calls of http_init
  Add missing reference to GIT_COMMITTER_DATE in git-commit-tree documentation
  Fix import-tars fix.
  Update .mailmap with "Michael"
  Do not barf on too long action description
  Catch empty pathnames in trees during fsck
  Don't allow empty pathnames in fast-import
  import-tars: be nice to wrong directory modes
  git-svn: Added 'find-rev' command
  git shortlog documentation: add long options and fix a typo
2007-04-29 01:52:43 -07:00
Julian Phillips
e9d54bd18b http.c: Fix problem with repeated calls of http_init
Calling http_init after calling http_cleanup causes a segfault.  This
is due to the pragma_header curl_slist being freed but not being set
to NULL.  The subsequent call to http_init tries to setup the slist
again, but it now points to an invalid memory location.

Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-29 01:34:59 -07:00
Josh Triplett
4e58bf970b Add missing reference to GIT_COMMITTER_DATE in git-commit-tree documentation
Signed-off-by: Josh Triplett <josh@freedesktop.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-29 01:34:59 -07:00
Junio C Hamano
d0c32b6339 Fix import-tars fix.
This heeds advice from our resident Perl expert to make sure
the script is not confused with a string that ends with /\n

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-29 01:34:59 -07:00
Junio C Hamano
2342c4ee14 Update .mailmap with "Michael"
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-29 01:34:59 -07:00
Junio C Hamano
4e6380e5c3 Do not barf on too long action description
Reflog message is primarily about easier identification, and
leaving truncated entry is much better than dying.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-29 01:33:13 -07:00