{"thread":{"id":"13006","subject":"[ANNOUNCE] tig-0.11","startedAt":"2008-04-06T20:05:33Z","lastAt":"2008-05-04T19:02:04Z","messageCount":5,"participants":["Jonas Fonseca","Jeff King","Pascal Obry"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"73767","messageId":"20080406200533.GA20537@diku.dk","threadId":"13006","inReplyTo":null,"subject":"[ANNOUNCE] tig-0.11","fromName":"Jonas Fonseca","fromEmail":"fonseca@diku.dk","sentAt":"2008-04-06T20:05:33Z","receivedAt":"2008-04-06T20:05:33Z","isPatch":false,"sender":{"key":"fonseca@diku.dk","avatar":"https://gravatar.com/avatar/f82f3ad698717c51873b020c750a92438c820a24056dc39fe4d07baa10a92264?d=mp&s=160"},"body":"Hello,\n\nThis tig release brings many fixes and improvements to the user\ninterface. Fix pager mode and disable view rely on git directory.  The\ndate and author columns as well as references can now be toggled on and\noff. Local (unsigned) tags are now shown as references and the builtin\nreference colors have been changed to highlight the current branch and\nthe remote tracked by the current branch. The status and stage views are\nnow reloaded after running external commands (e.g. git commit) so they\nstay up to date. Finally, add a blame view accessible from the command\nline (tig blame [rev] file), status view as well as the tree view (by\npressing 'B').\n\nOptions that were deprecated in 0.10 has been removed except for -S and\nthe old -- handling is also gone. Unless anybody complains tig diff will\nprobably also go, while I am still considering what to do with the log\nsubcommand.\n\nFor next release I hope that horizontal scrolling will be fixed. With\nthe recent interest in textual representation of commit graphs, fixing\nor rewriting tig's graph rendering could also be a good addition.\n\nWhat is tig?\n------------\nTig is a ncurses-based text-mode interface for git. It functions mainly\nas a git repository browser, but can also act as a pager for output from\nvarious git commands.\n\n Homepage:\thttp://jonas.nitro.dk/tig/\n Manual:\thttp://jonas.nitro.dk/tig/manual.html\n Tarballs:\thttp://jonas.nitro.dk/tig/releases/\n Gitfeed:\tgit://repo.or.cz/tig.git\n Gitweb:\thttp://repo.or.cz/w/tig.git\n\nChanges in this release\n-----------------------\nBelow is the diffstat and shortlog for changes made in this release.\n\n TODO          |    5 +-\n VERSION       |    2 +-\n asciidoc.conf |    2 +-\n configure.ac  |   12 +-\n manual.txt    |   10 +-\n tig.1.txt     |   12 +-\n tig.c         | 1652 ++++++++++++++++++++++++++++++++++++++++-----------------\n tigrc.5.txt   |  109 +++--\n 8 files changed, 1271 insertions(+), 533 deletions(-)\n\nDominik Vogt (4):\n      New actions toggle-date, toggle-author, and toggle-refs.\n      Fixed displaying local tags.\n      New config options show-author, show-date, show-refs, show-line-numbers.\n      Call realloc() less often because it is potentially slow.\n\nJonas Fonseca (58):\n      0.11.git\n      TODO: --boundary flag is already used\n      utf8_length: add reserve flag for reserving a trailing character\n      draw_text: minor cleanup to use fewer local variables\n      draw_text: reduce indentation level\n      Fix index refreshing into separate call so diff-files is always run\n      configure: test for git binary and improve config subcommand test\n      tigrc(5): Improve documentation of new show-* options\n      Move unrelated UTF-8 setup code out of parse_options\n      Use rewritten parent info from --parents to simplify the revgraph\n      draw_text: remove unused col argument\n      Simplify subcommand option parsing by moving it out of the loop\n      Add hack to allow view loading to have multiple phases\n      Add blame view\n      Various fixes and improvements of the new blame view\n      More blame view fixes\n      Remove deprecated options and cleanup option parsing\n      blame: Fix opening from subdirectory and consecutive invokations\n      Save current branch from rev-parse output and highlight it\n      Show the current branch in the status view\n      Rename \"main-delim\" color to the more generic \"delimiter\"\n      Add support for preparing the initial commit in the status view\n      Oops, fix delimiter documentation\n      Avoid reloading the status view when nothing was updated\n      Fix uninitialized variable warning\n      Fix and improve status refreshing after updating\n      Improve perfomance and usability when updating many files\n      stage: disable whitespace warnings from git apply when staging updates\n      Fix pager mode by always doing the isatty()\n      Disable opening views that require a git directory when in pager mode\n      Add action to maximize the current view; bound to M by default\n      Add draw_lineno() and use when drawing the blame and pager view\n      Show the tracked remote branch with bold text\n      Make local tags and normal branches use normal font-weight\n      status: use draw_text completely\n      Merge branch 'master' of remote-server:src/tig\n      Do not load repository references when acting as a pager\n      Rename load_repo_config() to load_git_config()\n      Share the line number colors between blame view and others\n      Use werase() instead of wclear() when reloading a view\n      When toggling options redraw the view instead of the whole display\n      Add support for refreshing of the stage view\n      Reload the status and stage views after a run request has been handled\n      Improve staging of diff chunks\n      Error out when starting up in empty main or blame view\n      Fix compatibility for git rev-parse without --symbolic-full-name\n      Revert \"When toggling options redraw the view instead of the whole display\"\n      Use 3 as the minimum width of formatted line numbers\n      Avoid splitting the view when navigating stage view in full screen\n      Squelsh output of update-index when loading the status view\n      Make the main and blame view share date drawing and date colors\n      Setup colors for the selected line in draw_view_line()\n      Minor cleanup in blame_draw\n      Use tables for listing the UI colors\n      Remove unused blame line attributes\n      Update copyright notice for the manual\n      Use sans-serif font for the README page\n      tig-0.11\n\nStefan Naewe (1):\n      Output extra \\n on tig -h\n\n-- \nJonas Fonseca\n"},{"id":"74013","messageId":"20080410040213.GA29618@sigill.intra.peff.net","threadId":"13006","inReplyTo":"20080406200533.GA20537@diku.dk","subject":"Re: [ANNOUNCE] tig-0.11","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-04-10T04:02:13Z","receivedAt":"2008-04-10T04:02:13Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Apr 06, 2008 at 10:05:33PM +0200, Jonas Fonseca wrote:\n\n> stay up to date. Finally, add a blame view accessible from the command\n> line (tig blame [rev] file), status view as well as the tree view (by\n> pressing 'B').\n\nHi Jonas,\n\nThanks for all your hard work.  I have really been enjoying the new\nblame view; blame was the only reason I ever used git-gui, and now I can\nstay in the terminal all the time.\n\nOne feature that I have often wanted when using the blame view is to\nrestart the blame from the parent commit of a blamed commit. That is,\ngiven a line like:\n\n  2007-08-22 19:36 Jonas Fonseca       776bf2a   15│ #include \"config.h\"\n\nI look at 776bf2a, and realize that there was some other interesting\nform of the line _before_ that commit. So I want to start reblaming at\n776bf2a^.\n\nBelow is an initial attempt at a patch, but it has some problems:\n\n  - the interface is a bit klunky. Since commits may have multiple\n    parents, it seemed wrong to always just choose the first parent.\n    I chose '1' to reblame from the first parent and '2' from the second\n    (and obviously 3-9 could do the same).\n\n    My thought was that the same functionality could be applied to the\n    commit viewer to jump to the parent. But maybe grabbing a string and\n    appending it to the commit id would make the most sense.\n\n  - it reloads the blame view with new parameters, which will put the\n    cursor back at line 1. It would be nice to stay at approximately the\n    same line (approximate because the line numbers will change; just\n    staying at the same line number makes sense to me).\n\n    I tried a few things, but it looks like we throw out the line\n    numbers when we do a reload. I tried saving the line number and\n    trying to scroll to it afterwards, but there is some trickery\n    required because we have to wait until the view is loaded again. Is\n    there any sane way to do this within the current framework?\n\n  - opening a blame view, blaming a parent, and then opening the diff\n    viewer can cause a segfault. I assume I'm violating some assumption\n    through my open_view() call. Since the patch is only about 15 lines,\n    I'm hoping there's something obvious you can comment on.\n\n-Peff\n\n---\ndiff --git a/tig.c b/tig.c\nindex a3d2232..7a5497a 100644\n--- a/tig.c\n+++ b/tig.c\n@@ -371,6 +371,8 @@ sq_quote(char buf[SIZEOF_STR], size_t bufsize, const char *src)\n \tREQ_(STATUS_MERGE,\t\"Merge file using external tool\"), \\\n \tREQ_(TREE_PARENT,\t\"Switch to parent directory in tree view\"), \\\n \tREQ_(EDIT,\t\t\"Open in editor\"), \\\n+\tREQ_(PARENT_ONE,\t\"Go to first parent\"), \\\n+\tREQ_(PARENT_TWO,\t\"Go to second parent\"), \\\n \tREQ_(NONE,\t\t\"Do nothing\")\n \n \n@@ -771,6 +773,8 @@ static struct keybinding default_keybindings[] = {\n \t{ 'M',\t\tREQ_STATUS_MERGE },\n \t{ ',',\t\tREQ_TREE_PARENT },\n \t{ 'e',\t\tREQ_EDIT },\n+\t{ '1',\t\tREQ_PARENT_ONE },\n+\t{ '2',\t\tREQ_PARENT_TWO },\n \n \t/* Using the ncurses SIGWINCH handler. */\n \t{ KEY_RESIZE,\tREQ_SCREEN_RESIZE },\n@@ -3678,6 +3682,32 @@ blame_request(struct view *view, enum request request, struct line *line)\n \t\topen_view(view, REQ_VIEW_DIFF, flags);\n \t\tbreak;\n \n+\tcase REQ_PARENT_ONE:\n+\tcase REQ_PARENT_TWO:\n+\t\tif (!blame->commit) {\n+\t\t\treport(\"No commit loaded yet\");\n+\t\t\tbreak;\n+\t\t}\n+\n+\t\tif (!strcmp(blame->commit->id, \"0000000000000000000000000000000000000000\")) {\n+\t\t\treport(\"No commit selected\");\n+\t\t\tbreak;\n+\t\t}\n+\n+\t\tstring_ncopy(opt_ref, blame->commit->id, 40);\n+\t\tswitch (request) {\n+\t\tcase REQ_PARENT_ONE:\n+\t\t\tstring_add(opt_ref, 40, \"^1\");\n+\t\t\tbreak;\n+\t\tcase REQ_PARENT_TWO:\n+\t\t\tstring_add(opt_ref, 40, \"^2\");\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\tbreak;\n+\t\t}\n+\t\topen_view(view, REQ_VIEW_BLAME, flags|OPEN_RELOAD);\n+\t\tbreak;\n+\n \tdefault:\n \t\treturn request;\n \t}\n"},{"id":"74048","messageId":"20080410085604.GA21998@diku.dk","threadId":"13006","inReplyTo":"20080410040213.GA29618@sigill.intra.peff.net","subject":"Re: [ANNOUNCE] tig-0.11","fromName":"Jonas Fonseca","fromEmail":"fonseca@diku.dk","sentAt":"2008-04-10T08:56:04Z","receivedAt":"2008-04-10T08:56:04Z","isPatch":false,"sender":{"key":"fonseca@diku.dk","avatar":"https://gravatar.com/avatar/f82f3ad698717c51873b020c750a92438c820a24056dc39fe4d07baa10a92264?d=mp&s=160"},"body":"Jeff King <peff@peff.net> wrote Thu, Apr 10, 2008:\n> On Sun, Apr 06, 2008 at 10:05:33PM +0200, Jonas Fonseca wrote:\n> \n> > stay up to date. Finally, add a blame view accessible from the command\n> > line (tig blame [rev] file), status view as well as the tree view (by\n> > pressing 'B').\n> \n> Hi Jonas,\n\nHello Jeff,\n\n> Thanks for all your hard work.  I have really been enjoying the new\n> blame view; blame was the only reason I ever used git-gui, and now I can\n> stay in the terminal all the time.\n\nThat is great to hear.\n\n> One feature that I have often wanted when using the blame view is to\n> restart the blame from the parent commit of a blamed commit. That is,\n> given a line like:\n> \n>   2007-08-22 19:36 Jonas Fonseca       776bf2a   15│ #include \"config.h\"\n> \n> I look at 776bf2a, and realize that there was some other interesting\n> form of the line _before_ that commit. So I want to start reblaming at\n> 776bf2a^.\n\nThe current blame capability is very basic and this sounds like a good\nidea for extending it.\n\n> Below is an initial attempt at a patch, but it has some problems:\n> \n>   - the interface is a bit klunky. Since commits may have multiple\n>     parents, it seemed wrong to always just choose the first parent.\n>     I chose '1' to reblame from the first parent and '2' from the second\n>     (and obviously 3-9 could do the same).\n> \n>     My thought was that the same functionality could be applied to the\n>     commit viewer to jump to the parent. But maybe grabbing a string and\n>     appending it to the commit id would make the most sense.\n\nEither that or there could be an option to show parent commit lines in the\ndiff view à la gitk:\n\n\tParent: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (Do something)\n\tParent: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb (Do something else)\n\nand then make pressing 'B' on one of them start it. At least this should\nsolve the problem of having the option for all parents. Using '1', '2',\n...  or '^' + a number could still work as a short hand.\n\n>   - it reloads the blame view with new parameters, which will put the\n>     cursor back at line 1. It would be nice to stay at approximately the\n>     same line (approximate because the line numbers will change; just\n>     staying at the same line number makes sense to me).\n> \n>     I tried a few things, but it looks like we throw out the line\n>     numbers when we do a reload. I tried saving the line number and\n>     trying to scroll to it afterwards, but there is some trickery\n>     required because we have to wait until the view is loaded again. Is\n>     there any sane way to do this within the current framework?\n\nThere is currently no way to do this. Some views have their own hacks to\nrestore the position. But a general way to preserve the position in a\nview across reloads is something that will come in handy for the status\nand staging area as well.\n\n>   - opening a blame view, blaming a parent, and then opening the diff\n>     viewer can cause a segfault. I assume I'm violating some assumption\n>     through my open_view() call. Since the patch is only about 15 lines,\n>     I'm hoping there's something obvious you can comment on.\n\nOops. I will look into it when I get more time. Thanks for the ideas and\nthe clean patch.\n\n-- \nJonas Fonseca\n"},{"id":"75960","messageId":"481CD4E9.3080709@obry.net","threadId":"13006","inReplyTo":"20080406200533.GA20537@diku.dk","subject":"Re: [ANNOUNCE] tig-0.11","fromName":"Pascal Obry","fromEmail":"pascal@obry.net","sentAt":"2008-05-03T21:11:05Z","receivedAt":"2008-05-03T21:11:05Z","isPatch":false,"sender":{"key":"pascal@obry.net","avatar":"https://avatars.githubusercontent.com/u/467069?v=4"},"body":"\nJonas,\n\nI see that the '@' key can now move from chunk to chunk. This is nice \nbut it would be more user friendly if after staging a hunk the cursor \nwas not moved to the first line! I think it would be better to have the \ncursor on top of the next hunk.\n\nPascal.\n\n-- \n\n--|------------------------------------------------------\n--| Pascal Obry                           Team-Ada Member\n--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE\n--|------------------------------------------------------\n--|              http://www.obry.net\n--| \"The best way to travel is by means of imagination\"\n--|\n--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595\n"},{"id":"76124","messageId":"20080504190204.GA25329@diku.dk","threadId":"13006","inReplyTo":"481CD4E9.3080709@obry.net","subject":"Re: [ANNOUNCE] tig-0.11","fromName":"Jonas Fonseca","fromEmail":"fonseca@diku.dk","sentAt":"2008-05-04T19:02:04Z","receivedAt":"2008-05-04T19:02:04Z","isPatch":false,"sender":{"key":"fonseca@diku.dk","avatar":"https://gravatar.com/avatar/f82f3ad698717c51873b020c750a92438c820a24056dc39fe4d07baa10a92264?d=mp&s=160"},"body":"Hello Pascal,\n\nPascal Obry <pascal@obry.net> wrote Sat, May 03, 2008:\n> I see that the '@' key can now move from chunk to chunk. This is nice but \n> it would be more user friendly if after staging a hunk the cursor was not \n> moved to the first line! I think it would be better to have the cursor on \n> top of the next hunk.\n\nGreat that you noticed.\n\nAbout your suggestion, Jeff suggested something similar for the blame\nview when jumping to parents ealier in this thread. I will put in the\nTODO list an entry about adding a general mechanism for saving and\nrestoring states across reloads and refreshes.  The status and tree\nviews already have something like this and the stage and blame view are\ngood candidates as well. When the main view will support refreshing\nthere will be one more potential user.\n\n-- \nJonas Fonseca\n"}]}