Commit Graph

8761 Commits

Author SHA1 Message Date
Junio C Hamano
e9937d2a03 [PATCH] Make gitk work reasonably well on Cygwin.
The gitk gui layout was completely broken on Cygwin. If gitk was started
without previous geometry in ~/.gitk, the user could drag the window sashes
to get a useable layout. However, if ~/.gitk existed, this was not possible
at all.

The fix was to rewrite makewindow, changing the toplevel containers and
the particular geometry information saved between sessions. Numerous bugs
in both the Cygwin and the Linux Tk versions make this a delicate
balancing act: the version here works in both but many subtle variants
are competely broken in one or the other environment.

Three user visible changes result:
1 - The viewer is fully functional under Cygwin.
2 - The search bar moves from the bottom to the top of the lower left
    pane. This was necessary to get around a layout problem on Cygwin.
3 - The window size and position is saved and restored between sessions.
    Again, this is necessary to get around a layout problem on Cygwin.

Signed-off-by: Mark Levedahl <mdl123@verizon.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-15 08:57:14 +11:00
Mark Levedahl
40b87ff877 [PATCH] gitk - remove trailing whitespace from a few lines.
Signed-off-by: Mark Levedahl <mdl123@verizon.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-15 08:57:14 +11:00
Paul Mackerras
27cb61ca14 Change git repo-config to git config
This is the gitk part of e0d10e1c63
from Tom Prince.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-15 08:54:34 +11:00
Junio C Hamano
5faaf24634 Make sure packedgitwindowsize is multiple of (pagesize * 2)
The next patch depends on this.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-14 13:20:41 -08:00
Linus Torvalds
d7f4633405 Make AutoCRLF ternary variable.
This allows you to do:

	[core]
		AutoCRLF = input

and it should do only the CRLF->LF translation (ie it simplifies CRLF only
when reading working tree files, but when checking out files, it leaves
the LF alone, and doesn't turn it into a CRLF).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-14 11:19:28 -08:00
Linus Torvalds
6c510bee20 Lazy man's auto-CRLF
It currently does NOT know about file attributes, so it does its
conversion purely based on content. Maybe that is more in the "git
philosophy" anyway, since content is king, but I think we should try to do
the file attributes to turn it off on demand.

Anyway, BY DEFAULT it is off regardless, because it requires a

	[core]
		AutoCRLF = true

in your config file to be enabled. We could make that the default for
Windows, of course, the same way we do some other things (filemode etc).

But you can actually enable it on UNIX, and it will cause:

 - "git update-index" will write blobs without CRLF
 - "git diff" will diff working tree files without CRLF
 - "git checkout" will write files to the working tree _with_ CRLF

and things work fine.

Funnily, it actually shows an odd file in git itself:

	git clone -n git test-crlf
	cd test-crlf
	git config core.autocrlf true
	git checkout
	git diff

shows a diff for "Documentation/docbook-xsl.css". Why? Because we have
actually checked in that file *with* CRLF! So when "core.autocrlf" is
true, we'll always generate a *different* hash for it in the index,
because the index hash will be for the content _without_ CRLF.

Is this complete? I dunno. It seems to work for me. It doesn't use the
filename at all right now, and that's probably a deficiency (we could
certainly make the "is_binary()" heuristics also take standard filename
heuristics into account).

I don't pass in the filename at all for the "index_fd()" case
(git-update-index), so that would need to be passed around, but this
actually works fine.

NOTE NOTE NOTE! The "is_binary()" heuristics are totally made-up by yours
truly. I will not guarantee that they work at all reasonable. Caveat
emptor. But it _is_ simple, and it _is_ safe, since it's all off by
default.

The patch is pretty simple - the biggest part is the new "convert.c" file,
but even that is really just basic stuff that anybody can write in
"Teaching C 101" as a final project for their first class in programming.
Not to say that it's bug-free, of course - but at least we're not talking
about rocket surgery here.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-14 11:19:22 -08:00
Junio C Hamano
bd07326dcd Add RelNotes 1.5.0.1
In the same spirit as commit 6fc66686, let's keep notes as we fix
things.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-14 11:05:11 -08:00
Junio C Hamano
37b73cf97c Still updating 1.5.0 release notes.
In cruft removal section we had a cruft we needed to remove.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-14 10:55:24 -08:00
Alexandre Julliard
20276889d6 git-daemon: Avoid leaking the listening sockets into child processes.
This makes it possible to restart git-daemon even if some children are
still running.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-14 10:25:41 -08:00
Andy Parkins
9a894e8e7c The "table-of-contents" in the update hook script should match the body
44478d99ee introduced a filter using "git-rev-parse --not --all" to the
log display to prevent the display of revisions already in the
repository.  However, the table of contents generation didn't get that
same update.

This patch fixes that.  The table of contents before the log and the log
now both display the same list of revisions.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-14 10:14:26 -08:00
Andy Parkins
b2741f63d4 Have git-cvsserver call hooks/update before really altering the ref
git-cvsserver is analogous to git-receive-pack; a checking from a cvs
client to a central server is like a git-push from a working repository.
Therefore it's nice to use the same access control (and email sending)
that a receive-pack would perform.

This patch tests for an executable update hook; if it is it is run with
the ref being updated and the old and new hashes as normal.  If the
update hook returns an error code the update is aborted and the ref is
never updated.  The cvsserver returns "error 1" to the client to signal
there was an EPERM error.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-14 02:15:42 -08:00
Junio C Hamano
958545c5a1 Clarify two backward incompatible repository options.
It was unclear if the backward compatible features were disabled
or the configuration variables that controls them were set to
false by default from the description.  Obviously we meant the
former, but the problem was made worse by the fact that one
configuration variable breaks compatibility when set to true and
the other one breaks it when set to false.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-14 01:50:28 -08:00
Junio C Hamano
f5d43056a1 Point top-level RelNotes link at 1.5.1 release notes being prepared.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-14 00:49:06 -08:00
Junio C Hamano
6fc6668625 Add RelNotes 1.5.1
Instead of running around listing the changes near the release,
let's keep things nicely organized by summarizing the changes as
we merge things to the 'master' branch.

I haven't decided how well this will go with people's patch
submission procedure yet --- we'll play it by the ear and see
what happens.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-14 00:46:52 -08:00
Junio C Hamano
a44a0c9966 Document --ignore-space-at-eol option.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-14 00:41:32 -08:00
Shawn O. Pearce
26370f73c0 git-gui: Prefer version file over git-describe.
Some distributions are using Git for part of their package
management system, but unpack Git's own source code for
delivery from the .tar.gz.  This means that when we walk
up the directory tree with git-describe to locate a Git
repository, the repository we find is for the distribution
and *not* for git-gui.  Consequently any tag we might find
there is bogus and does not apply to us.

In this case the version file should always exist and be
readable, as the packager is working from the released
.tar.gz sources.  So we should always favor the version
file over anything git-describe guess for us.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-14 01:55:16 -05:00
Junio C Hamano
ddfff26651 Merge branch 'maint'
* maint:
  Makefile: update check-docs target
  cmd-list: add git-remote
  Documentation: Drop full-stop from git-fast-import title.
  Minor corrections to release notes
2007-02-13 22:48:32 -08:00
Junio C Hamano
4b02c5290e Makefile: update check-docs target
Old aliases are not linked to the main command list.  Also the internal
git-add--interactive does not need to be on the list.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 22:45:22 -08:00
Junio C Hamano
727d38d757 cmd-list: add git-remote
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 22:42:51 -08:00
Junio C Hamano
7a33631f78 Documentation: Drop full-stop from git-fast-import title.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 22:32:36 -08:00
Julian Phillips
617669da4f Use stdin reflist passing in git-fetch.sh
Use the new stdin reflist passing mechanism for the call to
fetch--tool parse-reflist, allowing passing of more than ~128K
of reflist data.

Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 21:43:53 -08:00
Julian Phillips
95339912b9 Use stdin reflist passing in parse-remote
Use the new stdin reflist passing mechanism for the call to
fetch--tool expand-refs-wildcard, allowing passing of more
than ~128K of reflist data.

Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 21:43:53 -08:00
Julian Phillips
46ce8b6d2a Allow fetch--tool to read from stdin
If the reflist is "-" then read the reflist data from stdin instead,
this will allow the passing of more than 128K of reflist data - which
won't fit in the environment passed by execve.

Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 21:43:53 -08:00
Junio C Hamano
86551586da git-fetch: rewrite expand_ref_wildcard in C
This does not seem to make measurable improvement when dealing
with 1000 unpacked refs, but we would need something like it
if we were to do a full rewrite in C somedaoy.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 21:43:53 -08:00
Junio C Hamano
d1e0ef6cc8 git-fetch: rewrite another shell loop in C
Move another shell loop that canonicalizes the list of refs for
underlying git-fetch-pack and fetch-native-store into C.

This seems to shave the runtime for the same 1000 branch
repository from 30 seconds down to 15 seconds (it used to be 2
and half minutes with the original version).

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 21:43:53 -08:00
Junio C Hamano
fbe2687eba git-fetch: move more code into C.
This adds "native-store" subcommand to git-fetch--tool to
move a huge loop implemented in shell into C.  This shaves about
70% of the runtime to fetch and update 1000 tracking branches
with a single fetch.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 21:43:53 -08:00
Junio C Hamano
d4289fff87 git-fetch--tool: start rewriting parts of git-fetch in C.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 21:43:52 -08:00
Junio C Hamano
b74e8cbd80 git-fetch: split fetch_main into fetch_dumb and fetch_native
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 21:43:52 -08:00
Johannes Schindelin
859f9c4581 teach diff machinery about --ignore-space-at-eol
`git diff --ignore-space-at-eol` will ignore whitespace at the
line ends.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 21:40:42 -08:00
Andy Parkins
44478d99ee Only show log entries for new revisions in hooks--update
If you were issuing emails for two branches, and one merged the other,
you would get the same log messages appearing in two separate emails.

e.g. A working repository, where the last push to central was done at
     the revision marked "B", after which two branches were developed
     further.

  * -- B -- 1 -- 1 -- M (branch1)
        \           /
         2 -- 2 -- 2 (branch2)

Now imagine that branch2 is pushed to the email-generating repository;
an email containing all the "2" revisions would be sent.  Now, let's say
branch1 is pushed, the old update hook would run

 git-rev-list $newrev ^$baserev

Where $newrev would be "M" and $baserev would be "B".  This list
includes all the "2" revisions as well as all the "1" revisions.

This patch addresses this problem by using

 git-rev-parse --not --all | git-rev-list --stdin $newrev ^$baserev

To inhibit the display of all revisions that are already in the
repository.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 21:40:24 -08:00
Shawn O. Pearce
ed3adde081 git-gui: Print version on the console.
Like `git version`, `git gui version` (or `git gui --version`) shows
the version of git-gui, in case the user needs to know this, without
looking at it in the GUI about dialog.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-14 00:28:00 -05:00
Shawn O. Pearce
5ac58f5ba1 git-gui: More consistently display the application name.
I started to find it confusing that git-gui would refer to itself
as git-citool when it was started through the citool hardlink, or
with the citool subcommand.  What was especially confusing was the
options dialog and the about dialog, as both seemed to imply they
were somehow different from the git-gui versions.  In actuality
there is no difference at all.

Now we just call our options menu item 'Options...' (skipping the
application name) and our About dialog now always shows git-gui
within the short description (above the copyleft notice) and in
the version field.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-14 00:10:20 -05:00
Nicolas Pitre
a989a5ef2c Minor corrections to release notes
Update section about warning when leaving a detached head.

Also fix a few indentations that weren't like the rest of the file.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 20:58:56 -08:00
Shawn O. Pearce
cdf6e08880 git-gui: Permit merging tags into the current branch.
It was pointed out on the git mailing list by Martin Koegler that
we did not show tags as possible things to merge into the current
branch.  They actually are, and core Git's Grand Unified Merge
Driver will accept them just like any other commit.

So our merge dialog now requests all refs/heads, refs/remotes and
refs/tags named refs and attempts to match them against the commits
not in HEAD.  One complicating factor here is that we must use the
%(*objectname) field when talking about an annotated tag, as they
will not appear in the output of rev-list.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-13 23:43:48 -05:00
Shawn O. Pearce
54acdd95b8 git-gui: Basic version check to ensure git 1.5.0 or later is used.
This is a very crude (but hopefully effective) check against the
`git` executable found in our PATH.  Some of the subcommands and
options that git-gui requires to be present to operate were created
during the 1.5.0 development cycle, so 1.5 is the minimum version
of git that we can expect to support.

There actually are early releases of 1.5 (e.g. 1.5.0-rc0) that
don't have everything we expect (like `blame --incremental`) but
these are purely academic at this point.  1.5.0 final was tagged
and released just a few hours ago.  The release candidates will
(hopefully) fade into the dark quickly.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-13 23:15:25 -05:00
Junio C Hamano
870b39c15f blame: --show-stats for easier optimization work.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 19:30:03 -08:00
Junio C Hamano
c230390b47 Merge branch 'js/reverse'
* js/reverse:
  Teach revision machinery about --reverse
2007-02-13 19:20:06 -08:00
Junio C Hamano
3eee9c6dbe Merge branch 'jc/diff-apply-patch'
* jc/diff-apply-patch:
  git-diff/git-apply: make diff output a bit friendlier to GNU patch (part 2)
2007-02-13 19:18:16 -08:00
Shawn O. Pearce
8134722306 git-gui: Refactor 'exec git subcmd' idiom.
As we frequently need to execute a Git subcommand and obtain
its returned output we are making heavy use of [exec git foo]
to run foo.  As I'm concerned about possibly needing to carry
environment data through a shell on Cygwin for at least some
subcommands, I'm migrating all current calls to a new git
proc.  This actually makes the code look cleaner too, as
we aren't saying 'exec git' everywhere.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-13 21:32:52 -05:00
Junio C Hamano
4a164d48df Merge branch 'jc/merge-base' (early part)
This contains an evil merge to fast-import, in order to
resolve in_merge_bases() update.
2007-02-13 16:54:35 -08:00
Junio C Hamano
f8f2aaa172 Merge branch 'jc/deprecate'
As previously announced, diff-stages and resolve are now gone.
2007-02-13 16:45:40 -08:00
Junio C Hamano
6132bd5cac Add link to v1.5.0 documentation.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 16:43:24 -08:00
Junio C Hamano
437b1b20df GIT 1.5.0 2007-02-14 00:00:00 +00:00
Junio C Hamano
26cfcfbff4 Add release notes to the distribution.
This also adds a hook in the Makefile I can use to automatically
include pointers to documentation for older releases when updating
the pages at http://kernel.org/pub/software/scm/git/docs/.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 15:15:05 -08:00
Junio C Hamano
ea44949605 Merge branch 'master' of git://repo.or.cz/git-gui
* 'master' of git://repo.or.cz/git-gui:
  git-gui: fix typo in GIT-VERSION-GEN, "/dev/null" not "/devnull"
2007-02-13 13:48:52 -08:00
Junio C Hamano
cec8d146fc Documentation: Moving out of detached HEAD does not warn anymore.
The documentation still talked about the unnecessary 'safety'
in git-checkout.

Pointed out by Matthias Lederhofer.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 10:12:37 -08:00
Linus Torvalds
bd3a5b5ee5 Mark places that need blob munging later for CRLF conversion.
Here's a patch that I think we can merge right now. There may be
other places that need this, but this at least points out the
three places that read/write working tree files for git
update-index, checkout and diff respectively. That should cover
a lot of it [jc: git-apply uses an entirely different codepath
both for reading and writing].

Some day we can actually implement it. In the meantime, this
points out a place for people to start. We *can* even start with
a really simple "we do CRLF conversion automatically, regardless
of filename" kind of approach, that just look at the data (all
three cases have the _full_ file data already in memory) and
says "ok, this is text, so let's convert to/from DOS format
directly".

THAT somebody can write in ten minutes, and it would already
make git much nicer on a DOS/Windows platform, I suspect.

And it would be totally zero-cost if you just make it a config
option (but please make it dynamic with the _default_ just being
0/1 depending on whether it's UNIX/Windows, just so that UNIX
people can _test_ it easily).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 10:12:37 -08:00
Nicolas Pitre
e19b91b4ea Update RPM core package description
Git isn't as stupid as it used to be

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 10:12:37 -08:00
Andy Parkins
72f627d2bc Fix potential command line overflow in hooks--update
In a repository with a large number of refs, the following command line
could easily overflow the command line size limitations

 git-rev-list $newref $(git-rev-parse --not --all)

Fortunately, git-rev-list already has the means to cope with this
situation with the --stdin switch

 git-rev-parse --not --all | git-rev-list --stdin $newref

Which is exactly what this patch does.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 09:33:09 -08:00
Johannes Schindelin
c2120e5e4b git-gc: run pack-refs by default unless the repo is bare
The config variable gc.packrefs is tristate now: "true", "false"
and "notbare", where "notbare" is the default.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-13 09:19:34 -08:00