Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Add ability to initialize new repo - #574

Merged
BinaryMuse merged 15 commits into
masterfrom
mkt-git-init
Feb 28, 2017
Merged

BinaryMuse merged 15 commits into
masterfrom
mkt-git-init

Conversation

@BinaryMuse

Copy link
Copy Markdown
Contributor

Resolves #553 by adding a UI by which the user can initialize a new Git repository in the current project folder.

@BinaryMuse

Copy link
Copy Markdown
Contributor Author

@simurai I did some basic styling work based on your mock, but of course feel free to dig in and 🔥. :)

test_txt_ ___src_init-new-repo_and_about_blank

You can try this out on a folder that doesn't have a repository yet, but clicking the blue button will 💥 until #533 lands.

@BinaryMuse

Copy link
Copy Markdown
Contributor Author

@smashwilson @kuychaco I wanted to take this opportunity to have Repository.open return a "NullRepository" object that represented a possible future repository that could be created "in-place" by having init() called on it, but it was much easier to do it this way as we do explicit checks for null all over the place. Might still be a nice refactoring to do at some point.

@simurai simurai 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.

Made just some minor tweaks. Like a bit more subtle Git logo. I hope @jasonlong isn't gonna come after us. 😇

@smashwilson smashwilson 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.

Nice ✨

I'll get #533 polished up and :shipit: this morning so this can use it 😄

Comment thread lib/controllers/root-controller.js Outdated
githubEnabled: false,
createRepositoryForProjectPath: () => {
throw new Error('default createRepositoryForProjectPath not implemented');
},

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.

Does this have an advantage over just not providing a default for createRepositoryForProjectPath?

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.

Ha, nope, good call

Comment thread lib/github-package.js Outdated
const resolutionProgressPromise = repository.getLastCommit()
.then(commit => new ResolutionProgress(commit.sha, savedResolutionProgress));
.then(commit => new ResolutionProgress(commit.sha, savedResolutionProgress))
.catch(() => null);

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.

Hmm what error is this catching? I think this is over-broad.

Fake edit: ohh this is the bit waiting for #533, isn't it. Carry on then 🚧

Comment thread lib/views/git-logo.js
@@ -0,0 +1,24 @@
/** @jsx etch.dom */
import etch from 'etch';

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.

#381 will get done one day, for reals... 😛

@jasonlong

Copy link
Copy Markdown

Like a bit more subtle Git logo. I hope @jasonlong isn't gonna come after us.

Awww, no 3d spinning logo with lens flare??

@smashwilson

Copy link
Copy Markdown
Contributor

"The GitHub package for Atom, produced by J. J. Abrams"

@BinaryMuse

Copy link
Copy Markdown
Contributor Author

Merged in #533 and this works fantastically!

@BinaryMuse
BinaryMuse merged commit cff2bb8 into master Feb 28, 2017
@BinaryMuse
BinaryMuse deleted the mkt-git-init branch February 28, 2017 18:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants