Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 28 2019 22:21
    verdie-g opened #893
  • Jan 28 2019 10:19
    VonUniGE commented #340
  • Jan 28 2019 02:20
    rcywongaa closed #869
  • Jan 26 2019 20:30
    smkniazi edited #892
  • Jan 26 2019 20:29
    smkniazi edited #892
  • Jan 26 2019 20:28
    smkniazi opened #892
  • Jan 24 2019 10:38
    timotheecour edited #890
  • Jan 24 2019 09:20
    timotheecour opened #891
  • Jan 24 2019 00:29
    timotheecour opened #890
  • Jan 23 2019 22:09
    KeeReal commented #869
  • Jan 23 2019 20:58
    avivey opened #889
  • Jan 21 2019 23:26
    timotheecour commented #559
  • Jan 21 2019 21:16
    koutcher commented #559
  • Jan 21 2019 20:47
    koutcher commented #559
  • Jan 21 2019 18:39
    smancill commented #559
  • Jan 21 2019 07:11
    timotheecour commented #559
  • Jan 20 2019 17:01
    smancill commented #559
  • Jan 20 2019 10:25
    koutcher commented #559
  • Jan 20 2019 02:54
    timotheecour commented #559
  • Jan 20 2019 01:56
    timotheecour opened #888
Johannes Altmanninger
@krobelus
@kaddkaka I've written some documentation for my offline GitLab review workflow and published my script here: https://gitlab.com/krobelus/gitlab-offline-review
I'm sure it has some rough edges, but writing review comments while browsing commits in Tig already feels so much better than GitLab.
kaddkaka
@kaddkaka
@krobelus thanks that looks interesting, will def take a look!
kaddkaka
@kaddkaka
@krobelus Could you explain the @{u}.. syntax?
Johannes Altmanninger
@krobelus
@kaddkaka @{u} is an abbreviation for @{upstream}, which is usually something like origin/master, i.e. the remote tracking branch. man gitrevisions should explain that trick.
A two-dotted commit range like A..B means: all the commits that are in B, minus the commits that are in A. Here, HEAD is implied, so it's the same as @{u}..HEAD.
I often use something like that when I'm only interested in the commits on my topic branch. @{u}..topic gives me those.
kaddkaka
@kaddkaka
I didn't know about the abbrevation, thanks!
unfortunately the regarding tig log -p I think I might as well use git log -p or just manually step through commits and search. Unless there is some way to toggle between regular tig view and tig log view
Johannes Altmanninger
@krobelus

Unless there is some way to toggle between regular tig view and tig log view

I think that could be something to implement in the future.
Switching between main and log view should maybe keep the commit, I'm not sure

kaddkaka
@kaddkaka
keep the commit = sync the position between the two views?
oh commit tree view (main?) and instead of a split with diff-view, show git log -p in the right pane
that would be nice
kaddkaka
@kaddkaka
I can use tig to only show commits that touches a specific file. Is it possible to do this for a specific line? e.g. tig -- src/file.py:402
Johannes Altmanninger
@krobelus
@kaddkaka yeah, see the -L option in git-log(1)
kaddkaka
@kaddkaka
@krobelus How do I use that with tig?
tig path/to/file.cc -L500,+1 gives same result as without -L, .. oh do I need log as well?
kaddkaka
@kaddkaka
oh, the path has to go with the -L: tig -L500,+1:path/to/file.cc
but the diff view is empty if I do that :/
Jeklah
@Jeklah
hi all
i just downloaded tig, very nice. what are peoples common use cases for tig? it's a nice git browser but apart from browsing, what are peoples main use cases? so i can make full use of it :D
kaddkaka
@kaddkaka

tig to look at my branch
tig <filepath> to look at all changes to a file
tig stash to look at the stash
tig <branch> to look another branch

thats mostly what I do. from main view I sometimes press X to be able to search for a commit hash.

I think im a basic user for 5 years. I have some bindings for doing auto squashing but it's not without quirks
Jeklah
@Jeklah
ty
Sebastian Gniazdowski
@psprint
There is a view that's similar to tree view – it shows all files in the project and allows grepping in them. I cannot recall the binding that runs this view/mode, what was it, could someone answer?
Sebastian Gniazdowski
@psprint
Ok, I've found it. But there's one problem: after selecting a file it opens in a pager which from this point comes up directly whenever the file-filter view is invoked. I.e.: for consecutive bringings of this view a previous selection (previous file) is shown and no selection is being allowed. I see that it opens [pager] view. Is there a way to reset it? I would guess that IMO this is needed to resolve this. So, how to "reset" [pager] view?
Sebastian Gniazdowski
@psprint
OK, I've got it.
I have one more question – could I start up TIG with some columns like ID/SHA shown via command line options? Like: tig reflog --pretty=raw | tig --pretty=raw --Show-sha. Is there something like --Show-sha option or a way to execute a :set command on startup?
Johannes Altmanninger
@krobelus
@psprint you can do something like TIG_SCRIPT=<(echo :set main-view-commit-title-graph = no) tig
Sebastian Gniazdowski
@psprint
@krobelus Thanks!
I have an idea for a cool feature request – EditAll – to open an editor with all filles from a foremost commit passed as arguments :)
Think of it – tig as a central console place (it already has such connotations, I very often open editor(s) from tig) of the console – the place where editor sessions are being kept ↔ i.e.: the sets of files related to each other by a feature and edited together… :)
Johannes Altmanninger
@krobelus
ah, I just replied to your issue ;)
Brian Spilner
@Try2Code
@psprint Exactly what I am looking for :thumbsup:
Brian Spilner
@Try2Code
bind generic E !sh -c "vim -p $(git diff-tree --no-commit-id --name-only -r %(commit) )" @psprint
kaddkaka
@kaddkaka
@psprint what is the tree-view you mentioned?
damani42
@damani42
&bu52
kaddkaka
@kaddkaka
Hi, has anyone explored interaction between tig and fzf?
blayz3r
@blayz3r
Has anyone set up an external TIG_EDITOR
Brian Spilner
@Try2Code
@blayz3r not needed because I stick to $EDITOR, but TIG_EDITOR=emacs tig seems to work nicely
Kohei Yamada
@iberianpig
vim users should give this plugin a try! Prevents vim processes from nesting as child processes. https://github.com/iberianpig/tig-explorer.vim
Sebastian Gniazdowski
@psprint
Can you search for a specific string directly from a bound command?
I have a super-useful configuration – a bind to <Enter> that opens up this simple Zsh script on '%(text)' passed as 1st argument:
This message was deleted
#!/usr/bin/env zsh

emulate zsh -o extended_glob

if [[ $1 == (#b)([^:]##):([0-9]##):* ]]; then
    [[ -z $EDITOR ]] && EDITOR=mcedit

    $EDITOR +$match[2] **/$match[1];t
fi
It allows to open the compiler error-line by pointing cursor and pressing enter. It will automatically jump to the line with the error.
So, :!make and browse freely :)
Sebastian Gniazdowski
@psprint
However, I would need also a way to jump to the errors, hence the question: how to search for "(error:|warning:)" directly via a key binding??
Johannes Altmanninger
@krobelus
@psprint @ is bound to :/^@@ in /etc/tigrc, you can the same for errors
though why would you execute Make in Tig, and not your editor?
Sebastian Gniazdowski
@psprint
Guys, I've submitted an interesting PR (#1139); autoscroll and colorizing of compiler errors in pager view, to implement this simple IDE-like round-trip error fixing use case: https://asciinema.org/a/430460. You can
have this functionality also without the PR, just without autoscroll and colorizing of errors, as described in the PR.