Skip to content

Push tags when pushing changes to repository - #9481

Merged
outofambit merged 3 commits into
feature/add-create-tag-dialogfrom
push-tags
Apr 10, 2020
Merged

outofambit merged 3 commits into
feature/add-create-tag-dialogfrom
push-tags

Conversation

@rafeca

@rafeca rafeca commented Apr 8, 2020

Copy link
Copy Markdown
Contributor

Partially addresses #9435

This PR is based on #9440 since I need to use the enableGitTagsCreation() feature flag.

Description

This PR adds the --follow-tags argument to the push commands done on Desktop to be able to push the relevant annotated tags (note that non-annotated tags won't get automatically pushed).

See the official docs about the --follow-tags argument for more information.

An important note is that the docs are a bit misleading, since --follow-tags will push any annotated tag that is reachable from any ref available on the remote repository (not only the tags reachable from refs that are getting pushed).

Next steps (to be done in separate PRs):

  • Display the push/pull button as pushable when there are unpushed tags locally.

Screenshots

N/A

Release notes

Notes: no-notes

@rafeca
rafeca requested a review from outofambit April 8, 2020 14:08
Comment thread app/src/lib/git/push.ts Outdated
Comment on lines +17 to +18
export type PushOptions = {
export interface IPushOptions {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@rafeca why is this an interface now instead of a type? i'm not opposed i'm just not following 😕

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ups I changed this because I saw other options objects around the codebase using an interface, but now that I look more closely both type an interface are used similarly:

  • git grep 'interface [^\s]*Options' ':(exclude)app/test/fixtures/*' | wc -l => 7 matches
  • git grep 'type [^\s]*Options' ':(exclude)app/test/fixtures/*' | wc -l => 2 matches

I'm gonna remove this change from this PR and maybe revisit this in a separate PR.

@Lazer39

This comment has been minimized.

@tierninho tierninho left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Confirming the annotated tags are getting successfully pushed up to the remote.

install.ts:31 Executing push: git -c credential.helper= -c protocol.version=2 push origin master --set-upstream --follow-tags --progress (took 4.774s)
install.ts:31 Executing getAllTags: git tag (took 0.022s)

Comment thread app/src/lib/git/push.ts Resolved
@outofambit
outofambit merged commit ae1542c into feature/add-create-tag-dialog Apr 10, 2020
@outofambit
outofambit deleted the push-tags branch April 10, 2020 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants