Code

tig.git
18 years agoConfig: improve error reporting and do a few cleanups and simplifications
Jonas Fonseca [Fri, 9 Jun 2006 00:08:28 +0000 (02:08 +0200)]
Config: improve error reporting and do a few cleanups and simplifications

18 years agoAdd support for keybindings
Jonas Fonseca [Thu, 8 Jun 2006 00:03:16 +0000 (02:03 +0200)]
Add support for keybindings

The syntax is

bind <keymap> <key> <request>

Keybindings are resolved by first looking in the keymap of the active view,
then in the generic keymap, and finally in the built-in default keybindings.

Examples to put in ~/.tigrc:

bind main w scroll-line-up
bind main s scroll-line-down
bind diff a previous
bind diff d next
bind diff b move-first-line
bind generic g view-next

18 years agoRename keymap to keybinding, get_request to get_keybinding
Jonas Fonseca [Wed, 7 Jun 2006 23:52:50 +0000 (01:52 +0200)]
Rename keymap to keybinding, get_request to get_keybinding

18 years agoAdd default configuration file
Jonas Fonseca [Wed, 7 Jun 2006 22:14:43 +0000 (00:14 +0200)]
Add default configuration file

18 years agoAdd special string comparer for gracefully parsing ~/.tigrc identifiers
Jonas Fonseca [Wed, 7 Jun 2006 22:05:55 +0000 (00:05 +0200)]
Add special string comparer for gracefully parsing ~/.tigrc identifiers

18 years agoEstablish "Open view" section
Jonas Fonseca [Wed, 7 Jun 2006 00:07:47 +0000 (02:07 +0200)]
Establish "Open view" section

18 years agoRename load_help_page to open_help_view and move it up
Jonas Fonseca [Wed, 7 Jun 2006 00:06:01 +0000 (02:06 +0200)]
Rename load_help_page to open_help_view and move it up

Also use view->ops->read() instead of pager_read().

18 years agoMove keybinding stuff up after line stuff
Jonas Fonseca [Tue, 6 Jun 2006 23:55:10 +0000 (01:55 +0200)]
Move keybinding stuff up after line stuff

18 years agoSupport set command in ~/.tigrc; allows a few options to be configured
Jonas Fonseca [Tue, 6 Jun 2006 23:49:51 +0000 (01:49 +0200)]
Support set command in ~/.tigrc; allows a few options to be configured

18 years agoSimplify the option value tokenization by doing it one place
Jonas Fonseca [Tue, 6 Jun 2006 23:15:46 +0000 (01:15 +0200)]
Simplify the option value tokenization by doing it one place

18 years agoFactor out set_option_color from set_option
Jonas Fonseca [Tue, 6 Jun 2006 22:43:24 +0000 (00:43 +0200)]
Factor out set_option_color from set_option

18 years agoMake declaration of die() specify the __NORETURN attribute
Jonas Fonseca [Tue, 6 Jun 2006 22:26:27 +0000 (00:26 +0200)]
Make declaration of die() specify the __NORETURN attribute

Avoids warnings with gcc 3.3.5.

18 years agoImprove error reporting for unknown options
Jonas Fonseca [Tue, 6 Jun 2006 11:35:25 +0000 (13:35 +0200)]
Improve error reporting for unknown options

It will now also show usage help.

18 years agoAdd feature request for showing nearest branch heads or tags for a commit
Jonas Fonseca [Mon, 5 Jun 2006 22:29:22 +0000 (00:29 +0200)]
Add feature request for showing nearest branch heads or tags for a commit

Requested by Junio.

18 years agoMakefile: make customization of installation locations easier
Junio C Hamano [Mon, 5 Jun 2006 00:11:05 +0000 (02:11 +0200)]
Makefile: make customization of installation locations easier

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Jonas F Madsen <fonseca@diku.dk>
18 years agoMake the view title show percentage shown like less
Jonas Fonseca [Sun, 4 Jun 2006 00:46:30 +0000 (02:46 +0200)]
Make the view title show percentage shown like less

The cursor position is already summoned up as "line x of X".

18 years agoImplement the basic controlling of revision graph visualization
Jonas Fonseca [Sat, 3 Jun 2006 23:53:32 +0000 (01:53 +0200)]
Implement the basic controlling of revision graph visualization

It is toggleable via 'g', on by default, and restricted to max being 19
chars wide. Note, it still only shows just the left tee.

18 years agoAdd strip rule
Jonas Fonseca [Sat, 3 Jun 2006 22:41:38 +0000 (00:41 +0200)]
Add strip rule

18 years agoDon't begin any update for the built-in help page
Jonas Fonseca [Thu, 1 Jun 2006 02:48:32 +0000 (04:48 +0200)]
Don't begin any update for the built-in help page

18 years agoMore color and attribute maps closer to the users
Jonas Fonseca [Thu, 1 Jun 2006 02:12:48 +0000 (04:12 +0200)]
More color and attribute maps closer to the users

18 years agoSimplify detection of tag commits via ^{}
Jonas Fonseca [Thu, 1 Jun 2006 02:08:44 +0000 (04:08 +0200)]
Simplify detection of tag commits via ^{}

18 years agoMinor tidyup
Jonas Fonseca [Thu, 1 Jun 2006 02:05:02 +0000 (04:05 +0200)]
Minor tidyup

18 years agoGeneralize the option parsing
Jonas Fonseca [Thu, 1 Jun 2006 01:36:35 +0000 (03:36 +0200)]
Generalize the option parsing

18 years agoMove tig(1) material to tig.1.txt
Jonas Fonseca [Thu, 1 Jun 2006 00:16:16 +0000 (02:16 +0200)]
Move tig(1) material to tig.1.txt

18 years agoCorrect error checking
Jonas Fonseca [Wed, 31 May 2006 23:41:52 +0000 (01:41 +0200)]
Correct error checking

Fixes: cc2d13642a837163fb0e35d87a51ff96b7bf3cb0
18 years agoRemove prev arg to view->ops->read()
Jonas Fonseca [Wed, 31 May 2006 23:37:30 +0000 (01:37 +0200)]
Remove prev arg to view->ops->read()

18 years agoWrap all snprintf usage to simplify error handling
Jonas Fonseca [Wed, 31 May 2006 21:16:38 +0000 (23:16 +0200)]
Wrap all snprintf usage to simplify error handling

18 years agoAdd support for showing tags and other repo refs in the diff and log view
Jonas Fonseca [Wed, 31 May 2006 20:47:46 +0000 (22:47 +0200)]
Add support for showing tags and other repo refs in the diff and log view

18 years agoRefactor view->line reallocation
Jonas Fonseca [Wed, 31 May 2006 20:14:34 +0000 (22:14 +0200)]
Refactor view->line reallocation

18 years agoMake 'h' and '?' show built-in key binding quick reference
Jonas Fonseca [Wed, 31 May 2006 19:07:13 +0000 (21:07 +0200)]
Make 'h' and '?' show built-in key binding quick reference

18 years agoRename documentation build rules using s/docs/doc/; more like git
Jonas Fonseca [Tue, 30 May 2006 23:04:36 +0000 (01:04 +0200)]
Rename documentation build rules using s/docs/doc/; more like git

18 years agoAdd COPYING file
Jonas Fonseca [Tue, 30 May 2006 13:23:19 +0000 (15:23 +0200)]
Add COPYING file

18 years agoFix segfault where current_view would become >= sizeof(display)
Jonas Fonseca [Mon, 29 May 2006 21:29:38 +0000 (23:29 +0200)]
Fix segfault where current_view would become >= sizeof(display)

Hard code current_view indexes for split screen setup.

Reported-by: Dennis (dst_) on #git
18 years agoRemove SITES title so it is more adaptive to where it is included
Jonas Fonseca [Mon, 29 May 2006 19:37:24 +0000 (21:37 +0200)]
Remove SITES title so it is more adaptive to where it is included

18 years agoSplit out manual material to separate file
Jonas Fonseca [Mon, 29 May 2006 19:36:57 +0000 (21:36 +0200)]
Split out manual material to separate file

18 years agoList SITES in tig(1)
Jonas Fonseca [Mon, 29 May 2006 01:27:36 +0000 (03:27 +0200)]
List SITES in tig(1)

18 years agoMove stuff to SITES and INSTALL files
Jonas Fonseca [Mon, 29 May 2006 01:25:43 +0000 (03:25 +0200)]
Move stuff to SITES and INSTALL files

18 years agoMove stuff to BUGS and TODO files; only show BUGS in tig(1)
Jonas Fonseca [Mon, 29 May 2006 01:19:16 +0000 (03:19 +0200)]
Move stuff to BUGS and TODO files; only show BUGS in tig(1)

18 years agoMove ~/.tigrc documentation into it's own man page, tigrc(5)
Jonas Fonseca [Mon, 29 May 2006 01:15:20 +0000 (03:15 +0200)]
Move ~/.tigrc documentation into it's own man page, tigrc(5)

18 years agoUse ~/.tigrc for user configuration rather than ~/.tig
Jonas Fonseca [Mon, 29 May 2006 01:01:27 +0000 (03:01 +0200)]
Use ~/.tigrc for user configuration rather than ~/.tig

18 years agoAdd TODO about keybinding cheat sheet
Jonas Fonseca [Sun, 28 May 2006 21:51:48 +0000 (23:51 +0200)]
Add TODO about keybinding cheat sheet

Requested by gitster on IRC.

18 years agoEmit more informative error messages when loading ~/.tig
Jonas Fonseca [Sun, 28 May 2006 18:59:31 +0000 (20:59 +0200)]
Emit more informative error messages when loading ~/.tig

18 years agoOnly touch the option strings if necessary
Jonas Fonseca [Sun, 28 May 2006 18:19:32 +0000 (20:19 +0200)]
Only touch the option strings if necessary

18 years agoImprove color documentation
Jonas Fonseca [Sun, 28 May 2006 18:11:47 +0000 (20:11 +0200)]
Improve color documentation

18 years agoAdd support for setting color options in the ~/.tig user configuration file
Jonas Fonseca [Sun, 28 May 2006 14:38:32 +0000 (16:38 +0200)]
Add support for setting color options in the ~/.tig user configuration file

Now you can put stuff like this in ~/.tig:

# Diff colors
color diff-header yellow default
color diff-index blue default
color diff-chunk magenta default
# UI colors
color title-blur white blue
color title-focus white blue bold

18 years agoMake read_properties take several separator characters; chomp name & value
Jonas Fonseca [Sun, 28 May 2006 03:23:52 +0000 (05:23 +0200)]
Make read_properties take several separator characters; chomp name & value

This concludes the fundation for using read_properties to read options from
a config file.

18 years agoOops, fix short help wrt tab size short option
Jonas Fonseca [Sun, 28 May 2006 02:36:34 +0000 (04:36 +0200)]
Oops, fix short help wrt tab size short option

18 years agoRename repo config loaders using s/config/repo_config/
Jonas Fonseca [Sun, 28 May 2006 02:29:45 +0000 (04:29 +0200)]
Rename repo config loaders using s/config/repo_config/

load_config    -> load_repo_config
read_config_option -> read_repo_config_option

18 years agoMake read_properties() take FILE *pipe instead of command line
Jonas Fonseca [Sun, 28 May 2006 02:19:46 +0000 (04:19 +0200)]
Make read_properties() take FILE *pipe instead of command line

18 years agoDocument the loading time displayed in the title window after 3 seconds
Jonas Fonseca [Sun, 28 May 2006 02:19:08 +0000 (04:19 +0200)]
Document the loading time displayed in the title window after 3 seconds

18 years agoMake the stop all loading request stop all loading
Jonas Fonseca [Sun, 28 May 2006 01:55:31 +0000 (03:55 +0200)]
Make the stop all loading request stop all loading

18 years agoNotify that the prompt is unusable while loading
Jonas Fonseca [Sun, 28 May 2006 01:51:53 +0000 (03:51 +0200)]
Notify that the prompt is unusable while loading

List it as a bug.

18 years agoTab size short option changes from -t to -b
Jonas Fonseca [Sun, 28 May 2006 01:02:19 +0000 (03:02 +0200)]
Tab size short option changes from -t to -b

18 years agoMinor usability fix: when closing never switch to an already closed view
Jonas Fonseca [Sat, 27 May 2006 22:58:04 +0000 (00:58 +0200)]
Minor usability fix: when closing never switch to an already closed view

18 years ago"View commands" section becomes "History commands".
Jonas Fonseca [Sat, 27 May 2006 21:21:28 +0000 (23:21 +0200)]
"View commands" section becomes "History commands".

18 years agoLicense revisited: it's GPLv2 or later
Jonas Fonseca [Fri, 26 May 2006 21:47:23 +0000 (23:47 +0200)]
License revisited: it's GPLv2 or later

18 years agoFix off by one error; makes tags visible again
Jonas Fonseca [Fri, 26 May 2006 20:26:32 +0000 (22:26 +0200)]
Fix off by one error; makes tags visible again

Fixes: d0cea5f929be563d049bc5205fb8de08fd080c32
18 years agoWhen updating the title window, move the cursor to the end of line
Jonas Fonseca [Fri, 26 May 2006 20:09:50 +0000 (22:09 +0200)]
When updating the title window, move the cursor to the end of line

This way the cursor (hopefully) won't feel so jumpy.

18 years agoFactor out cursor moving
Jonas Fonseca [Fri, 26 May 2006 20:08:06 +0000 (22:08 +0200)]
Factor out cursor moving

18 years agoMake window switching smother; fix blurring of previous view when switching
Jonas Fonseca [Fri, 26 May 2006 19:12:43 +0000 (21:12 +0200)]
Make window switching smother; fix blurring of previous view when switching

Don't refresh after a resize, since it causes the previous content to be
shortly displayed. We now simply resize and clear and waits for the first
read to start displaying the new content.

18 years agoNever close backgrounded loads; only clear window when starting to update
Jonas Fonseca [Fri, 26 May 2006 18:02:01 +0000 (20:02 +0200)]
Never close backgrounded loads; only clear window when starting to update

Before windows was cleared each time open_view maximized for example the
main view when it was still loading.

18 years agoOnly pass on properies with non-zero length names
Jonas Fonseca [Wed, 24 May 2006 22:41:53 +0000 (00:41 +0200)]
Only pass on properies with non-zero length names

18 years agoRefactor reading of properties from pipes
Jonas Fonseca [Wed, 24 May 2006 21:57:52 +0000 (23:57 +0200)]
Refactor reading of properties from pipes

18 years agoLoad config before parsing command line options so they can override
Jonas Fonseca [Wed, 24 May 2006 21:12:28 +0000 (23:12 +0200)]
Load config before parsing command line options so they can override

18 years agoMake UTF-8 handling optional but still default
Jonas Fonseca [Wed, 24 May 2006 20:58:11 +0000 (22:58 +0200)]
Make UTF-8 handling optional but still default

Handling of output encoding still missing.

18 years agoAdd support for loading repo config
Jonas Fonseca [Wed, 24 May 2006 17:51:11 +0000 (19:51 +0200)]
Add support for loading repo config

Test it by storing i18n.commitencoding, soon to be uesd.

18 years agoCleanup see also section
Jonas Fonseca [Wed, 24 May 2006 15:18:33 +0000 (17:18 +0200)]
Cleanup see also section

18 years agoMove env handling up below option handling
Jonas Fonseca [Wed, 24 May 2006 15:16:41 +0000 (17:16 +0200)]
Move env handling up below option handling

18 years agoPut license also in the program header
Jonas Fonseca [Wed, 24 May 2006 15:01:16 +0000 (17:01 +0200)]
Put license also in the program header

18 years agoRearrange pager_enter logic
Jonas Fonseca [Wed, 24 May 2006 14:56:52 +0000 (16:56 +0200)]
Rearrange pager_enter logic

18 years agoUpdate README; set a less ugly font-family
Jonas Fonseca [Wed, 24 May 2006 02:32:36 +0000 (04:32 +0200)]
Update README; set a less ugly font-family

18 years agoIntroduce struct line and use it for view->line
Jonas Fonseca [Wed, 24 May 2006 01:23:43 +0000 (03:23 +0200)]
Introduce struct line and use it for view->line

Somewhat experimental. This will call get_line_type() on every read line.

18 years agoImprove title updating and remove flickering
Jonas Fonseca [Tue, 23 May 2006 22:29:24 +0000 (00:29 +0200)]
Improve title updating and remove flickering

 - Show line info even if no lines has been loaded, so less has to be
   redrawn.

 - Don't make the view window one line bigger causing the title window
   to be overwritten. This reinstates the bug in last line drawing.

18 years agoMake update reporting less verbose
Jonas Fonseca [Tue, 23 May 2006 21:54:55 +0000 (23:54 +0200)]
Make update reporting less verbose

It got too annoying when browsing through the split main/diff screen.
Instead put the update timer in the title window if it grows beyond
2 seconds.

18 years agoFix spurious resizing of the display (take 2)
Jonas Fonseca [Mon, 22 May 2006 22:19:27 +0000 (00:19 +0200)]
Fix spurious resizing of the display (take 2)

18 years agoAdd macro for getting number of displayed views
Jonas Fonseca [Mon, 22 May 2006 22:08:11 +0000 (00:08 +0200)]
Add macro for getting number of displayed views

18 years agoOnly resize the display when actually required
Jonas Fonseca [Sun, 21 May 2006 23:26:22 +0000 (01:26 +0200)]
Only resize the display when actually required

18 years agoFix updating of the main view title when the screen isn't split
Jonas Fonseca [Sun, 21 May 2006 23:18:13 +0000 (01:18 +0200)]
Fix updating of the main view title when the screen isn't split

18 years agoEnd the current update before begining a new one; fixes CPU hogging
Jonas Fonseca [Sun, 21 May 2006 23:04:49 +0000 (01:04 +0200)]
End the current update before begining a new one; fixes CPU hogging

18 years agoBind 'j'/'k' to moving up/down; add next/previous requests bound to Down/Up
Jonas Fonseca [Sun, 21 May 2006 02:44:08 +0000 (04:44 +0200)]
Bind 'j'/'k' to moving up/down; add next/previous requests bound to Down/Up

This adds support for using these next/previous requests for changing the
current commit in the main view from the diff view, if the diff view has
the main view as it's parent.

Works for both split- and full-screen diff views by making redrawing
conditional when moving (and doing the lowlevel scrolling).

Replaces REQ_MOVE_{UP,DOWN}_ENTER.

18 years agoMove struct commit to appear just above the main view backend
Jonas Fonseca [Sun, 21 May 2006 02:08:52 +0000 (04:08 +0200)]
Move struct commit to appear just above the main view backend

18 years agoAdd -O2 to CFLAGS to get more warnings
Jonas Fonseca [Sun, 21 May 2006 01:19:19 +0000 (03:19 +0200)]
Add -O2 to CFLAGS to get more warnings

18 years agoCache all queries for refs based on ID
Jonas Fonseca [Sun, 21 May 2006 01:18:56 +0000 (03:18 +0200)]
Cache all queries for refs based on ID

At least then they won't appear as a source of leaking and in the future
the main view can be reloaded without having to deal freeing them.

18 years agoMove git directory assertion to main; don't require .git repo in pager mode
Jonas Fonseca [Sat, 20 May 2006 19:07:44 +0000 (21:07 +0200)]
Move git directory assertion to main; don't require .git repo in pager mode

18 years agoIn pager mode, fix entering commit lines from log and pager view
Jonas Fonseca [Sat, 20 May 2006 16:42:26 +0000 (18:42 +0200)]
In pager mode, fix entering commit lines from log and pager view

18 years agoRemove old window cycling code from before enter request appeared
Jonas Fonseca [Sat, 20 May 2006 15:56:10 +0000 (17:56 +0200)]
Remove old window cycling code from before enter request appeared

18 years agoAdd simple window stack, tracking view relation ship via parent member
Jonas Fonseca [Sat, 20 May 2006 15:39:25 +0000 (17:39 +0200)]
Add simple window stack, tracking view relation ship via parent member

This makes it possible to easily switch back to the main (or log) view
by closing the diff view, regardless of whether it is split or full-screen.

Requested-by: Aneesh Kumar <aneesh.kumar@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
18 years agoRemove objsize member from struct commit
Jonas Fonseca [Sat, 20 May 2006 14:10:15 +0000 (16:10 +0200)]
Remove objsize member from struct commit

It is unused.

18 years agoMake Enter in the pager view always scroll
Jonas Fonseca [Sat, 20 May 2006 13:22:28 +0000 (15:22 +0200)]
Make Enter in the pager view always scroll

It will still split to diff view if a commit line is detected.

18 years agoRecord builds with dirty working tree by appending -dirty to the version
Jonas Fonseca [Sat, 20 May 2006 12:47:23 +0000 (14:47 +0200)]
Record builds with dirty working tree by appending -dirty to the version

18 years agoRemove trailing space; make cursed global static
Jonas Fonseca [Sat, 20 May 2006 12:37:31 +0000 (14:37 +0200)]
Remove trailing space; make cursed global static

18 years agoMake -h and --help options ouput a help message
Jonas Fonseca [Sat, 20 May 2006 02:45:22 +0000 (04:45 +0200)]
Make -h and --help options ouput a help message

18 years agoBind '-' to PageUp; raises Mutt compatibility
Jonas Fonseca [Sat, 20 May 2006 01:39:07 +0000 (03:39 +0200)]
Bind '-' to PageUp; raises Mutt compatibility

Requested-by: Aneesh Kumar <aneesh.kumar@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
18 years agoStreamline version displaying and show built date
Jonas Fonseca [Sat, 20 May 2006 02:14:53 +0000 (04:14 +0200)]
Streamline version displaying and show built date

18 years agoMake Enter in the main view switch to the split diff view
Jonas Fonseca [Sat, 20 May 2006 01:39:07 +0000 (03:39 +0200)]
Make Enter in the main view switch to the split diff view

This way, holding down Enter will open the commit diff and start scrolling
much like Mutt behaves.

Requested-by: Aneesh Kumar <aneesh.kumar@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
18 years agoAdd preliminary support for UTF-8 handling in the main view
Jonas Fonseca [Sat, 20 May 2006 01:30:41 +0000 (03:30 +0200)]
Add preliminary support for UTF-8 handling in the main view

It is very simple but fixes the issue with unaligned drawing of the line
between the author and log title columns.

18 years agoAdd close view request; bound to 'q' by default
Jonas Fonseca [Fri, 19 May 2006 20:19:19 +0000 (22:19 +0200)]
Add close view request; bound to 'q' by default

If only one view is open it will quit. More compatible with Mutt behavior.

Based on patch by Aneesh Kumar <aneesh.kumar@gmail.com>

18 years agoBind quit to 'Q'
Jonas Fonseca [Fri, 19 May 2006 19:50:48 +0000 (21:50 +0200)]
Bind quit to 'Q'

18 years agoAdd -Werror to the cc debug flags
Jonas Fonseca [Fri, 19 May 2006 19:25:35 +0000 (21:25 +0200)]
Add -Werror to the cc debug flags

18 years agoPressing Enter in the diff view will now scroll it one line down
Jonas Fonseca [Thu, 18 May 2006 08:15:09 +0000 (10:15 +0200)]
Pressing Enter in the diff view will now scroll it one line down

Make tig more compatible with Mutt behavior.

Requested-by: Aneesh Kumar <aneesh.kumar@gmail.com>