Code

git.git
17 years agoMerge branch 'maint'
Junio C Hamano [Tue, 20 Feb 2007 02:29:41 +0000 (18:29 -0800)]
Merge branch 'maint'

* maint:
  Obey NO_C99_FORMAT in fast-import.c.
  Add a compat/strtoumax.c for Solaris 8.
  git-clone: Sync documentation to usage note.

17 years agoObey NO_C99_FORMAT in fast-import.c.
Jason Riedy [Tue, 20 Feb 2007 00:27:09 +0000 (16:27 -0800)]
Obey NO_C99_FORMAT in fast-import.c.

Define UM_FMT and UM10_FMT and use in place of %ju and %10ju,
respectively.  Both format as unsigned long long, so this
assumes the compiler supports long long.

Signed-off-by: Jason Riedy <jason@acm.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoAdd a compat/strtoumax.c for Solaris 8.
Jason Riedy [Tue, 20 Feb 2007 00:22:56 +0000 (16:22 -0800)]
Add a compat/strtoumax.c for Solaris 8.

Solaris 8 was pre-c99, and they weren't willing to commit to
the strtoumax definition according to /usr/include/inttypes.h.

This adds NO_STRTOUMAX and NO_STRTOULL for ancient systems.
If NO_STRTOUMAX is defined, the routine in compat/strtoumax.c
will be used instead.  That routine passes its arguments to
strtoull unless NO_STRTOULL is defined.  If NO_STRTOULL, then
the routine uses strtoul (unsigned long).

Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu>
Acked-by: Shawn O Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agogit-clone: Sync documentation to usage note.
Christian Schlotter [Mon, 19 Feb 2007 12:35:35 +0000 (13:35 +0100)]
git-clone: Sync documentation to usage note.

Documentation advertises the new `--depth <n>' parameter with an equal
sign, while the usage notes (shown after `git-clone --help') do not.  If I
understood git-clone's source code correctly, the version without the
equal sign is correct, which is why this patch syncs documentation to the
usage note.

Signed-off-by: Christian Schlotter <schlotter@users.sourceforge.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoMerge branch 'ap/cvsserver'
Junio C Hamano [Mon, 19 Feb 2007 21:11:05 +0000 (13:11 -0800)]
Merge branch 'ap/cvsserver'

* ap/cvsserver:
  Have git-cvsserver call hooks/update before really altering the ref

Acked-by: Martin Langhoff <martin@catalyst.net.nz>
17 years agoMerge branch 'maint'
Junio C Hamano [Mon, 19 Feb 2007 02:45:52 +0000 (18:45 -0800)]
Merge branch 'maint'

* maint:
  GIT 1.5.0.1
  Documentation/i18n.txt: it is i18n.commitencoding not core.commitencoding
  Read the config in rev-list

Conflicts:

RelNotes

17 years agoGIT 1.5.0.1 v1.5.0.1
Junio C Hamano [Mon, 19 Feb 2007 00:18:43 +0000 (16:18 -0800)]
GIT 1.5.0.1

Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoDocumentation/i18n.txt: it is i18n.commitencoding not core.commitencoding
Fredrik Kuivinen [Sun, 18 Feb 2007 09:36:51 +0000 (10:36 +0100)]
Documentation/i18n.txt: it is i18n.commitencoding not core.commitencoding

Similarly for i18n.logoutputencoding.

Signed-off-by: Fredrik Kuivinen <frekui@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoRead the config in rev-list
Fredrik Kuivinen [Sun, 18 Feb 2007 09:36:22 +0000 (10:36 +0100)]
Read the config in rev-list

Otherwise "git rev-list --header HEAD" will not do the right
thing if i18n.commitencoding is set.

Signed-off-by: Fredrik Kuivinen <frekui@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoUpdate draft release notes for 1.5.1
Junio C Hamano [Sat, 17 Feb 2007 23:50:36 +0000 (15:50 -0800)]
Update draft release notes for 1.5.1

Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoMerge branch 'maint'
Junio C Hamano [Sun, 18 Feb 2007 00:16:48 +0000 (16:16 -0800)]
Merge branch 'maint'

* maint:
  Update draft release notes for 1.5.0.1
  Convert update-index references in docs to add.
  Attempt to improve git-rebase lead-in description.
  Do not take mode bits from index after type change.
  git-blame: prevent argument parsing segfault
  Make gitk save and restore window pane position on Linux and Cygwin.
  Make gitk save and restore the user set window position.
  [PATCH] gitk: Use show-ref instead of ls-remote
  [PATCH] Make gitk work reasonably well on Cygwin.
  [PATCH] gitk - remove trailing whitespace from a few lines.
  Change git repo-config to git config

17 years agoUpdate draft release notes for 1.5.0.1
Junio C Hamano [Sat, 17 Feb 2007 23:47:46 +0000 (15:47 -0800)]
Update draft release notes for 1.5.0.1

Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoMerge git://git.kernel.org/pub/scm/gitk/gitk into maint
Junio C Hamano [Sun, 18 Feb 2007 00:13:08 +0000 (16:13 -0800)]
Merge git://git./pub/scm/gitk/gitk into maint

* git://git.kernel.org/pub/scm/gitk/gitk:
  Make gitk save and restore window pane position on Linux and Cygwin.
  Make gitk save and restore the user set window position.
  [PATCH] gitk: Use show-ref instead of ls-remote
  [PATCH] Make gitk work reasonably well on Cygwin.
  [PATCH] gitk - remove trailing whitespace from a few lines.
  Change git repo-config to git config

17 years agoname-rev: introduce the --refs=<pattern> option
Johannes Schindelin [Sat, 17 Feb 2007 18:22:35 +0000 (19:22 +0100)]
name-rev: introduce the --refs=<pattern> option

Instead of (or, in addition to) --tags, to use only tags for naming,
you can now use --refs=<pattern> to specify a shell glob pattern
which the refs must match to be used for naming.

Example:

$ git name-rev --refs=*v1* 33db5f4d
33db5f4d tags/v1.0rc1^0~1593

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoConvert update-index references in docs to add.
Shawn O. Pearce [Sat, 17 Feb 2007 09:43:42 +0000 (04:43 -0500)]
Convert update-index references in docs to add.

Since `git add` is the approved porcelain for an end-user to invoke
when they want to manipulate the index, porcelain documentation
should steer the user to this command rather than the pure plumbing
update-index.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoAttempt to improve git-rebase lead-in description.
Shawn O. Pearce [Sat, 17 Feb 2007 09:31:50 +0000 (04:31 -0500)]
Attempt to improve git-rebase lead-in description.

It was mentioned on #git this morning that the lead-in description
of git-rebase is very confusing.  Too many branch this and branch
that in a very short run of text.

This new description attempts to walk the user through the command
syntax, while also describing exactly what git-rebase is doing to
their repository.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoDo not take mode bits from index after type change.
Junio C Hamano [Sat, 17 Feb 2007 06:43:48 +0000 (22:43 -0800)]
Do not take mode bits from index after type change.

When we do not trust executable bit from lstat(2), we copied
existing ce_mode bits without checking if the filesystem object
is a regular file (which is the only thing we apply the "trust
executable bit" business) nor if the blob in the index is a
regular file (otherwise, we should do the same as registering a
new regular file, which is to default non-executable).

Noticed by Johannes Sixt.

Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agogit-blame: prevent argument parsing segfault
Tommi Kyntola [Fri, 16 Feb 2007 08:50:58 +0000 (10:50 +0200)]
git-blame: prevent argument parsing segfault

The 3rd branch in builtin-blame.c should also check for lacking
arguments.  Running that in top dir does not trigger the problem
because the 'prefix' is NULL.

Signed-off-by: Tommi Kyntola <tommi.kyntola@ray.fi>
Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoMerge branch 'maint'
Junio C Hamano [Fri, 16 Feb 2007 23:08:46 +0000 (15:08 -0800)]
Merge branch 'maint'

* maint:
  git-merge: minor fix for no_trivial_merge_strategies.

17 years agogit-merge: minor fix for no_trivial_merge_strategies.
Junio C Hamano [Fri, 16 Feb 2007 23:08:25 +0000 (15:08 -0800)]
git-merge: minor fix for no_trivial_merge_strategies.

The shell loop to determine if we should skip the trivial
in-index merge stage based on what strategy is given was not
prepared to have more than one strategy listed in the variable
$no_trivial_merge_strategies.

This does not trigger unless you use a modified git but the fix
is simple and straightforward, so let's fix it before 1.5.0.1.

Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoMerge branch 'maint'
Junio C Hamano [Fri, 16 Feb 2007 01:13:15 +0000 (17:13 -0800)]
Merge branch 'maint'

* maint:
  pretend-sha1: grave bugfix.

17 years agopretend-sha1: grave bugfix.
Junio C Hamano [Fri, 16 Feb 2007 01:02:06 +0000 (17:02 -0800)]
pretend-sha1: grave bugfix.

We stashed away objects that we pretend to have, but did not save the
actual data.

Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoMerge branch 'maint'
Junio C Hamano [Wed, 14 Feb 2007 23:25:53 +0000 (15:25 -0800)]
Merge branch 'maint'

* maint:
  GIT-VERSION-FILE: check ./version first.
  sha1_file.c: Round the mmap offset to half the window size.
  Make sure packedgitwindowsize is multiple of (pagesize * 2)
  Add RelNotes 1.5.0.1
  Still updating 1.5.0 release notes.
  git-daemon: Avoid leaking the listening sockets into child processes.
  Clarify two backward incompatible repository options.

17 years agoGIT-VERSION-FILE: check ./version first.
Junio C Hamano [Wed, 14 Feb 2007 19:33:04 +0000 (11:33 -0800)]
GIT-VERSION-FILE: check ./version first.

When somebody else extracts git tarball inside a larger project,
'git describe' would reported the version number of that upper
level project.

Sometimes, using the consistent versioning across subdirectories
of a larger project is useful, but it may not always be the
right thing to do.

This changes the script to check ./vertion file first, and then
fall back to "git describe".  This way, by default, tarball
distribution will get our own version.  If the upper level wants
to use consistent versioning across its subdirectories, its
Makefile can overwrite ./version file to force whatever version
number they want to give us before descending into us.

Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agosha1_file.c: Round the mmap offset to half the window size.
Alexandre Julliard [Wed, 14 Feb 2007 17:11:40 +0000 (18:11 +0100)]
sha1_file.c: Round the mmap offset to half the window size.

This ensures that a given area is mapped at most twice, and greatly
reduces the virtual address space usage.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoMake gitk save and restore window pane position on Linux and Cygwin.
Mark Levedahl [Tue, 13 Feb 2007 00:19:34 +0000 (19:19 -0500)]
Make gitk save and restore window pane position on Linux and Cygwin.

Subtle bugs remained on both Cygwin and Linux that caused the various
window panes to be restored in positions different than where the user
last placed them. Sergey Vlasov posed a pair of suggested fixes to this,
what is done here is slightly different. The basic fix here involves
a) explicitly remembering and restoring the sash positions for the upper
window, and b) using paneconfigure to redundantly set height and width of
other elements. This redundancy is needed as Cygwin Tcl has a nasty habit
of setting pane sizes to zero if their slaves are not configured with a
specific size, but Linux Tcl does not honor the specific size given.

Signed-off-by: Mark Levedahl <mdl123@verizon.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoMake gitk save and restore the user set window position.
Mark Levedahl [Fri, 9 Feb 2007 03:22:24 +0000 (22:22 -0500)]
Make gitk save and restore the user set window position.

gitk was saving widget sizes and positions when the main window was
destroyed, which is after all child widgets are destroyed. The cure
is to trap the WM_DELETE_WINDOW event before the gui is torn down. Also,
the saved geometry was captured using "winfo geometry .", rather than
"wm geometry ." Under Linux, these two return different answers and the
latter one is correct.

[jc: credit goes to Brett Schwarz for suggesting the use of "wm protocol";
 I also squashed the follow-up patch to remove extraneous -0
 from expressions.]

Signed-off-by: Mark Levedahl <mdl123@verizon.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years ago[PATCH] gitk: Use show-ref instead of ls-remote
Junio C Hamano [Tue, 30 Jan 2007 05:53:28 +0000 (21:53 -0800)]
[PATCH] gitk: Use show-ref instead of ls-remote

It used to be ls-remote on self was the only easy way to grab
the ref information.  Now we have show-ref which does not
involve fork and IPC, so use it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[PATCH] Make gitk work reasonably well on Cygwin.
Junio C Hamano [Thu, 1 Feb 2007 13:46:38 +0000 (08:46 -0500)]
[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>
17 years ago[PATCH] gitk - remove trailing whitespace from a few lines.
Mark Levedahl [Thu, 1 Feb 2007 13:44:46 +0000 (08:44 -0500)]
[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>
17 years agoChange git repo-config to git config
Paul Mackerras [Wed, 14 Feb 2007 21:54:34 +0000 (08:54 +1100)]
Change git repo-config to git config

This is the gitk part of e0d10e1c63bc52b37bbec99b07deee794058d9b4
from Tom Prince.

Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years agoMake sure packedgitwindowsize is multiple of (pagesize * 2)
Junio C Hamano [Wed, 14 Feb 2007 21:20:41 +0000 (13:20 -0800)]
Make sure packedgitwindowsize is multiple of (pagesize * 2)

The next patch depends on this.

Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoAdd RelNotes 1.5.0.1
Junio C Hamano [Wed, 14 Feb 2007 19:01:41 +0000 (11:01 -0800)]
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>
17 years agoStill updating 1.5.0 release notes.
Junio C Hamano [Wed, 14 Feb 2007 18:54:25 +0000 (10:54 -0800)]
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>
17 years agogit-daemon: Avoid leaking the listening sockets into child processes.
Alexandre Julliard [Wed, 14 Feb 2007 17:10:26 +0000 (18:10 +0100)]
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>
17 years agoThe "table-of-contents" in the update hook script should match the body
Andy Parkins [Wed, 14 Feb 2007 11:20:32 +0000 (11:20 +0000)]
The "table-of-contents" in the update hook script should match the body

44478d99ee0 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>
17 years agoHave git-cvsserver call hooks/update before really altering the ref
Andy Parkins [Tue, 13 Feb 2007 15:12:45 +0000 (15:12 +0000)]
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>
17 years agoClarify two backward incompatible repository options.
Junio C Hamano [Wed, 14 Feb 2007 09:50:28 +0000 (01:50 -0800)]
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>
17 years agoPoint top-level RelNotes link at 1.5.1 release notes being prepared.
Junio C Hamano [Wed, 14 Feb 2007 08:49:06 +0000 (00:49 -0800)]
Point top-level RelNotes link at 1.5.1 release notes being prepared.

Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoAdd RelNotes 1.5.1
Junio C Hamano [Wed, 14 Feb 2007 08:45:24 +0000 (00:45 -0800)]
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>
17 years agoDocument --ignore-space-at-eol option.
Junio C Hamano [Wed, 14 Feb 2007 08:41:32 +0000 (00:41 -0800)]
Document --ignore-space-at-eol option.

Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoMerge branch 'maint'
Junio C Hamano [Wed, 14 Feb 2007 06:48:32 +0000 (22:48 -0800)]
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

17 years agoMakefile: update check-docs target
Junio C Hamano [Wed, 14 Feb 2007 06:45:22 +0000 (22:45 -0800)]
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>
17 years agocmd-list: add git-remote
Junio C Hamano [Wed, 14 Feb 2007 06:42:51 +0000 (22:42 -0800)]
cmd-list: add git-remote

Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoDocumentation: Drop full-stop from git-fast-import title.
Junio C Hamano [Wed, 14 Feb 2007 06:32:36 +0000 (22:32 -0800)]
Documentation: Drop full-stop from git-fast-import title.

Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoteach diff machinery about --ignore-space-at-eol
Johannes Schindelin [Wed, 14 Feb 2007 00:30:29 +0000 (01:30 +0100)]
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>
17 years agoOnly show log entries for new revisions in hooks--update
Andy Parkins [Tue, 13 Feb 2007 14:24:06 +0000 (14:24 +0000)]
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>
17 years agoMinor corrections to release notes
Nicolas Pitre [Wed, 14 Feb 2007 03:25:08 +0000 (22:25 -0500)]
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>
17 years agoblame: --show-stats for easier optimization work.
Junio C Hamano [Sun, 5 Nov 2006 19:52:43 +0000 (11:52 -0800)]
blame: --show-stats for easier optimization work.

Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoMerge branch 'js/reverse'
Junio C Hamano [Wed, 14 Feb 2007 03:20:06 +0000 (19:20 -0800)]
Merge branch 'js/reverse'

* js/reverse:
  Teach revision machinery about --reverse

17 years agoMerge branch 'jc/diff-apply-patch'
Junio C Hamano [Wed, 14 Feb 2007 03:18:16 +0000 (19:18 -0800)]
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)

17 years agoMerge branch 'jc/merge-base' (early part)
Junio C Hamano [Wed, 14 Feb 2007 00:50:32 +0000 (16:50 -0800)]
Merge branch 'jc/merge-base' (early part)

This contains an evil merge to fast-import, in order to
resolve in_merge_bases() update.

17 years agoMerge branch 'jc/deprecate'
Junio C Hamano [Wed, 14 Feb 2007 00:44:27 +0000 (16:44 -0800)]
Merge branch 'jc/deprecate'

As previously announced, diff-stages and resolve are now gone.

17 years agoAdd link to v1.5.0 documentation.
Junio C Hamano [Wed, 14 Feb 2007 00:43:24 +0000 (16:43 -0800)]
Add link to v1.5.0 documentation.

Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoGIT 1.5.0 v1.5.0
Junio C Hamano [Wed, 14 Feb 2007 00:00:00 +0000 (00:00 +0000)]
GIT 1.5.0

17 years agoAdd release notes to the distribution.
Junio C Hamano [Tue, 13 Feb 2007 23:15:05 +0000 (15:15 -0800)]
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>
17 years agoMerge branch 'master' of git://repo.or.cz/git-gui
Junio C Hamano [Tue, 13 Feb 2007 21:48:52 +0000 (13:48 -0800)]
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"

17 years agoDocumentation: Moving out of detached HEAD does not warn anymore.
Junio C Hamano [Tue, 13 Feb 2007 16:58:01 +0000 (08:58 -0800)]
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>
17 years agoMark places that need blob munging later for CRLF conversion.
Linus Torvalds [Tue, 13 Feb 2007 17:23:59 +0000 (09:23 -0800)]
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>
17 years agoUpdate RPM core package description
Nicolas Pitre [Tue, 13 Feb 2007 16:39:01 +0000 (11:39 -0500)]
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>
17 years agoFix potential command line overflow in hooks--update
Andy Parkins [Tue, 13 Feb 2007 14:23:58 +0000 (14:23 +0000)]
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>
17 years agogit-gc: run pack-refs by default unless the repo is bare
Johannes Schindelin [Tue, 13 Feb 2007 13:01:42 +0000 (14:01 +0100)]
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>
17 years agogit-gui: fix typo in GIT-VERSION-GEN, "/dev/null" not "/devnull"
Andy Parkins [Tue, 13 Feb 2007 15:26:16 +0000 (15:26 +0000)]
git-gui: fix typo in GIT-VERSION-GEN, "/dev/null" not "/devnull"

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
17 years ago"git-fetch --tags $URL" should not overwrite existing tags
Junio C Hamano [Sun, 11 Feb 2007 21:41:23 +0000 (13:41 -0800)]
"git-fetch --tags $URL" should not overwrite existing tags

Use the same --exclude-existing filter as we use for automatic
tag following to avoid overwriting existing tags with replacement
ones the other side created.

Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agofor-each-reflog: not having $GIT_DIR/logs directory is not an error.
Junio C Hamano [Tue, 13 Feb 2007 07:21:34 +0000 (23:21 -0800)]
for-each-reflog: not having $GIT_DIR/logs directory is not an error.

Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoDo not forget to pack objects reachable from HEAD reflog.
Junio C Hamano [Tue, 13 Feb 2007 07:06:54 +0000 (23:06 -0800)]
Do not forget to pack objects reachable from HEAD reflog.

Similar to commit eb8381c8, we need to use for_each_reflog() to make
sure we do not miss objects reachable from HEAD reflog.

Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoWork around Subversion race in git-svn tests.
Michael Spang [Tue, 13 Feb 2007 00:33:37 +0000 (19:33 -0500)]
Work around Subversion race in git-svn tests.

Some of the git-svn tests can fail on fast machines due to a race in
Subversion: if a file is modified in the same second it was checked out
(or in for that matter), Subversion will not consider it modified. This
works around the problem by increasing the timestamp by one second
before each commit.

[jc: with "touch -r -d" replacement from Eric]

Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Michael Spang <mspang@uwaterloo.ca>
Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoClarify that git-update-server-info should be run for every git-push
Pavel Roskin [Tue, 13 Feb 2007 05:43:44 +0000 (00:43 -0500)]
Clarify that git-update-server-info should be run for every git-push

The old text suggested that git-update-server-info only needs to be run
if new tags or branches are created, but not for new commits.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoRemove git-diff-stages.
Junio C Hamano [Thu, 8 Feb 2007 01:03:46 +0000 (17:03 -0800)]
Remove git-diff-stages.

Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoRemove git-resolve.
Junio C Hamano [Wed, 7 Feb 2007 18:37:03 +0000 (10:37 -0800)]
Remove git-resolve.

Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoblameview: Move the commit info to a pane below the blame window.
Aneesh Kumar K.V [Mon, 12 Feb 2007 17:30:28 +0000 (23:00 +0530)]
blameview: Move the commit info to a pane below the blame window.

Also spawn the the new blameview in the background

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agogit merge documentation: -m is optional
Matthias Lederhofer [Mon, 5 Feb 2007 11:37:27 +0000 (12:37 +0100)]
git merge documentation: -m is optional

Changed -m=<msg> to -m <msg> too.

Signed-off-by: Matthias Lederhofer <matled@gmx.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoMake gitk save and restore window pane position on Linux and Cygwin.
Mark Levedahl [Tue, 13 Feb 2007 00:19:34 +0000 (19:19 -0500)]
Make gitk save and restore window pane position on Linux and Cygwin.

Subtle bugs remained on both Cygwin and Linux that caused the various
window panes to be restored in positions different than where the user
last placed them. Sergey Vlasov posed a pair of suggested fixes to this,
what is done here is slightly different. The basic fix here involves
a) explicitly remembering and restoring the sash positions for the upper
window, and b) using paneconfigure to redundantly set height and width of
other elements. This redundancy is needed as Cygwin Tcl has a nasty habit
of setting pane sizes to zero if their slaves are not configured with a
specific size, but Linux Tcl does not honor the specific size given.

Signed-off-by: Mark Levedahl <mdl123@verizon.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoAdd RPM target for git-gui
Junio C Hamano [Tue, 13 Feb 2007 00:28:15 +0000 (16:28 -0800)]
Add RPM target for git-gui

Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoLink git-gui into the master Makefile.
Shawn O. Pearce [Mon, 12 Feb 2007 23:20:34 +0000 (18:20 -0500)]
Link git-gui into the master Makefile.

I'm exporting gitexecdir because git-gui wants to know where
it should install git-gui and git-citool.  These belong under
gitexecdir, just like git-diff, as the git wrapper is able to
invoke these commands for the end-user.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoMerge branch 'master' of git://repo.or.cz/git-gui
Junio C Hamano [Tue, 13 Feb 2007 00:07:29 +0000 (16:07 -0800)]
Merge branch 'master' of git://repo.or.cz/git-gui

* 'master' of git://repo.or.cz/git-gui:
  git-gui: Change base version to 0.6.
  git-gui: Guess our version accurately as a subproject.
  git-gui: Handle gitgui tags in version gen.
  git-gui: Generate a version file on demand.
  git-gui: Rename GIT_VERSION to GITGUI_VERSION.
  git-gui: Allow gitexecdir, INSTALL to be set by the caller.

17 years agogit-gui: Change base version to 0.6. gitgui-0.6.0
Shawn O. Pearce [Mon, 12 Feb 2007 22:45:21 +0000 (17:45 -0500)]
git-gui: Change base version to 0.6.

This is the start of the 0.6 series of git-gui.  I'm calling it 0.6
(rather than any other value) as I already had a private tag on
one system based on 0.5, and that tag is quite a bit behind this
version.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
17 years agogit-gui: Guess our version accurately as a subproject.
Shawn O. Pearce [Mon, 12 Feb 2007 22:05:10 +0000 (17:05 -0500)]
git-gui: Guess our version accurately as a subproject.

When we are included as a subproject, such as how git.git carries
us, we want to retain our own version number and not the version
number assigned by git.git's own tags.  Consequently we need to
locate the correct tag which applies to our tree content and
its commit lineage.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
17 years agogit-gui: Handle gitgui tags in version gen.
Shawn O. Pearce [Mon, 12 Feb 2007 21:38:29 +0000 (16:38 -0500)]
git-gui: Handle gitgui tags in version gen.

I've decided to use gitgui-0.5 as the format for tags in the
git-gui repository.  The prefix of gitgui was chosen here to
make its namespace different from the namespace used by git
itself, allowing developers to pull both tag namespaces into
the same repository.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
17 years agogit-gui: Generate a version file on demand.
Shawn O. Pearce [Mon, 12 Feb 2007 21:14:44 +0000 (16:14 -0500)]
git-gui: Generate a version file on demand.

Because git-gui is being shipped as a subproject of the main
Git project and will often have a different lifecycle than
the main Git project, we should ship our own version number
in the release tarball rather than relying on the main Git
version file.

Git's master Makefile will invoke our own with the target
dist-version, asking us to save off our GITGUI_VERSION value
into our own version file, so that our GIT-VERSION-GEN script
can recover it at build time.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
17 years agogit-gui: Rename GIT_VERSION to GITGUI_VERSION.
Shawn O. Pearce [Mon, 12 Feb 2007 21:12:04 +0000 (16:12 -0500)]
git-gui: Rename GIT_VERSION to GITGUI_VERSION.

Now that the decision has been made to treat git-gui as a
subproject, rather than merging it directly into git, we
should use a different substitution for our version value
to avoid any possible confusion.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
17 years agogit-gui: Allow gitexecdir, INSTALL to be set by the caller.
Shawn O. Pearce [Mon, 12 Feb 2007 20:37:50 +0000 (15:37 -0500)]
git-gui: Allow gitexecdir, INSTALL to be set by the caller.

When used as a subproject within git.git our Makefile must honor
the gitexecdir which git.git's Makefile is passing down to us,
ensuring that we install our executables into the libexec chosen
by the end-user or packager.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
17 years agoimport-tars: brown paper bag fix for file mode.
Michael Loeffler [Mon, 12 Feb 2007 14:17:11 +0000 (15:17 +0100)]
import-tars: brown paper bag fix for file mode.

There is a bug with this $git_mode variable which should be 0644
or 0755, but nothing else I think.

Signed-off-by: Michael Loeffler <zvpunry@zvpunry.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
17 years agofast-import: Support reusing 'from' and brown paper bag fix reset.
Shawn O. Pearce [Mon, 12 Feb 2007 09:08:43 +0000 (04:08 -0500)]
fast-import: Support reusing 'from' and brown paper bag fix reset.

It was suggested on the mailing list that being able to use `from`
in any commit to reset the current branch is useful in some types of
importers, such as a darcs importer.

We originally did not permit resetting an existing branch with a
new `from` command during a `commit` command, but this restriction
was only to help debug the hacked up cvs2svn that Jon Smirl was
developing in parallel with git-fast-import.  It is probably more
of a problem to disallow it than to allow it.  So now we permit a
`from` during any `commit`.

While making the changes required to permit multiple `from`
commands on the same branch, I discovered we no longer needed the
last_commit field to be set to 0 during a reset, so that was removed.
(Reset was originally setting the field to 0 to signal cmd_from()
that it was OK to execute on the branch.)

While poking around in this section of fast-import I also realized
the `reset` command was not working as intended if the corresponding
`from` command was omitted (as allowed by the BNF grammar and the
code).  If `from` was omitted we cleared out the tree but we left
the tree SHA-1 and parent commit SHA-1 intact.  This is not what
the user intended in this case.  Instead they would be trying to
reset the branch to have no parent and to have no tree, making the
branch look new-born during the next commit.  We now clear these
SHA-1 values during `reset`, ensuring the branch looks new-born if
`from` does not get supplied.

New test cases for these were also added.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
17 years agoMerge git-gui
Junio C Hamano [Mon, 12 Feb 2007 07:04:00 +0000 (23:04 -0800)]
Merge git-gui

This merges git-gui project of Shawn as a subproject of git.git
at git-gui/ subdirectory.

This merge only melds two histories together.  The toplevel Makefile
does not even know about git-gui yet.

Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoAdd discussion section to git-tag documentation.
Junio C Hamano [Mon, 12 Feb 2007 06:29:12 +0000 (22:29 -0800)]
Add discussion section to git-tag documentation.

Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoTeach git-am to pass -p option down to git-apply
Junio C Hamano [Mon, 12 Feb 2007 06:05:36 +0000 (22:05 -0800)]
Teach git-am to pass -p option down to git-apply

This is originally from Andy Parkins whose patch used --patchdepth; let's
use -p which is more in line with the underlying git-apply.

Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoDocumentation: git-rebase -C<n>
Junio C Hamano [Mon, 12 Feb 2007 06:03:55 +0000 (22:03 -0800)]
Documentation: git-rebase -C<n>

