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

Fix no-fetch behavior #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix no-fetch behavior #33

wants to merge 1 commit into from

Conversation

ikesyo
Copy link
Collaborator

@ikesyo ikesyo commented Aug 23, 2019

Ref: #18

An option with no- prefix returns false.

https://docs.ruby-lang.org/ja/latest/class/OptionParser.html

また、"no-" をオプションの先頭に付けた場合は値が反転します。


Currently @no_fetch is either nil or false, so git :remote, 'update', 'origin' unless @no_fetch will be executed always.

An option with `no-` prefix returns `false`.

https://docs.ruby-lang.org/ja/latest/class/OptionParser.html

> また、"no-" をオプションの先頭に付けた場合は値が反転します。
@ikesyo ikesyo requested review from motemen and onk August 23, 2019 05:23
@ikesyo
Copy link
Collaborator Author

ikesyo commented Aug 23, 2019

Hmm we still need to be able to access remote repos when running git('ls-remote', 'origin', 'refs/pull/*/head') 😞

So I assume that --no-fetch option is insufficient or useless.

@ikesyo ikesyo changed the title Fix no-fetch behavior [DNM] Fix no-fetch behavior Aug 23, 2019
@ikesyo ikesyo closed this Jun 14, 2021
@ikesyo ikesyo deleted the fix-no-fetch-behavior branch June 14, 2021 13:26
@Songmu Songmu restored the fix-no-fetch-behavior branch August 4, 2022 13:44
@Songmu
Copy link
Member

Songmu commented Aug 4, 2022

Indeed, as @ikesyo wrote, this change does not fulfill the original purpose. However, it's terrible that --no-fetch is currently not fully working, and in the meantime, implementing this option will reduce execution time, albeit by a few tenths of a second.

So I think there are two choices.

  • Merge this change
  • eliminate the --no-fetch option
    • Since it is difficult to turn it off, better displaying a deprecated warning, etc.

I would like to propose that we merge this change.

@Songmu Songmu reopened this Aug 4, 2022
@Songmu Songmu changed the title [DNM] Fix no-fetch behavior Fix no-fetch behavior Aug 4, 2022
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.

2 participants