Skip to content

Push/pull/update - #601

Merged
niik merged 32 commits into
masterfrom
git-gives-and-takes-away
Nov 11, 2016
Merged

niik merged 32 commits into
masterfrom
git-gives-and-takes-away

Conversation

@joshaber

@joshaber joshaber commented Nov 4, 2016 •

Copy link
Copy Markdown
Contributor

Fixes #598

screen shot 2016-11-09 at 11 17 49 am

nextProps.symbol.h !== this.props.symbol.h ||
nextProps.symbol.d !== this.props.symbol.d) {
nextProps.symbol.d !== this.props.symbol.d ||
nextProps.className !== this.props.className) {

This comment was marked as spam.

@joshaber joshaber changed the title [WIP] Push/pull/update Push/pull/update Nov 9, 2016
@joshaber

joshaber commented Nov 9, 2016

Copy link
Copy Markdown
Contributor Author

This is ready for review 🙏

I split the Publish Repository flow out into its own issue: #611

@niik niik self-assigned this Nov 10, 2016
@niik
niik force-pushed the git-gives-and-takes-away branch from 4f30461 to ae399d2 Compare November 10, 2016 09:31

@niik niik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

OMG This is so good @joshaber. Can't wait for this to land

public updateLastFetched(): Promise<void> {
const path = Path.join(this.repository.path, '.git', 'FETCH_HEAD')
return new Promise((resolve, reject) => {
Fs.stat(path, (err, stats) => {

This comment was marked as spam.

This comment was marked as spam.

if (!upstream) { return null }

const range = `${branch.name}..${upstream}`
const range = `${branch.name}...${upstream}`

This comment was marked as spam.


const lastFetched = this.props.lastFetched
if (lastFetched) {
const relative = moment(lastFetched).fromNow()

This comment was marked as spam.

This comment was marked as spam.

content.push(
<span key='ahead'>
{ahead}
<Octicon symbol={OcticonSymbol.arrowUp}/>

This comment was marked as spam.

@joshaber

Copy link
Copy Markdown
Contributor Author

A relevant thread got collapsed. About the last fetched date:

(For historical context, Back In The Day, Mac displayed last-fetched using this method.)

We could check to see if the file has any content I guess but I wonder if a better approach would be to have this method only update the _lastFetched field if the file has content and use it to when we launch and then maintain the state ourselves after that, possible in a clever combination with this method?

That could work alright, though if the user fetches outside the app our date won't be accurate. Maybe that's OK. I don't feel strongly either way.

I changed updateLastFetched to only update if the file has a size.

@niik

niik commented Nov 11, 2016

Copy link
Copy Markdown
Member

So happy to get this in

@niik
niik merged commit dc5cfc8 into master Nov 11, 2016
@niik
niik deleted the git-gives-and-takes-away branch November 11, 2016 13:31
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