Commit Graph

8647 Commits

Author SHA1 Message Date
Shawn O. Pearce
fdf6cfc426 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>
2007-02-12 17:45:21 -05:00
Shawn O. Pearce
07d082bf5b 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>
2007-02-12 17:05:10 -05:00
Shawn O. Pearce
6a6459bc8f 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>
2007-02-12 16:38:29 -05:00
Shawn O. Pearce
5d643cd3ce 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>
2007-02-12 16:14:44 -05:00
Shawn O. Pearce
7e81d4eead 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>
2007-02-12 16:12:04 -05:00
Shawn O. Pearce
663e7cf81d 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>
2007-02-12 15:37:50 -05:00
Michael Loeffler
d63ea11594 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>
2007-02-12 12:19:45 -05:00
Shawn O. Pearce
ea5e370aa9 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>
2007-02-12 12:17:31 -05:00
Junio C Hamano
b4d2b04c9b 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>
2007-02-11 23:04:00 -08:00
Junio C Hamano
4853534e18 Add discussion section to git-tag documentation.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-11 22:29:12 -08:00
Junio C Hamano
2092a1fefd 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>
2007-02-11 22:05:36 -08:00
Junio C Hamano
c5c3fc9851 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>
2007-02-11 22:03:55 -08:00
Junio C Hamano
b578e509d3 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.
2007-02-11 20:34:57 -08:00
Shawn O. Pearce
c6ec3b13b8 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>
2007-02-11 19:55:22 -05:00
Shawn O. Pearce
c73461567e fast-import: Add tip about importing renames.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-11 19:50:50 -05:00
Shawn O. Pearce
bdf1c06dc1 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>
2007-02-11 19:45:56 -05:00
Shawn O. Pearce
0960f7d6db 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>
2007-02-11 17:19:38 -05:00
Michael S. Tsirkin
d414461295 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>
2007-02-11 14:07:47 -08:00
Mark Levedahl
602598fd5d 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>
2007-02-11 13:47:55 -08:00
Junio C Hamano
788743240e t4016: test quoting funny pathnames in diff output
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-11 13:28:42 -08:00
Alexandre Julliard
e5bfbf9b3e 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>
2007-02-11 13:08:10 -08:00
Alexandre Julliard
0d26a64ece 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>
2007-02-11 12:53:05 -08:00
Alexandre Julliard
b9f441646c 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>
2007-02-11 12:47:22 -08:00
Dotan Barak
1187d7564d 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>
2007-02-11 12:44:09 -08:00
Ren,bi(B Scharfe
4f75b115d7 Avoid ugly linewrap in git help
Some of the short help texts that are shown e.g. when running 'git'
without any parameters wrap on a 80-column terminal.  They are just
one character over the line.  This patch avoids it by decreasing the
number of spaces around the preceding command name from four to
three (on both sides for symmetry).

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-11 12:42:01 -08:00
Mukund
b4f020c5d0 Fixed some typos in git-repack docs
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-10 22:48:57 -08:00
Eric Wong
7774284ac7 git-svn: correctly handle boolean options via git-config
We don't append a space after '--bool', so we can't expect
a regular expression to match the space.

Semi-noticed by Junio C Hamano :)

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-10 22:48:18 -08:00
Theodore Ts'o
dfd42a3c62 Allow aliases to expand to shell commands
If the alias expansion is prefixed with an exclamation point, treat
it as a shell command which is run using system(3).

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-10 22:46:34 -08:00
Theodore Ts'o
f3dd015c91 Print a sane error message if an alias expands to an invalid git command
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-10 22:46:30 -08:00
Junio C Hamano
471efb09aa diff_flush_name(): take struct diff_options parameter.
Among the low-level output functions called from flush_one_pair(),
this was the only function that did not take (filepair, options)
as arguments.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-09 22:43:02 -08:00
Junio C Hamano
cc46a74398 wt_status_prepare(): clean up structure initialization.
Otherwise it would be a pain to add members to it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-09 16:26:02 -08:00
Junio C Hamano
02f571c73b git-fetch: document automatic tag following.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-09 15:41:35 -08:00
Nicolas Pitre
ad34a028c1 remove mailmap.linux
This file is incomplete, unmaintained, and it doesn't belong in the GIT
package anyway.

A more complete version is already included in the Linux -mm tree and
is about to make its way into mainline RSN.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-09 12:14:40 -08:00
David Kågedal
d2589855df git-blame.el: Autoupdate while editing
This adds the support for automatically updating the buffer while editing.
A configuration variable git-blame-autoupdate controls whether this should
be enabled or not.

Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-09 00:52:53 -08:00
David Kågedal
96df551cb8 git-blame.el: Doc fixes and cleanup
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-09 00:52:53 -08:00
David Kågedal
f0f39bb4c4 git-blame.el: blame unsaved changes
Make git-blame use the current buffer contents for the blame, instead of
the saved file.  This makes the blame correct even if there are unsaved
changes.

Also added a git-reblame command.

Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-09 00:52:53 -08:00
David Kågedal
fa88211600 git-blame.el: improve color handling
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-09 00:52:52 -08:00
David Kågedal
9f85fb324d Handle uncommitted changes and cache descriptions
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-09 00:52:52 -08:00
Jakub Narebski
f6f125fbaa git-blame: Change installation instructions
Change installation instructions to using either "(require 'git-blame)"
or appropriate autoload instruction in GNU Emacs init file, .emacs
This required adding "(provide 'git-blame)" at the end of git-blame.el
and adding [preliminary] docstring to `git-blame-mode' function for
consistency (to mark function as interactive in `autoload' we have to
provide docstring as DOCSTRING is third arg, and INTERACTIVE fourth,
and both are optional).  `git-blame-mode' is marked to autoload.

While at it ensure that we add `git-blame-mode' to `minor-mode-alist'
only once (in a way that does not depend on `cl' package).

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-09 00:52:52 -08:00
Jakub Narebski
b52ba1a5d6 git-blame: Add Emacs Lisp file headers and GNU GPL boilerplate
Add Emacs Lisp file headers, according to "Coding Conventions" chapter
in Emacs Lisp Reference Manual and Elisp Area Convetions for
EmacsWiki:
  http://www.emacswiki.org/cgi-bin/wiki/ElispAreaConventions
Those include: copyright notice, GNU GPL boilerplate, description and
instalation instructions as provided in email and in commit message
introducing git-blame.el, compatibility notes from another email by
David Kågedal about what to change to use it in GNU Emacs 20, and
"git-blame ends here" to detect if file was truncated.  First line
includes setting file encoding via first line local variable values
(file variables).

Added comment to "(require 'cl)" to note why it is needed; "Coding
Conventions" advises to avoid require the `cl' package of Common Lisp
extensions at run time.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-09 00:52:52 -08:00
Junio C Hamano
9e2586ff2f Documentation/git-pull: describe default behaviour and config interactions
The way 'git pull' without explicit parameters work were not
explained well in any existing documentation.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-08 23:35:43 -08:00
Shawn O. Pearce
d585e782b0 git-gui: Focus into blame panels on Mac OS.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-09 02:28:32 -05:00
Junio C Hamano
40facde06e reflog: handle $name => remotes/%s/HEAD mapping consistently for logs
When refs/remotes/gfi/master and refs/remotes/gfi/HEAD exist,
and the latter is a symref that points at the former, dwim_ref()
resolves string "gfi" to "refs/remotes/gfi/master" as expected,
but dwim_log() does not understand "gfi@{1.day}" and needs to be
told "gfi/master@{1.day}".  This is confusing.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-08 23:24:51 -08:00
Shawn O. Pearce
486ef5270c git-gui: Improve annotated file display.
Rather than trying to mark the background color of the line numbers
to show which lines have annotated data loaded, we now show a ruler
between the line numbers and the file data.  This ruler is just 1
character wide and its background color is set to grey to denote
which lines have annotation ready.  I had to make this change as I
kept loosing the annotation marker when a line was no longer colored
as part of the current selection.

We now color the lines blamed on the current commit in yellow, the
lines in the commit which came after (descendant) in red (hotter,
less tested) and the lines in the commit before (ancestor) in blue
(cooler, better tested).

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-09 01:59:38 -05:00
Shawn O. Pearce
1351ba13e5 git-gui: Jump to the first annotation block as soon as its available.
To help clue users into the fact that annotation data arrives
incrementally, and that they should try to locate the region
they want while the tool is running, we jump to the first line
of the first annotation if the user has not already clicked on
a line they are interested in and if the window is still looking
at the very top of the file.

Since it takes a second (at least on my PowerBook) to even generate
the first annotation for git-gui.sh, the user should have plenty of
time to adjust the scrollbar or click on a line even before we get
that first annotation record in, which allows the user to bypass
our automatic jumping.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-08 22:41:51 -05:00
Shawn O. Pearce
6910ae80d0 git-gui: Redesign the display of annotated files.
Using 180 columns worth of screen space to display just 20 columns of
file data and 160 columns worth of annotation information is not
practically useful.  Users need/want to see the file data, and have
the anotation associated with it displayed in a detail pane only when
they have focused on a particular region of the file.

Now our file viewer has a small 10-line high pane below the file
which shows the commit message for the commit this line was blamed
on.  The columns have all been removed, except the current line
number column as that has some real value when trying to locate an
interesting block.

To keep the user entertained we have a progress meter in the status
bar of the viewer which lets them know how many lines have been
annotated, and how much has been completed.  We use a grey background
on the line numbers for lines which we have obtained annotation from,
and we color all lines in the current commit with a yellow background,
so they stand out when scanning through the file.  All other lines
are kept with a white background, making the yellow really pop.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-08 21:39:27 -05:00
Johannes Schindelin
eb3a48221f log --reflog: use dwim_log
Since "git log origin/master" uses dwim_log() to match
"refs/remotes/origin/master", it makes sense to do that for
"git log --reflog", too.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-08 17:48:22 -08:00
Johannes Schindelin
e00de24b10 format-patch -n: make sorting easier by padding number
Now, when format-patch outputs more than 9 patches, the numbers
are padded accordingly. Example:

	[PATCH 009/167] The 9th patch of a series of 167

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-08 17:47:38 -08:00
Shawn O. Pearce
df6287ecd7 git-gui: Use git-config now over git-repo-config.
Now that core Git has "renamed" git-repo-config to git-config,
we should do the same.  I don't know how long core Git will
keep the repo-config command, and since git-gui's userbase
is so small and almost entirely on some flavor of 1.5.0-rc2
or later, where the rename has already taken place, it should
be OK to rename now.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-08 19:53:36 -05:00
Shawn O. Pearce
24d2bf2f02 git-gui: Relabel the Add All action.
One user that I spoke with recently was confused why the 'Add All'
button did not add all of his 'Changed But Not Updated' files.
The particular files in question were new, and thus not known to
Git.  Since the 'Add All' routine only updates files which are
already tracked, they were not added automatically.

I suspect that calling this action 'Add Existing' would be less
confusing, so I'm renaming it.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-08 19:44:49 -05:00