Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show tracking info in tig status #504

Merged
merged 1 commit into from
Jun 8, 2016
Merged

Conversation

rgburke
Copy link
Contributor

@rgburke rgburke commented Jun 5, 2016

  • Updated tig status to show tracking info when appropriate as suggested in tig status: Add "branch up-to-date with remote" #460.
  • The git rev-list command is used to determine the difference with the remote branch instead of parsing the output of git status, as there's no guarantee the format of the latter will remain the same in future.
  • Added new test on-branch-tracking-info-test based on on-branch-test to help ensure this new functionality works as expected.

Below is a screenshot showing the appearance of this feature:

tig-branch-tracking-info

@ffes
Copy link
Contributor

ffes commented Jun 6, 2016

As the one who suggested #460, I did some simple testing and what I tested all works as expected. Thanks for implementing it! I really hope this PR gets merged.

Closes #460

@jonas jonas merged commit 68b7868 into jonas:master Jun 8, 2016
@jonas
Copy link
Owner

jonas commented Jun 8, 2016

I like this. The status line might get a bit long but at least it is clearly formulated.


const char *tracking_info_argv[] = {
"git", "rev-list", "--left-right", buf, NULL
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I'm a little late to the party, but I happened to notice this while pulling master. You can actually do git rev-list --left-right --count to get just the two counts. Probably not a big deal, but it would save a little pipe and parsing overhead.

@rgburke rgburke deleted the status-tracking-info branch June 9, 2016 20:35
jonas added a commit that referenced this pull request Sep 14, 2016
Add #504 to release notes of v2.2
BalancedCracker pushed a commit to BalancedCracker/jtig that referenced this pull request Sep 19, 2016
* commit '505413377bca84f5b887af3c5b12cd5e3c63ee4c': (26 commits)
  Add jonas#504 to release notes of v2.2
  tig-2.2
  Improve XDG_CONFIG_HOME tests and document the new behaviour
  options: Respect the defaults specified in XDG Basedir
  Fix invalid read in string_copy_rev
  Make the blob view delegate to pager_common_read
  Fix rendering of wrapped lines
  Fix search binding regression introduced in 1be1228
  Add test case showing detached HEAD in `tig --all` view
  Rewrite diff_get_pathname to also handle mnemonic prefixes
  Don't reload the stash view when switching back to it
  Resolve diff paths when `diff.noprefix` is true
  Unify jumping to line IDs using a `git-rev-parse`-able expression
  Respect the XDG standard for configuration files
  Add support for move to parent in main view
  test: make diff/log work with git 2.9
  Fix error when running with --silent.
  Fix drawing long lines.
  Show tracking info in tig status
  Fix out-of-bound memory access in keybinding_matches
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants