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

Should the check command be removed? #79

Open
andsens opened this issue Jan 27, 2014 · 8 comments
Open

Should the check command be removed? #79

andsens opened this issue Jan 27, 2014 · 8 comments

Comments

@andsens
Copy link
Owner

andsens commented Jan 27, 2014

The check command is a rather complicated piece of code and is not even complete without #46 (which would make it even more complex). Additionally it is slow, since it has to connect to the remote upstream to check for updates.

I do not use this command very much myself and was wondering whether a depreciation would be in order?

The two use scenarios as I can see it are:

  1. Run check to see if there are any changes on the upstream remotes - which is a stupid scenario, because after that you would probably run pull anyways, so why not just run pull immediately?
  2. You are wondering if there is anything you have not pushed upstream yet.

Scenario # 2 is very much an edge case and not enough of a feature to warrant an entire command.

@jrhorn424
Copy link

I'd be fine with this, as well as closing #46. I've been getting along fine without the feature.

@andsens
Copy link
Owner Author

andsens commented Apr 25, 2014

During the last month I have been running with the new "check dirty working copy" feature and find it quite useful, if it weren't for the delay when checking the remote.
How about renaming check to status and let it only check whether the working copy is dirty?

Only problem I see is the naming clash with git status, but I myself find this rather useful, it's easier to remember. It would work as long as the majority of people don't expect homeshick status to do the same stuff as git status does.

Any comments?

@squaresurf
Copy link
Contributor

I personally find it useful to have a single command. I think adding a --local-only flag or the likes is a bit more useful. I'm also a big fan of figuring out a system for #11. If we could solve #11 in a generic fashion it could be used across the board.

@andsens
Copy link
Owner Author

andsens commented Apr 25, 2014

I personally find it useful to have a single command.

Fair enough, my frustration just stems from that it is sooo slow :-)

I think adding a --local-only flag or the likes is a bit more useful.

Huh, yeah. That could work. I also though that we could simply delay checking the remote after we have checked whether the working copy is dirty, that could save a little time in those cases. It's aquickfix, I know, but the change would still be a sound one.

@squaresurf
Copy link
Contributor

Delaying does seem like a good first iteration. That change may need to update the tests though. I made sure that ahead and behind had priority over modified. We would just need to switch that since currently if a castle is (ahead or behind) and modified we show (ahead or behind).

@andsens
Copy link
Owner Author

andsens commented Apr 25, 2014

We would just need to switch that since currently if a castle is (ahead or behind) and modified we show (ahead or behind).

Oh, right :-)
I actually think that giving precedence to modified would make more sense.

@squaresurf
Copy link
Contributor

I actually think that giving precedence to modified would make more sense.

I agree.

@andsens andsens removed their assignment Aug 30, 2014
blech75 added a commit to blech75/homeshick that referenced this issue Apr 1, 2016
passing this option avoids checking git remotes so `check` can execute
much quicker. this duplicates the git status check logic, so it could
probably stand to be refactored a bit.

see discussion in andsens#79

note: this diff is best viewed with -w (ignore whitespace)
@blech75
Copy link

blech75 commented Apr 1, 2016

@andsens, @squaresurf : i too desired a way to avoid the network hit when doing a check. see blech75/homeshick@9aee26a for something quick i whipped up.

lemme know what you think of the approach. it seemed reasonable enough, though i don't love the LOCAL_ONLY "flag". it would be nice to send an actual param into the check call, but i didn't have time to trace how subcommand-specific arguments work. maybe later.

blech75 added a commit to blech75/homeshick that referenced this issue May 23, 2019
passing this option avoids checking git remotes so `check` can execute
much quicker. this duplicates the git status check logic, so it could
probably stand to be refactored a bit.

see discussion in andsens#79

note: this diff is best viewed with -w (ignore whitespace)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants