gitless icon indicating copy to clipboard operation
gitless copied to clipboard

`gl status` doesn't show files in other directories.

Open skorokithakis opened this issue 11 years ago • 4 comments

If I do the following:

myrepo/$ <edit myfile.py>
myrepo/$ cd somedir
myrepo/somedir/$ gl status

It says there are no tracked files, even though if I cd .. it will (correctly) show me that myfile.py has been changed. Is it by design that the committed files are different depending on the directory I run commit in?

skorokithakis avatar Apr 03 '14 11:04 skorokithakis

Thanks for your report.

Both gl commit and gl status are sensitive to the directory you are running the command from. So if you run gl status on myrepo/somedir it will only report the status of files that are under myrepo/somedir and gl commit will only look at files that are under myrepo/somedir to figure out what to commit. To make this more clear, the gl status command reports (in the first line of its output) the repo-directory you are in (in addition to reporting the current branch).

Do you find this behavior confusing? We could add a flag (and a configuration variable) so that it's possible to change the behavior to one that is not current-directory-sensitive.

spderosso avatar Apr 04 '14 19:04 spderosso

Thanks for the clarification. I noticed the directory in gl status, but didn't know it meant that other files will not be considered. I found this very surprising, and, frankly, a recipe for disaster, since I work on multiple files in multiple directories (I use vim as my editor, so I'm on the cli all the time) and commit when done. This feature means that I will certainly forget to commit some files at some point, since I usually end my work in a subdirectory.

gitless is fantastic otherwise, the only two "problems" I've found is this and the lack of explicit push/pull (although something like legit's "sync" may be much better). It's a much better designed ui than git, congratulations!

skorokithakis avatar Apr 05 '14 02:04 skorokithakis

Thanks for your feedback, this is very useful! We'll look into adding a flag and a configuration variable to let the user change the behavior of gl commit and gl status.

About the lack of explicit pull/push (or something like legit's sync) I agree. We are about to change the way converging changes/syncing with remotes work. Hopefully, once we are done implementing our plans, this aspect of Gitless will improve.

Thanks again! do let us know if you have any further questions/feedback/suggestions.

spderosso avatar Apr 06 '14 14:04 spderosso

See comment: https://github.com/sdg-mit/gitless/issues/118#issuecomment-323478450

cougarhawk avatar Aug 20 '17 14:08 cougarhawk