Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/development' into windows-arm-…
Browse files Browse the repository at this point in the history
…support
  • Loading branch information
dennisameling committed May 22, 2020
2 parents 1c228d9 + f13ac6f commit 1ad7bb3
Show file tree
Hide file tree
Showing 15 changed files with 76 additions and 21 deletions.
2 changes: 1 addition & 1 deletion app/package.json
Expand Up @@ -3,7 +3,7 @@
"productName": "GitHub Desktop",
"bundleID": "com.github.GitHubClient",
"companyName": "GitHub, Inc.",
"version": "2.4.4-beta4",
"version": "2.5.1-beta1",
"main": "./main.js",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion app/src/lib/feature-flag.ts
Expand Up @@ -169,7 +169,7 @@ export function enableForkyCreateBranchUI(): boolean {
* are new commits upstream.)
*/
export function enableNDDBBanner(): boolean {
return enableBetaFeatures()
return false
}

/**
Expand Down
1 change: 1 addition & 0 deletions app/src/lib/git/tag.ts
Expand Up @@ -84,6 +84,7 @@ export async function fetchTagsToPush(
branchName,
'--follow-tags',
'--dry-run',
'--no-verify',
'--porcelain',
]

Expand Down
4 changes: 2 additions & 2 deletions app/src/lib/shell.ts
Expand Up @@ -10,7 +10,7 @@ type IndexLookup = {
/**
* The names of any env vars that we shouldn't copy from the shell environment.
*/
const BlacklistedNames = new Set(['LOCAL_GIT_DIRECTORY'])
const ExcludedEnvironmentVars = new Set(['LOCAL_GIT_DIRECTORY'])

/**
* Inspect whether the current process needs to be patched to get important
Expand Down Expand Up @@ -152,7 +152,7 @@ async function getEnvironmentFromShell(
*/
function mergeEnvironmentVariables(env: IndexLookup) {
for (const key in env) {
if (BlacklistedNames.has(key)) {
if (ExcludedEnvironmentVars.has(key)) {
continue
}

Expand Down
10 changes: 9 additions & 1 deletion app/src/lib/stores/git-store.ts
Expand Up @@ -265,7 +265,15 @@ export class GitStore extends BaseStore {

public async refreshTags() {
const previousTags = this._localTags
this._localTags = await getAllTags(this.repository)
const newTags = await this.performFailableOperation(() =>
getAllTags(this.repository)
)

if (newTags === undefined) {
return
}

this._localTags = newTags

if (previousTags !== null) {
// We don't await for the emition of updates to finish
Expand Down
11 changes: 10 additions & 1 deletion app/src/ui/dispatcher/error-handlers.ts
Expand Up @@ -188,7 +188,10 @@ export async function gitAuthenticationErrorHandler(
return null
}

/** Handle git clone errors to give chance to retry error. */
/**
* Handle git clone errors to give chance to retry error.
* Doesn't handle auth errors.
*/
export async function gitCloneErrorHandler(
error: Error,
dispatcher: Dispatcher
Expand All @@ -207,6 +210,12 @@ export async function gitCloneErrorHandler(
return error
}

const dugiteError = gitError.result.gitError
// don't catch this if this its an auth error
if (dugiteError !== null && AuthenticationErrors.has(dugiteError)) {
return error
}

const repository = e.metadata.repository
if (!repository) {
return error
Expand Down
25 changes: 20 additions & 5 deletions app/src/ui/history/commit-list-item.tsx
Expand Up @@ -89,15 +89,30 @@ export class CommitListItem extends React.PureComponent<
</div>
</div>
</div>
<div className="commit-indicators">
{enableGitTagsDisplay() &&
renderCommitListItemTags(this.props.commit.tags)}
{this.renderUnpushedIndicator()}
</div>
{this.renderCommitIndicators()}
</div>
)
}

private renderCommitIndicators() {
const tagIndicator = enableGitTagsDisplay()
? renderCommitListItemTags(this.props.commit.tags)
: null

const unpushedIndicator = this.renderUnpushedIndicator()

if (tagIndicator || unpushedIndicator) {
return (
<div className="commit-indicators">
{tagIndicator}
{unpushedIndicator}
</div>
)
}

return null
}

private renderUnpushedIndicator() {
if (!this.props.showUnpushedIndicator) {
return null
Expand Down
9 changes: 8 additions & 1 deletion app/src/ui/index.tsx
Expand Up @@ -4,6 +4,8 @@ import * as React from 'react'
import * as ReactDOM from 'react-dom'
import * as Path from 'path'

import * as moment from 'moment'

import { ipcRenderer, remote } from 'electron'

import { App } from './app'
Expand Down Expand Up @@ -86,6 +88,11 @@ process.env['LOCAL_GIT_DIRECTORY'] = Path.resolve(__dirname, 'git')
// Focus Ring! -- A11ycasts #16: https://youtu.be/ilj2P5-5CjI
require('wicg-focus-ring')

// setup this moment.js plugin so we can use easier
// syntax for formatting time duration
const momentDurationFormatSetup = require('moment-duration-format')
momentDurationFormatSetup(moment)

const startTime = performance.now()

if (!process.env.TEST_ENV) {
Expand Down Expand Up @@ -277,6 +284,7 @@ const dispatcher = new Dispatcher(
)

dispatcher.registerErrorHandler(defaultErrorHandler)
dispatcher.registerErrorHandler(gitCloneErrorHandler)
dispatcher.registerErrorHandler(upstreamAlreadyExistsHandler)
dispatcher.registerErrorHandler(externalEditorErrorHandler)
dispatcher.registerErrorHandler(openShellErrorHandler)
Expand All @@ -292,7 +300,6 @@ dispatcher.registerErrorHandler(missingRepositoryHandler)
dispatcher.registerErrorHandler(localChangesOverwrittenHandler)
dispatcher.registerErrorHandler(rebaseConflictsHandler)
dispatcher.registerErrorHandler(refusedWorkflowUpdate)
dispatcher.registerErrorHandler(gitCloneErrorHandler)

document.body.classList.add(`platform-${process.platform}`)

Expand Down
4 changes: 0 additions & 4 deletions app/src/ui/relative-time.tsx
@@ -1,9 +1,5 @@
import * as React from 'react'
import * as moment from 'moment'
const momentDurationFormatSetup = require('moment-duration-format')

// setup moment plugin
momentDurationFormatSetup(moment)

interface IRelativeTimeProps {
/**
Expand Down
2 changes: 1 addition & 1 deletion app/src/ui/tab-bar.tsx
Expand Up @@ -160,7 +160,7 @@ class TabBarItem extends React.Component<ITabBarItemProps, {}> {
onClick={this.onClick}
role="tab"
aria-selected={selected}
tabIndex={selected ? 0 : -1}
tabIndex={selected ? undefined : -1}
onKeyDown={this.onKeyDown}
type="button"
>
Expand Down
4 changes: 2 additions & 2 deletions app/styles/ui/_list.scss
Expand Up @@ -51,8 +51,8 @@
// Positioning
position: absolute;
top: 0px;
right: 3px;
width: 15px;
right: 1px;
width: 12px;

// Only support vertical scrolling for now
overflow-y: auto;
Expand Down
1 change: 1 addition & 0 deletions app/styles/ui/_repository-list.scss
Expand Up @@ -71,6 +71,7 @@
display: flex;
justify-content: flex-end;
align-items: center;
margin-right: var(--spacing-half);
}

.change-indicator-wrapper {
Expand Down
5 changes: 4 additions & 1 deletion app/styles/ui/history/_commit-list.scss
Expand Up @@ -16,7 +16,9 @@

border-bottom: var(--base-border);

padding: 0 var(--spacing);
// We need to give a bit more padding to the right to make place for the scrollbar
padding-right: calc(var(--spacing) + var(--spacing-half));
padding-left: var(--spacing);

.info {
display: flex;
Expand Down Expand Up @@ -50,6 +52,7 @@
margin-left: var(--spacing);
color: var(--list-item-badge-color);
height: 16px;
line-height: 16px;
max-width: 50%;

.tag-indicator {
Expand Down
15 changes: 15 additions & 0 deletions changelog.json
@@ -1,5 +1,20 @@
{
"releases": {
"2.5.1-beta1": [
"[Fixed] Center tags text vertically in History view - #9785",
"[Fixed] Prevent Git authentication errors from prompting to retry clone instead of authentication dialog - #9777",
"[Improved] Avoid executing unwanted Git hooks when fetching unpushed tags - #9793"
],
"2.5.0": [
"[New] Add, push, and view Git tags on commit history in Desktop - #9424",
"[Added] Offer option to choose file from one branch or the other when resolving merge conflicts - #9702",
"[Added] Add context menu for highlighted text in diff view - #5100. Thanks @HashimotoYT!",
"[Fixed] Retain default branch option in \"Create Branch\" dialog when user focuses away from Desktop - #9611",
"[Improved] Clean up copy for onboarding sign-in flow - #9715",
"[Improved] Emphasize signing in to GitHub via browser due to username/password deprecation - #9663",
"[Improved] Improve error message when publishing a private repository fails - #9646",
"[Improved] Offer to retry if cloning a repository fails - #926. Thanks @Daniel-McCarthy!"
],
"2.4.4-beta4": [
"[Fixed] Add missing \"Cancel\" button in onboarding sign-in flow - #9715",
"[Improved] Update copy for onboarding sign-in flow - #9715"
Expand Down
2 changes: 1 addition & 1 deletion docs/known-issues.md
Expand Up @@ -114,7 +114,7 @@ are unable to find another cygwin DLL.

Enabling Mandatory ASLR affects the MSYS2 core library, which is relied upon by Git for Windows to emulate process forking.

**Not supported:** this is an upstream limitation of MSYS2, and it is recommend that you either disable Mandatory ASLR or whitelist all executables under `<Git>\usr\bin` which depend on MSYS2.
**Not supported:** this is an upstream limitation of MSYS2, and it is recommend that you either disable Mandatory ASLR or explicitly allow all executables under `<Git>\usr\bin` which depend on MSYS2.

### I get a black screen when launching Desktop

Expand Down

0 comments on commit 1ad7bb3

Please sign in to comment.