Giter Site home page Giter Site logo

Comments (13)

jacogr avatar jacogr commented on July 17, 2024

Thank you, will retrace your steps and try to provide a fix.

from atom-git-control.

Trudko avatar Trudko commented on July 17, 2024

@jacogr how about if I take a look at this first? I have bit free time today so I can take a look. I am happy to help.

from atom-git-control.

jacogr avatar jacogr commented on July 17, 2024

Perfect, I appreciate any help, suggestions for improvements, cleanups, PRs, etc.

from atom-git-control.

Trudko avatar Trudko commented on July 17, 2024

Well what I noticed is that when I clone https://github.com/Trudko/my-package.git and run git control push is disabled. What I am curious though is why to disable it at all? I would disabled it only if there is not remote maybe.

from atom-git-control.

jacogr avatar jacogr commented on July 17, 2024

It will be inactive if neither of the following is true -

  1. Local changes have been made and committed - no need to push if there is nothing to push
  2. The local has a remote - no need to push is there is nowhere to push to

from atom-git-control.

Trudko avatar Trudko commented on July 17, 2024

I think the first scenario is the problem then. Do you update remote branches automatically or do I have to use fetch myself? If second is the case that might be a problem. I think ideally package should update remote branches automatically or make push available always but if there is nothing to push just show user the mssage.

PS: Even if pull and push are disabled when I click them the commands still run.

from atom-git-control.

jacogr avatar jacogr commented on July 17, 2024

All branches are updated automatically via fetch. In theory you should never need to call "fetch" yourself, rather as soon as you switch to the package, it updates.

I have been trying to replicate with new clones, thus far not much success.

PS: Yes, currently the gray is more of an indicator than a disabler. (Not intended this way initially, just wanted to get it out there and fed back in it's current form. Same goes for all command, except "commit" which will check for available/selected files.)

from atom-git-control.

Trudko avatar Trudko commented on July 17, 2024

Have you tried to clone the link I posted?

if gray is indicator isn't that confusing? At least it confused me, because I would though that if commit and reset doesn do anything while grayed out , so shouldn't pull and push.

from atom-git-control.

jacogr avatar jacogr commented on July 17, 2024

It is confusing, not supposed to be the "right way". Currently it is half-way there - the indicator is there, the block of functionality is not. (yet)

Repeated my test just now:

  1. Cloned repo on command-line (yours, i.e. git clone https://github.com/Trudko/my-package.git)
  2. Opened git-control, push was disabled (as expected, no local changes has been made)
  3. Change made, push still disabled (as expected, nothing committed as of yet)
  4. Change committed, push now enabled (as expected, branch also shows up arrow for local changes that should be pushed to remote)

from atom-git-control.

Trudko avatar Trudko commented on July 17, 2024

Ok try this:

  1. Mkdir test.
  2. cd test
  3. git init
  4. git remote add origin https://github.com/Trudko/my-package.git
  5. atom
  6. add new file test.txt
  7. run git control
  8. commit
  9. push buttion is disabled.

from atom-git-control.

jacogr avatar jacogr commented on July 17, 2024

Ok, I can now see what is happening. Confusing the fact that there are no remote branches (no fetch called) with not having an origin. I'll see what options I have to determine the actual origin here.

from atom-git-control.

jacogr avatar jacogr commented on July 17, 2024

Just pushed 0.1.8 that works for the cases where (a) no local remote exists (previous issue, needs to continue working) & (b) that addresses your issue here, i.e. from replicating the steps provided.

Please take a peek and let me know if the issue persists.

from atom-git-control.

Trudko avatar Trudko commented on July 17, 2024

Looks great thanks!

from atom-git-control.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.