Code

tig.git
18 years agoTODO: repository status view, better text-input support
Jonas Fonseca [Sun, 17 Sep 2006 19:29:59 +0000 (21:29 +0200)]
TODO: repository status view, better text-input support

18 years agotigrc(5): mention tree/blob view actions; use dash in favour of underscore
Jonas Fonseca [Sat, 16 Sep 2006 18:28:02 +0000 (20:28 +0200)]
tigrc(5): mention tree/blob view actions; use dash in favour of underscore

18 years agoRun the documentation through aspell
Jonas Fonseca [Sat, 16 Sep 2006 18:24:37 +0000 (20:24 +0200)]
Run the documentation through aspell

18 years agoBUGS: Merge locale support with utf8-only bug, add horizontal scrolling
Jonas Fonseca [Sat, 16 Sep 2006 01:36:20 +0000 (03:36 +0200)]
BUGS: Merge locale support with utf8-only bug, add horizontal scrolling

18 years agoAbbreviate the view reference in the view title for small widths
Jonas Fonseca [Sat, 16 Sep 2006 00:37:49 +0000 (02:37 +0200)]
Abbreviate the view reference in the view title for small widths

18 years agoupdate_view_title: format load seconds as part of the state string
Jonas Fonseca [Sat, 16 Sep 2006 00:22:34 +0000 (02:22 +0200)]
update_view_title: format load seconds as part of the state string

18 years agoupdate_view_title: use string_format_from instead of wprintw
Jonas Fonseca [Sat, 16 Sep 2006 00:12:24 +0000 (02:12 +0200)]
update_view_title: use string_format_from instead of wprintw

18 years agoA simple fix of the bad wrapping bugs
Jonas Fonseca [Fri, 15 Sep 2006 23:40:10 +0000 (01:40 +0200)]
A simple fix of the bad wrapping bugs

This was surprisingly simple to fix by just turning off scrolling in
draw_view_line. From the BUGS file:

 - If the screen width is very small the main view can draw outside the
   current view causing bad wrapping. Same goes for title and status
   windows.

 - The cursor can wrap-around on the last line and cause the window to
   scroll.

18 years agoupdate_display_cursor: take view as arg
Jonas Fonseca [Fri, 15 Sep 2006 00:41:20 +0000 (02:41 +0200)]
update_display_cursor: take view as arg

18 years agoSIZEOF_REV introduced: 41 bytes of pure madness!
Jonas Fonseca [Tue, 12 Sep 2006 03:44:54 +0000 (05:44 +0200)]
SIZEOF_REV introduced: 41 bytes of pure madness!

18 years agoMinor cleanups
Jonas Fonseca [Tue, 12 Sep 2006 00:45:36 +0000 (02:45 +0200)]
Minor cleanups

18 years agoOops, always update the tree view ref
Jonas Fonseca [Tue, 12 Sep 2006 00:23:16 +0000 (02:23 +0200)]
Oops, always update the tree view ref

18 years agoFix updating of the blob ref and the blob view ref
Jonas Fonseca [Tue, 12 Sep 2006 00:05:17 +0000 (02:05 +0200)]
Fix updating of the blob ref and the blob view ref

So now pressing 'f' on a tree link won't open a blank blob view. Also, the
blob reference shown in the title bar is always up to date.

18 years agoAlso color Acked-by lines
Jonas Fonseca [Mon, 11 Sep 2006 23:36:32 +0000 (01:36 +0200)]
Also color Acked-by lines

18 years agoFix redrawing of old current line
Jonas Fonseca [Mon, 11 Sep 2006 23:30:17 +0000 (01:30 +0200)]
Fix redrawing of old current line

Hopefully the last of all this sloppy bug fixing of the recent cleanups.

18 years agoOnly split the tree view when the tree view is visible
Jonas Fonseca [Mon, 11 Sep 2006 22:22:42 +0000 (00:22 +0200)]
Only split the tree view when the tree view is visible

18 years agomove_view: drop redraw arg and handle backgrounded moves
Jonas Fonseca [Mon, 11 Sep 2006 22:05:06 +0000 (00:05 +0200)]
move_view: drop redraw arg and handle backgrounded moves

18 years agodo_scroll_view: drop redraw arg
Jonas Fonseca [Mon, 11 Sep 2006 21:20:52 +0000 (23:20 +0200)]
do_scroll_view: drop redraw arg

This redraw thing should be fixed in move_view since this is not relevant
for scroll_view.

18 years agodo_scroll_view: minor refactoring of the current line updating
Jonas Fonseca [Mon, 11 Sep 2006 21:07:46 +0000 (23:07 +0200)]
do_scroll_view: minor refactoring of the current line updating

18 years agosearch_view: use opt_search directly instead of through an argument
Jonas Fonseca [Mon, 11 Sep 2006 20:40:22 +0000 (22:40 +0200)]
search_view: use opt_search directly instead of through an argument

18 years agoRemove some old cruft that was clearing hidden lines at the end
Jonas Fonseca [Mon, 11 Sep 2006 20:10:08 +0000 (22:10 +0200)]
Remove some old cruft that was clearing hidden lines at the end

This was used for the first attempt at fixing the bug where the cursor
wraps around on the last line and causes the window to scroll.

18 years agoIntroduce selected flag and use it for refacter wclrtoeol usage
Jonas Fonseca [Mon, 11 Sep 2006 20:03:35 +0000 (22:03 +0200)]
Introduce selected flag and use it for refacter wclrtoeol usage

This is used when clearing the old current line.

18 years agoAdd selected arg to the view draw operation
Jonas Fonseca [Mon, 11 Sep 2006 19:44:03 +0000 (21:44 +0200)]
Add selected arg to the view draw operation

18 years agoRefactor current line activation to new select view operation
Jonas Fonseca [Mon, 11 Sep 2006 18:38:20 +0000 (20:38 +0200)]
Refactor current line activation to new select view operation

18 years agoFix tree viewing again; introduced by string safety patch
Jonas Fonseca [Mon, 11 Sep 2006 04:23:49 +0000 (06:23 +0200)]
Fix tree viewing again; introduced by string safety patch

18 years agoMake view->regex into a pointer
Jonas Fonseca [Mon, 11 Sep 2006 04:22:51 +0000 (06:22 +0200)]
Make view->regex into a pointer

18 years agoFix git-describe reference adding when there are no tags and thus no output
Jonas Fonseca [Mon, 11 Sep 2006 04:04:02 +0000 (06:04 +0200)]
Fix git-describe reference adding when there are no tags and thus no output

18 years agoImprove string buffer copy safety
Jonas Fonseca [Mon, 11 Sep 2006 01:12:15 +0000 (03:12 +0200)]
Improve string buffer copy safety

18 years agoHrmpf, fix one more default keybinding clash, this time the blob view
Jonas Fonseca [Mon, 11 Sep 2006 00:46:23 +0000 (02:46 +0200)]
Hrmpf, fix one more default keybinding clash, this time the blob view

By default, it is now bound to 'f'.

18 years agoReview all string_format users and use string_format instead of snprintf
Jonas Fonseca [Mon, 11 Sep 2006 00:13:48 +0000 (02:13 +0200)]
Review all string_format users and use string_format instead of snprintf

18 years agoMove the current line to the first entry in the tree view
Jonas Fonseca [Sun, 10 Sep 2006 23:32:05 +0000 (01:32 +0200)]
Move the current line to the first entry in the tree view

18 years agoUse ICONV_NONE instead of (iconv_t) -1
Jonas Fonseca [Sun, 10 Sep 2006 23:21:03 +0000 (01:21 +0200)]
Use ICONV_NONE instead of (iconv_t) -1

18 years agoRemove redundant ending ';'
Jonas Fonseca [Sun, 10 Sep 2006 22:31:24 +0000 (00:31 +0200)]
Remove redundant ending ';'

18 years agomanual: mention the tree/blob views
Jonas Fonseca [Sun, 10 Sep 2006 21:14:19 +0000 (23:14 +0200)]
manual: mention the tree/blob views

18 years agoFix default keybinding clash for 'n' between find-next and toggle-lineno
Jonas Fonseca [Sun, 10 Sep 2006 21:13:35 +0000 (23:13 +0200)]
Fix default keybinding clash for 'n' between find-next and toggle-lineno

The toggle-lineno is now bound to '.' by default.

18 years agoUse size_t instead of int for string_* functions
Jonas Fonseca [Sun, 10 Sep 2006 20:56:28 +0000 (22:56 +0200)]
Use size_t instead of int for string_* functions

18 years agoReintroduce foreach_view and use it to fix background loading
Jonas Fonseca [Sun, 10 Sep 2006 19:54:39 +0000 (21:54 +0200)]
Reintroduce foreach_view and use it to fix background loading

Like the main view, when you after start-up switches to the
tree view.

Also spreads some more asserts to verify guard that no view other than
those being displayed updates their screen.

18 years agoRename foreach_view to foreach_displayed_view
Jonas Fonseca [Sun, 10 Sep 2006 18:42:17 +0000 (20:42 +0200)]
Rename foreach_view to foreach_displayed_view

18 years agoAdd support for tree and blob view
Jonas Fonseca [Sun, 10 Sep 2006 15:49:18 +0000 (17:49 +0200)]
Add support for tree and blob view

No command line options have been added to directly enter the tree/blob
views, since that would require a much more complex option parsing because
it would no longer be possible to rely on git's option parsing.

Default keybindings are:
't' show tree view
'b' show blob view

18 years agotig(1): Do not differentiate between git (show|log|diff) options
Jonas Fonseca [Sat, 9 Sep 2006 20:15:07 +0000 (22:15 +0200)]
tig(1): Do not differentiate between git (show|log|diff) options

... they all basically use the same option parser, so ...

18 years agoReformat the state variable list (opt_*)
Jonas Fonseca [Sat, 9 Sep 2006 20:09:26 +0000 (22:09 +0200)]
Reformat the state variable list (opt_*)

18 years agoAdd support for searching using regex
Jonas Fonseca [Sat, 9 Sep 2006 20:04:36 +0000 (22:04 +0200)]
Add support for searching using regex

For commits the title, author, and displayed date string is searchable.
Search text is not highlighted, the current line is simply used to jump
around and show which line matched.

Default keybindings:

'/' search forward
'?' search backward
'n' find next
'N' find previous

Note, this means that '?' no longer displays the help view, just use 'h'.

18 years agoReplace screen-update action with noop action named "none"
Jonas Fonseca [Fri, 8 Sep 2006 17:04:55 +0000 (19:04 +0200)]
Replace screen-update action with noop action named "none"

Promote it as a way to unbind built-in default key bindings.

18 years agoread_prompt: return static allocated buffer; move out exec mode setup
Jonas Fonseca [Fri, 8 Sep 2006 16:41:56 +0000 (18:41 +0200)]
read_prompt: return static allocated buffer; move out exec mode setup

18 years agoread_prompt: take prompt 'name' as arg
Jonas Fonseca [Fri, 8 Sep 2006 16:21:43 +0000 (18:21 +0200)]
read_prompt: take prompt 'name' as arg

18 years agoSIZEOF_STR: introduced and use instead of 1024, also replaces SIZEOF_CMD
Jonas Fonseca [Fri, 8 Sep 2006 16:27:10 +0000 (18:27 +0200)]
SIZEOF_STR: introduced and use instead of 1024, also replaces SIZEOF_CMD

18 years agoAdd poor man's "show most recent tag" by using git-describe
Jonas Fonseca [Thu, 7 Sep 2006 21:28:53 +0000 (23:28 +0200)]
Add poor man's "show most recent tag" by using git-describe

In the diff view, the "Refs:" lines will now sport the output of
git-describe by appending it as the last reference to the line.

Now, it should probably be optional and I mostly added it because I wanted
to do a little tig hacking. Anyway, let's hope it will be useful.

18 years agoadd_pager_refs: rename local line data pointer to commit_id
Jonas Fonseca [Thu, 7 Sep 2006 20:32:47 +0000 (22:32 +0200)]
add_pager_refs: rename local line data pointer to commit_id

18 years agoAdd .gitignore file
Jonas Fonseca [Mon, 4 Sep 2006 23:28:14 +0000 (01:28 +0200)]
Add .gitignore file

18 years agoprompt: make ':show <id>' use the diff view
Jonas Fonseca [Sun, 3 Sep 2006 20:00:55 +0000 (22:00 +0200)]
prompt: make ':show <id>' use the diff view

Being able to have the same diff open twice is not very useful.

18 years agoAdd support for converting from git encoding to locale encoding
Jonas Fonseca [Sun, 3 Sep 2006 19:38:58 +0000 (21:38 +0200)]
Add support for converting from git encoding to locale encoding

18 years agoPass --root to git-show so the diff command will show the initial commit
Jonas Fonseca [Sun, 3 Sep 2006 12:50:23 +0000 (14:50 +0200)]
Pass --root to git-show so the diff command will show the initial commit

18 years agoSilence stderr for all view commands
Jonas Fonseca [Tue, 22 Aug 2006 22:12:57 +0000 (00:12 +0200)]
Silence stderr for all view commands

When quickly scrolling through commits with the split diff view, they was
spewing 'Broken pipe' messages onto the screen.

18 years agoImprove handling of 'bogus' author lines
Jonas Fonseca [Tue, 22 Aug 2006 22:05:06 +0000 (00:05 +0200)]
Improve handling of 'bogus' author lines

If no author name is in the ident line fall-back to use the author email.
Set to "Unknown" if neither is found.

18 years agoCreate directories during make install
Jonas Fonseca [Mon, 24 Jul 2006 21:41:33 +0000 (23:41 +0200)]
Create directories during make install

"In install there should be also mkdir -p $(DESTDIR)$(bindir)." --witekfl.

18 years agoCheck the value returned by fopen() during display initialization
Jonas Fonseca [Mon, 24 Jul 2006 21:35:41 +0000 (23:35 +0200)]
Check the value returned by fopen() during display initialization

12:12 < kahmalo> Opening /dev/tty may fail; what does newterm do then?
20:15 < Miciah> fonseca: You always gotta check the return value of fopen. Silly head.

18 years agoNo need to use --stat for the default TIG_MAIN_CMD
Jonas Fonseca [Wed, 12 Jul 2006 20:40:09 +0000 (22:40 +0200)]
No need to use --stat for the default TIG_MAIN_CMD

My plans to use it to add special categorization/highlighting to commits
never became interesting. Now the complete history of the grafted ELinks'
repo loads in 4 seconds instead of some 240 seconds.

18 years agotig-0.4.git
Jonas Fonseca [Wed, 12 Jul 2006 20:35:22 +0000 (22:35 +0200)]
tig-0.4.git

A little late updating of the VERSION symbol.

18 years agoMerge with ssh://brok.diku.dk/~/tig
Jonas Fonseca [Wed, 12 Jul 2006 20:31:20 +0000 (22:31 +0200)]
Merge with ssh://brok.diku.dk/~/tig

18 years agotigrc(5): Fix keybinding headers
Jonas Fonseca [Wed, 12 Jul 2006 20:29:12 +0000 (22:29 +0200)]
tigrc(5): Fix keybinding headers

18 years agoUse docbook to build manual.pdf; clean *.xml files
Jonas Fonseca [Wed, 14 Jun 2006 23:53:08 +0000 (01:53 +0200)]
Use docbook to build manual.pdf; clean *.xml files

18 years agoAdd sync-docs rule to update docs in the release branch
Jonas Fonseca [Wed, 14 Jun 2006 23:26:01 +0000 (01:26 +0200)]
Add sync-docs rule to update docs in the release branch

18 years agoManual: fix page up keys
Jonas Fonseca [Wed, 14 Jun 2006 23:13:52 +0000 (01:13 +0200)]
Manual: fix page up keys

18 years agoAdd manual link to SITES; improve/fix SEE ALSO sections
Jonas Fonseca [Wed, 14 Jun 2006 23:01:26 +0000 (01:01 +0200)]
Add manual link to SITES; improve/fix SEE ALSO sections

18 years agoCSS fix: s/monospaced/monospace/
Jonas Fonseca [Wed, 14 Jun 2006 21:28:19 +0000 (23:28 +0200)]
CSS fix: s/monospaced/monospace/

18 years agoUse tables for the listing of default keybindings
Jonas Fonseca [Wed, 14 Jun 2006 21:26:06 +0000 (23:26 +0200)]
Use tables for the listing of default keybindings

18 years agoDocumentation update
Jonas Fonseca [Wed, 14 Jun 2006 20:28:10 +0000 (22:28 +0200)]
Documentation update

Brings tigrc(5) into sync. A small fix in INSTALL.

18 years agoAdd "Hash" key name mapped to "#"; Don't use ";" as a comment character
Jonas Fonseca [Wed, 14 Jun 2006 20:27:44 +0000 (22:27 +0200)]
Add "Hash" key name mapped to "#"; Don't use ";" as a comment character

18 years agoAllow strings to be enclosed in either ' or "
Jonas Fonseca [Wed, 14 Jun 2006 19:38:03 +0000 (21:38 +0200)]
Allow strings to be enclosed in either ' or "

So now you can use both:

set commit-encoding = "UTF-8"
set commit-encoding = 'UTF-8'
set commit-encoding =  UTF-8

18 years agoMake prompt use internal user input reader
Jonas Fonseca [Sat, 10 Jun 2006 22:49:17 +0000 (00:49 +0200)]
Make prompt use internal user input reader

This allows it to be used while loading. Also, it will make it possible to
support more advanced editing facilities like history, completion etc.
needed for future search support at least.

It's still very primitive ...

18 years agoMerge with ssh://diku/~/tig
Jonas Fonseca [Fri, 9 Jun 2006 11:15:07 +0000 (13:15 +0200)]
Merge with ssh://diku/~/tig

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 agoRename "encoding" option to "commit-encoding"
Jonas Fonseca [Thu, 8 Jun 2006 13:30:12 +0000 (15:30 +0200)]
Rename "encoding" option to "commit-encoding"

18 years agoInstall HTML files into $(prefix)/share/doc/tig
Jonas Fonseca [Thu, 8 Jun 2006 02:33:07 +0000 (04:33 +0200)]
Install HTML files into $(prefix)/share/doc/tig

18 years agoAdd ToC to the tig manual
Jonas Fonseca [Thu, 8 Jun 2006 02:32:00 +0000 (04:32 +0200)]
Add ToC to the tig manual

18 years agoMisc doc improvements
Jonas Fonseca [Thu, 8 Jun 2006 01:57:55 +0000 (03:57 +0200)]
Misc doc improvements

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