GithubHelp home page GithubHelp logo

Wrong name for toolbar tool about git-cola HOT 5 CLOSED

pkzc avatar pkzc commented on May 23, 2024
Wrong name for toolbar tool

from git-cola.

Comments (5)

pkzc avatar pkzc commented on May 23, 2024 1

The "Stage All Untracked" action is only staging new (untracked) files, as originally intended. I just added a new "Stage Changed Files To Commit" action to handle staging just modified files. That new action should do what you're describing.

Just one more thing: I would suggest to call the new operation "Stage All Modified" instead of "Stage Changed Files To Commit" because

  1. it follows the pattern of "Stage All Untracked" making it easier to comprehend,
  2. in the GUI, the files affected by the operation are listed under the title "Modified" as shown in the attached picture.

Screenshot at 2024-01-04 09-56-29

from git-cola.

davvid avatar davvid commented on May 23, 2024

Thanks for the heads-up! I'll get this patched shortly (before the next upcoming release).

from git-cola.

davvid avatar davvid commented on May 23, 2024

Interestingly, I wasn't able to reproduce this behavior.

The "Stage All Untracked" action is only staging new (untracked) files, as originally intended. I just added a new "Stage Changed Files To Commit" action to handle staging just modified files. That new action should do what you're describing.

I'm kinda surprised that you're seeing different behavior. Here's where the two commands are registered. They're definitely hooked up to the correct commands at this level:

'Commit::StageModified': {
'title': 'Stage Changed Files To Commit',
'action': cmds.run(cmds.StageModified),
'icon': 'add',
},
'Commit::StageUntracked': {
'title': 'Stage All Untracked',
'action': cmds.run(cmds.StageUntracked),
'icon': 'add',
},

Let me know if the latest version behaves differently. In theory it shouldn't, but we'll see. Thanks for the heads-up.

from git-cola.

pkzc avatar pkzc commented on May 23, 2024

You are right, it's a bit more complicated, after some experiments I can report this:

I have in the [gui] section of the git config file this:
displayuntracked = false
When I comment this out, then git-cola shows the untrackeds, and the "Stage All Untracked" stages exactly the untrackeds, the modified ones are left in place.

However, when I put back that line in the config, I get back the behavior that I originally reported.

from git-cola.

davvid avatar davvid commented on May 23, 2024

Alrighty, that totally explained it. Thanks for the tip about gui.displayuntracked. That setting caused the tool to go into a fallback code path that stages all files (because the list of files to stage will always be empty), which is obviously something we don't want to do.

This has been corrected.

from git-cola.

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.