Replace -CNUM in Synopsis section with -C<n> to make it consistent with
the description text.

Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoMerge branch 'master' of git://repo.or.cz/git/fastimport
Junio C Hamano [Mon, 12 Feb 2007 04:34:57 +0000 (20:34 -0800)]
Merge branch 'master' of git://repo.or.cz/git/fastimport

* 'master' of git://repo.or.cz/git/fastimport:
  bash: Hide git-fast-import.
  fast-import: Add tip about importing renames.
  fast-import: Hide the pack boundary commits by default.

17 years agobash: Hide git-fast-import.
Shawn O. Pearce [Mon, 12 Feb 2007 00:55:22 +0000 (19:55 -0500)]
bash: Hide git-fast-import.

The new git-fast-import command is not intended to be invoked
directly by an end user.  So offering it as a possible completion
for a subcommand is not very useful.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
17 years agofast-import: Add tip about importing renames.
Shawn O. Pearce [Mon, 12 Feb 2007 00:50:50 +0000 (19:50 -0500)]
fast-import: Add tip about importing renames.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
17 years agofast-import: Hide the pack boundary commits by default.
Shawn O. Pearce [Mon, 12 Feb 2007 00:45:56 +0000 (19:45 -0500)]
fast-import: Hide the pack boundary commits by default.

Most users don't need the pack boundary information that fast-import
was printing to standard output, especially if they were calling
it with --quiet.

Those users who do want this information probably want it captured
so they can go back and use it to repack the imported repository.
So dumping the boundary commits to a log file makes more sense then
printing them to standard output.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
17 years agogit-gui: Stop deleting gitk preferences.
Shawn O. Pearce [Sun, 11 Feb 2007 22:19:38 +0000 (17:19 -0500)]
git-gui: Stop deleting gitk preferences.

Now that git 1.5.0 and later contains a version of gitk that uses
correct geometry on Windows platforms, even if ~/.gitk exists, we
should not delete the user's ~/.gitk to work around the bug.  It
is downright mean to remove a user's preferences for another app.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
17 years agoDocument that git-am can read standard input.
Michael S. Tsirkin [Fri, 9 Feb 2007 10:23:23 +0000 (12:23 +0200)]
Document that git-am can read standard input.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoMake gitk save and restore the user set window position.
Mark Levedahl [Fri, 9 Feb 2007 03:22:24 +0000 (22:22 -0500)]
Make gitk save and restore the user set window position.

gitk was saving widget sizes and positions when the main window was
destroyed, which is after all child widgets are destroyed. The cure
is to trap the WM_DELETE_WINDOW event before the gui is torn down. Also,
the saved geometry was captured using "winfo geometry .", rather than
"wm geometry ." Under Linux, these two return different answers and the
latter one is correct.

[jc: credit goes to Brett Schwarz for suggesting the use of "wm protocol";
 I also squashed the follow-up patch to remove extraneous -0
 from expressions.]

Signed-off-by: Mark Levedahl <mdl123@verizon.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agot4016: test quoting funny pathnames in diff output
Junio C Hamano [Sun, 11 Feb 2007 21:28:42 +0000 (13:28 -0800)]
t4016: test quoting funny pathnames in diff output

Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agodiff.c: More logical file name quoting for renames in diffstat.
Alexandre Julliard [Sat, 10 Feb 2007 14:39:00 +0000 (15:39 +0100)]
diff.c: More logical file name quoting for renames in diffstat.

Quote both file names separately when printing a rename, yielding
something like

  "foo" => "bar"

instead of the current

  "foo => bar"

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agodiff.c: Properly quote file names in diff --summary output.
Alexandre Julliard [Sat, 10 Feb 2007 14:37:48 +0000 (15:37 +0100)]
diff.c: Properly quote file names in diff --summary output.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agodiff.c: Reuse the pprint_rename function for diff --summary output.
Alexandre Julliard [Sat, 10 Feb 2007 14:36:47 +0000 (15:36 +0100)]
diff.c: Reuse the pprint_rename function for diff --summary output.

This avoids some code duplication, and yields more readable results
for directory renames.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
17 years agoMake it easier to override path to asciidoc command
Dotan Barak [Sun, 11 Feb 2007 15:54:40 +0000 (17:54 +0200)]
Make it easier to override path to asciidoc command

Allow setting the path of asciidoc in only one place when creating
the documentation.

Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
Signed-off-by: Junio C Hamano <junkio@cox.net>