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

Cannot prevent fetch (during 'pull' operation) pulling all remote tags #403

Closed
RoystonS opened this Issue Sep 13, 2018 · 7 comments

Comments

Projects
None yet
2 participants
@RoystonS

RoystonS commented Sep 13, 2018

I'm just evaluating GitFork, and it's mostly lovely, but I can't stop it fetching all the tags from my remote. This is a big issue for us as our build system (which is outside of our control) puts a tag on the source for every build. I don't want all 6000+ tags appearing in my workspace; it's a huge clutter.

I've tried adding the 'tagOpt' option to my .gitconfig to prevent tags being fetched (via git config remote.origin.tagOpt --no-tags, as the Git documentation suggests) but this has no effect. It looks like GitFork always adds an explicit --tags option when running git fetch when doing a 'pull', which is overriding the setting I have in my repo config file.

@RoystonS RoystonS changed the title from Cannot prevent fetch pulling all remote tags to Cannot prevent fetch (during 'pull' operation) pulling all remote tags Sep 13, 2018

@DanPristupov

This comment has been minimized.

Contributor

DanPristupov commented Sep 13, 2018

I just checked the source code. Fork does respect the Fetch All Tags option.

However automatic fetch which happens every 20 minutes always fetches all tags. I will make it use the last fetch preferences used in the UI (which is false on first start). Do you agree? If so, I will release the fix during next few days.

P.S. Sorry for the inconvenience, I didn't even know such a problem could exist :).

Update: Sorry, I didn't notice the updated title, because I read the initial one on my phone.

Just summarizing to ensure we are on the same page:

  • Normal fetch: Fork correctly takes the Fetch All tags option into account.
  • Automatic fetch: Fork always fetches all tags every 20 minutes which is a bug. I will update it to use the recent value from the UI.
  • Pull: Fork uses git settings, which means tags will be downloaded by default (until you disabled them in global settings)

Is that possible that you was confused by automatic fetch and usual fetch and pull work properly?

@RoystonS

This comment has been minimized.

RoystonS commented Sep 13, 2018

I'm fairly sure it was the manual 'pull' operation that was triggering the fetch of tags. My repro steps:

(Having previously done a manual git config remote.origin.tagOpt --no-tags)

  1. Command-line git pull
  2. Observe no extraneous tags
  3. Go into Fork and launch a Pull (with rebase selected, but that shouldn't be relevant)
  4. The output of the Fork operation shows 6000 tags being created locally
  5. In a command-line, delete all the local tags
  6. Go into Fork and launch a Pull again (with rebase)
  7. The output of the Fork operation shows 6000 tags being created locally again

The tag creation is being explicitly listed in the progress display of the pull at the top of the screen, suggesting it's the pull that's problematic:

image

I've also tried watching which git commands are being run whilst that pull is happening:
forkissue

That looks like git pull is being given an explicit --tags option, which will override my tagOpt --no-tags setting.

@DanPristupov

This comment has been minimized.

Contributor

DanPristupov commented Sep 13, 2018

@RoystonS I checked the code again, yes, you are absolutely right. It's already late today, so I will investigate why there's --tags tomorrow. It doesn't make much sense since pull should download the tags by default.

@DanPristupov

This comment has been minimized.

Contributor

DanPristupov commented Sep 14, 2018

OK, pull should not download tags when we pull a particular branch.

One day I added --tags option as a workaround, which is fine for majority of people, but not for you.

So, I'll add a "Fetch All Tags" checkbox to the pull dialog and hopefully make everybody happy.

@DanPristupov DanPristupov added this to the 1.0.70 milestone Sep 14, 2018

@RoystonS

This comment has been minimized.

RoystonS commented Sep 14, 2018

Thank you very much!

@DanPristupov

This comment has been minimized.

Contributor

DanPristupov commented Sep 17, 2018

I just released 1.0.70. Please let me know if the problem is fixed.

@RoystonS

This comment has been minimized.

RoystonS commented Sep 17, 2018

Yep, all great - thanks so much for the fast fix!

@RoystonS RoystonS closed this Sep 17, 2018

@DanPristupov DanPristupov added the done label Sep 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment