{"thread":{"id":"17929","subject":"[tig PATCH] Predefined external command: git commit","startedAt":"2009-02-21T00:28:41Z","lastAt":"2009-02-21T18:52:00Z","messageCount":5,"participants":["Giuseppe Bilotta","Jonas Fonseca"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"105671","messageId":"1235176121-17483-1-git-send-email-giuseppe.bilotta@gmail.com","threadId":"17929","inReplyTo":null,"subject":"[tig PATCH] Predefined external command: git commit","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2009-02-21T00:28:41Z","receivedAt":"2009-02-21T00:28:41Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"Status view allows management of the stage area, and the user is likely\nto issue a commit as soon as (s)he's satisfied with the result. Mapping\n'git commit' to the 'C' key in status view makes this straightforward\nand allows a very streamlined workflow from within git.\n\nSigned-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>\n---\n\nIt might make sense to map 'A' to 'git commit --amend', too, even though\nthat key is currently taken by author display toggle.\n\n manual.txt |    9 +++++----\n tig.c      |    2 ++\n 2 files changed, 7 insertions(+), 4 deletions(-)\n\ndiff --git a/manual.txt b/manual.txt\nindex 74fa3f8..104989f 100644\n--- a/manual.txt\n+++ b/manual.txt\n@@ -449,11 +449,12 @@ a script or program. They are bound to keys and use information from the\n current browsing state, such as the current commit ID. Tig comes with\n the following built-in external commands:\n \n-`-------`--------------------------------------------------------------------\n-Key\tAction\n+`-------`-------`------------------------------------------------------------\n+Keymap\tKey\tAction\n -----------------------------------------------------------------------------\n-C\tgit cherry-pick %(commit)\n-G\tgit gc\n+MAIN\tC\tgit cherry-pick %(commit)\n+STATUS\tC\tgit commit\n+GENERIC\tG\tgit gc\n -----------------------------------------------------------------------------\n \n [[refspec]]\ndiff --git a/tig.c b/tig.c\nindex 9349f69..c22f271 100644\n--- a/tig.c\n+++ b/tig.c\n@@ -1365,6 +1365,7 @@ static void\n add_builtin_run_requests(void)\n {\n \tconst char *cherry_pick[] = { \"git\", \"cherry-pick\", \"%(commit)\", NULL };\n+\tconst char *commit[] = { \"git\", \"commit\", NULL };\n \tconst char *gc[] = { \"git\", \"gc\", NULL };\n \tstruct {\n \t\tenum keymap keymap;\n@@ -1373,6 +1374,7 @@ add_builtin_run_requests(void)\n \t\tconst char **argv;\n \t} reqs[] = {\n \t\t{ KEYMAP_MAIN,\t  'C', ARRAY_SIZE(cherry_pick) - 1, cherry_pick },\n+\t\t{ KEYMAP_STATUS,  'C', ARRAY_SIZE(commit) - 1, commit },\n \t\t{ KEYMAP_GENERIC, 'G', ARRAY_SIZE(gc) - 1, gc },\n \t};\n \tint i;\n-- \n1.6.2.rc1.258.g1d592.dirty\n"},{"id":"105727","messageId":"2c6b72b30902210819q43cbf184x77d7587a6aa1630a@mail.gmail.com","threadId":"17929","inReplyTo":"1235176121-17483-1-git-send-email-giuseppe.bilotta@gmail.com","subject":"Re: [tig PATCH] Predefined external command: git commit","fromName":"Jonas Fonseca","fromEmail":"jonas.fonseca@gmail.com","sentAt":"2009-02-21T16:19:49Z","receivedAt":"2009-02-21T16:19:49Z","isPatch":true,"sender":{"key":"jonas.fonseca@gmail.com","avatar":"https://gravatar.com/avatar/9b7fa23cce50269e5d164312b6ac5ae818a180f837b38f28f3bdf689dd7f96cd?d=mp&s=160"},"body":"On Sat, Feb 21, 2009 at 01:28, Giuseppe Bilotta\n<giuseppe.bilotta@gmail.com> wrote:\n> It might make sense to map 'A' to 'git commit --amend', too, even though\n> that key is currently taken by author display toggle.\n\nWe could remap author toggling to 'a' to free 'A'. I assume you want\n'A' to make it less likely to be pressed by accident?\n\nBTW, to make the keybinding more scalable, the option toggling should\nprobably be hidden behind a common prefix key, which would open a menu\nwith next key searching this menu.\n\nThanks for both patches.\n\n-- \nJonas Fonseca\n"},{"id":"105730","messageId":"cb7bb73a0902210919n45ffb74fp6d4fa0dc9cb7ac1@mail.gmail.com","threadId":"17929","inReplyTo":"2c6b72b30902210819q43cbf184x77d7587a6aa1630a@mail.gmail.com","subject":"Re: [tig PATCH] Predefined external command: git commit","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2009-02-21T17:19:58Z","receivedAt":"2009-02-21T17:19:58Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"On Sat, Feb 21, 2009 at 5:19 PM, Jonas Fonseca <jonas.fonseca@gmail.com> wrote:\n> On Sat, Feb 21, 2009 at 01:28, Giuseppe Bilotta\n> <giuseppe.bilotta@gmail.com> wrote:\n>> It might make sense to map 'A' to 'git commit --amend', too, even though\n>> that key is currently taken by author display toggle.\n>\n> We could remap author toggling to 'a' to free 'A'. I assume you want\n> 'A' to make it less likely to be pressed by accident?\n\nActually it was more for consistency (uppercase C, uppercase A), but\nit could be considered for that purpose: it makes sense to have\nactions that change the repo harder to hit by accident.\n\n> BTW, to make the keybinding more scalable, the option toggling should\n> probably be hidden behind a common prefix key, which would open a menu\n> with next key searching this menu.\n\nSince t is taken by tree view, we could have 'o' for options. However,\nit IS a nice thing to have quick toggles for the most common ones.\n\n> Thanks for both patches.\n\nThank you for this excellent piece of software. I have some more minor\npatches up at git://git.oblomov.eu/tig (gitweb at same address with\nhttp) which I'm going to submit soon.\n\nI honestly wish I could contribute with some more important feature\nsuch as bundle support or automatic color inversion on light\nbackgrounds.\n\n-- \nGiuseppe \"Oblomov\" Bilotta\n"},{"id":"105734","messageId":"2c6b72b30902210951m619c7cf9qa505883f43128e44@mail.gmail.com","threadId":"17929","inReplyTo":"cb7bb73a0902210919n45ffb74fp6d4fa0dc9cb7ac1@mail.gmail.com","subject":"Re: [tig PATCH] Predefined external command: git commit","fromName":"Jonas Fonseca","fromEmail":"jonas.fonseca@gmail.com","sentAt":"2009-02-21T17:51:12Z","receivedAt":"2009-02-21T17:51:12Z","isPatch":true,"sender":{"key":"jonas.fonseca@gmail.com","avatar":"https://gravatar.com/avatar/9b7fa23cce50269e5d164312b6ac5ae818a180f837b38f28f3bdf689dd7f96cd?d=mp&s=160"},"body":"On Sat, Feb 21, 2009 at 18:19, Giuseppe Bilotta\n<giuseppe.bilotta@gmail.com> wrote:\n> Thank you for this excellent piece of software. I have some more minor\n> patches up at git://git.oblomov.eu/tig (gitweb at same address with\n> http) which I'm going to submit soon.\n\nDon't bother sending the `tig log` patch. ;)\n\nI deprecated this subcommand a long time ago, and would prefer if it\nwasn't added again. Having a lot of subcommands makes it more likely\nthat doing `tig $BRANCH` will not do the expected thing. Also, I don't\nfind it particularly useful myself and might actually remove it in the\nfuture, if I ever get to implementing support for defining \"custom\nviews\".\n\n> I honestly wish I could contribute with some more important feature\n> such as bundle support or automatic color inversion on light\n> backgrounds.\n\n/me too. :)\n\n-- \nJonas Fonseca\n"},{"id":"105735","messageId":"cb7bb73a0902211052s554e20d7pa412613f56cbf86d@mail.gmail.com","threadId":"17929","inReplyTo":"2c6b72b30902210951m619c7cf9qa505883f43128e44@mail.gmail.com","subject":"Re: [tig PATCH] Predefined external command: git commit","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2009-02-21T18:52:00Z","receivedAt":"2009-02-21T18:52:00Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"On Sat, Feb 21, 2009 at 6:51 PM, Jonas Fonseca <jonas.fonseca@gmail.com> wrote:\n> On Sat, Feb 21, 2009 at 18:19, Giuseppe Bilotta\n> <giuseppe.bilotta@gmail.com> wrote:\n>> Thank you for this excellent piece of software. I have some more minor\n>> patches up at git://git.oblomov.eu/tig (gitweb at same address with\n>> http) which I'm going to submit soon.\n>\n> Don't bother sending the `tig log` patch. ;)\n>\n> I deprecated this subcommand a long time ago, and would prefer if it\n> wasn't added again. Having a lot of subcommands makes it more likely\n> that doing `tig $BRANCH` will not do the expected thing. Also, I don't\n> find it particularly useful myself and might actually remove it in the\n> future, if I ever get to implementing support for defining \"custom\n> views\".\n\nYou actually plan on removing the log view altogether?\n\nThe problem of conflicting with tig $BRANCH could maybe be solved by\nprefixing commands with something (a dot or something easy to type, if\nnot the traditional - or --)\n\n>> I honestly wish I could contribute with some more important feature\n>> such as bundle support or automatic color inversion on light\n>> backgrounds.\n>\n> /me too. :)\n\nI'll do my best 8-)\n\n-- \nGiuseppe \"Oblomov\" Bilotta\n"}]}