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

Can't stage files after Stage All with project on D: drive #1801

Open
1 task done
adriangzz opened this issue Nov 17, 2018 · 7 comments
Open
1 task done

Can't stage files after Stage All with project on D: drive #1801

adriangzz opened this issue Nov 17, 2018 · 7 comments

Comments

@adriangzz
Copy link

adriangzz commented Nov 17, 2018

Edit by @rsese to add my notes from #1801 (comment)

I played around with things more so I'll leave some notes here, tested on Windows 10 with Atom 1.32.2.

  1. Started by plugging in a flash drive to use as my D: drive
  2. In Git Bash, I created a test directory mkdir test-gh; cd test-gh
  3. Added a file echo "Hello World" >> README.md
  4. atom .

At this point I found that if I open the Git panel I see the "Unsupported directory" + "Atom does not support managing Git repositories in your home or root directories" message, so you can't initialize a repo from the Git panel.

But then if I do a git init and an initial commit in Git Bash:

  1. git init
  2. git add README.md
  3. git commit -m "Initial commit"
  4. Reload Atom

After reloading Atom, the Git panel shows up normally. If I make and save a change, it shows up in Unstaged Changes and at this point, if I right-click and Stage the file, that works ok and I can commit that change.

But where it seems to break is if I click Stage All, I see a "Uncaught (in promise) Error: EINVAL: invalid argument, read` message in devtools console. At this point I can no longer right-click to stage a change unless I reload/restart Atom.

The "Atom does not support managing Git repositories in your home or root directories" doesn't seem right since I've created a subdirectory under D:? Then the other issue seems to be the error from Stage All which then prevents things from working while right-clicking to stage a single file works.


Prerequisites

Description

When I click on Stage All, Unstage All, right click a file and click stage, nothing happens.
In console I get this error:
VM22 <embedded>:14 Uncaught (in promise) Error: EINVAL: invalid argument,

Steps to Reproduce

  1. Open Git on the sidebar
  2. Click on Stage all, Unstage All, right click a file -> Stage

Expected behavior: [What you expect to happen]

For my files to move to Staged Changes or Unstaged changes

Actual behavior: [What actually happens]

Files don't move.

Reproduces how often: [What percentage of the time does it reproduce?]

100%

Versions

You can get this information from copy and pasting the output of atom --version and apm --version from the command line. Also, please include the OS and what version of the OS you're running.

Atom : 1.32.2
Electron: 2.0.9
Chrome : 61.0.3163.100
Node : 8.9.3
Windows: 10

Additional Information

When I do apm --version I get this:
internal/child_process.js:323
throw errnoException(err, 'spawn');
^

Error: spawn UNKNOWN
at _errnoException (util.js:1024:11)
at ChildProcess.spawn (internal/child_process.js:323:11)
at exports.spawn (child_process.js:502:9)
at EventEmitter.<anonymous> (C:\Users\Adrian\AppData\Local\atom\app-1.32.2\resources\app\apm\lib\apm-cli.js:169:17)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)

@rsese
Copy link
Contributor

rsese commented Nov 20, 2018

Thanks for the report! I was unable to reproduce on macOS 10.12.6 with Atom 1.32.2.

Do you see this behavior with any project or just the one you're working on?

And can you reproduce with any file for the "right click a file -> Stage" step? Also for this step, are there any special characters in the filename or path of the file that you right-click to stage?

When I do apm --version I get this:

I think you'll get that error if you run apm --version in Git Bash or Cygwin (/cc atom/apm#725). It should work in cmd.exe or PowerShell.

@adriangzz
Copy link
Author

adriangzz commented Nov 21, 2018

Do you see this behavior with any project or just the one you're working on?

Yes, this behavior happens on every project.

And can you reproduce with any file for the "right click a file -> Stage" step?

Yes, this behavior also happens when I right click a file and click stage.

Also for this step, are there any special characters in the filename or path of the file that you right-click to stage?

That is interesting, there are no special characters in the filename or path but I created a folder on the root of my C: drive and stage/unstage worked.

It seems like when a folder is on D: this behavior happens, but when I move them to C: they seem to work. What can be the cause of this?

@rsese
Copy link
Contributor

rsese commented Nov 28, 2018

Ohh sorry, I just realized that I misinterpreted your repro steps. I thought this was a series of steps:

  1. Click on Stage all, Unstage All, right click a file -> Stage

But I think you meant that none of those functions work for you?

I played around with things more so I'll leave some notes here, tested on Windows 10 with Atom 1.32.2.

  1. Started by plugging in a flash drive to use as my D: drive
  2. In Git Bash, I created a test directory mkdir test-gh; cd test-gh
  3. Added a file echo "Hello World" >> README.md
  4. atom .

At this point I found that if I open the Git panel I see the "Unsupported directory" + "Atom does not support managing Git repositories in your home or root directories" message, so you can't initialize a repo from the Git panel.

But then if I do a git init and an initial commit in Git Bash:

  1. git init
  2. git add README.md
  3. git commit -m "Initial commit"
  4. Reload Atom

After reloading Atom, the Git panel shows up normally. If I make and save a change, it shows up in Unstaged Changes and at this point, if I right-click and Stage the file, that works ok and I can commit that change.

But where it seems to break is if I click Stage All, I see a "Uncaught (in promise) Error: EINVAL: invalid argument, read` message in devtools console. At this point I can no longer right-click to stage a change unless I reload/restart Atom.

The "Atom does not support managing Git repositories in your home or root directories" doesn't seem right since I've created a subdirectory under D:? Then the other issue seems to be the error from Stage All which then prevents things from working while right-clicking to stage a single file works.

@rsese rsese changed the title Stage all and Unstage all not working Can't stage files after Stage All with project on D: drive Nov 28, 2018
@asdasd-123
Copy link

asdasd-123 commented Dec 14, 2018

Hi, I also have the same issue as OP

I've included a video of the same thing happening (also on D:\ which also happens to be a thumb-drive). Please let me know what other information I need to supply.
Not sure if related, but deleting files in atom never works on a thumb-drive because it fails to find the recycling bin

video link : https://streamable.com/c8edh

EDIT: To add to above, moving the project to C: makes it all work fine. Repeatable every time

@rsese
Copy link
Contributor

rsese commented Dec 17, 2018

Not sure if related, but deleting files in atom never works on a thumb-drive because it fails to find the recycling bin

That behavior is a separate issue, see and atom/tree-view#856 (comment) in particular for more details.

@scottforte
Copy link

scottforte commented Apr 24, 2021

Do you see this behavior with any project or just the one you're working on?

Yes, this behavior happens on every project.

And can you reproduce with any file for the "right click a file -> Stage" step?

Yes, this behavior also happens when I right click a file and click stage.

Also for this step, are there any special characters in the filename or path of the file that you right-click to stage?

That is interesting, there are no special characters in the filename or path but I created a folder on the root of my C: drive and stage/unstage worked.

It seems like when a folder is on D: this behavior happens, but when I move them to C: they seem to work. What can be the cause of this?

Looks like this is still open. Was there ever a solution @adriangzz ? I get the same error.

@adriangzz
Copy link
Author

Do you see this behavior with any project or just the one you're working on?

Yes, this behavior happens on every project.

And can you reproduce with any file for the "right click a file -> Stage" step?

Yes, this behavior also happens when I right click a file and click stage.

Also for this step, are there any special characters in the filename or path of the file that you right-click to stage?

That is interesting, there are no special characters in the filename or path but I created a folder on the root of my C: drive and stage/unstage worked.
It seems like when a folder is on D: this behavior happens, but when I move them to C: they seem to work. What can be the cause of this?

Looks like this is still open. Was there ever a solution @adriangzz ? I get the same error.

I ended up moving my working folder to the C: drive.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants