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

omf update: Report up-to-date packages as such #285

Merged
merged 2 commits into from
Mar 28, 2016

Conversation

oranja
Copy link
Contributor

@oranja oranja commented Mar 25, 2016

The purpose of this proposal is to generate a more accurate output on omf update. Namely, packages which have no upstream changes now report that they are already up to date.
Since this is a proposal we haven't really discussed before, this is broken into 3 commits (instead of squashed), so it's easier to track the changes and their aims.

Regarding performance, I must admit that I did not time the new code or the old.
Overall the update process should not improve and not deteriorate in terms of performance. The previous git pull is broken apart to a fetch and a merge. Packages without changes skip the merge (and possibly stashing) in return for an additional check. Packages with changes pay just one more check. If git does any more optimizations in combining the fetch and merge when running pull, I am unaware of such and I would appreciate any tips.

echo (omf::em)"$name successfully updated."(omf::off)
return 0
case 1
echo (omf::err)"Could not update $name."(omf::off) 1>&2
Copy link
Member

Choose a reason for hiding this comment

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

let's just return 1 here rather than letting it fall back to the one at the bottom. it'll make it more clear.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

better now?

Copy link
Member

Choose a reason for hiding this comment

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

Yep!

@bobthecow
Copy link
Member

I'm 👍 to merge this (whether or not we do the return I mentioned above).

@sagebind
Copy link
Member

👍

@derekstavis
Copy link
Member

LGTM 👍

@derekstavis derekstavis merged commit 0699c9f into oh-my-fish:master Mar 28, 2016
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