Comments (15)
Do you mean the terminal plugin from fluidbyte?
Could you run git status --branch --porcelain
in this terminal?
from codiad-codegit.
Yes I did mean the terminal plugin.
git status --branch --porcelain
error: unknown option `branch'
usage: git status [options] [--] ...
-v, --verbose be verbose
-s, --short show status concisely
--porcelain show porcelain output format
-z, --null terminate entries with NUL
-u, --untracked-files[=<mode>]
show untracked files, optional modes: all, normal, no. (Default: all)
git --version
git version 1.7.1
from codiad-codegit.
Okay, I see the problem, I checked the reference and the option -b/--branch is only available since version 1.7.2. Are you able to update git?
from codiad-codegit.
I'll check with the host.
from codiad-codegit.
Ok, my host upgraded to 2.0.2 and now the plugin displays changes properly, thanks for that.
Next problem. If I try to commit, I get a "Failed Commit" error popup. Is there anyway to see what the error was? Any other ideas?
from codiad-codegit.
There is currently no way to see why a commit failed. I will think about a way to get this information.
Do you told git who you are? If not, use the settings of CodeGit to save these informations.
from codiad-codegit.
Whereabouts do I set this? The CodeGit settings prompt me for username and E-Mail.
from codiad-codegit.
Git requires an email address and an username to identify and mark your commits: Details: Git website. Even if they are fictitious.
from codiad-codegit.
There was already a username, I added an email and that seemed to help. I had some commits succeed. But most of them do still fail.
from codiad-codegit.
I'm doing some debugging and figured out that the problem is that a commit is getting called without an add first getting called.
Whereabouts does it call 'git add...' to stage the file prior to commit?
from codiad-codegit.
git add
get immediately called before git commit
, see init.js
from codiad-codegit.
Ok I finally made it all go, had to make some code changes though.
1: In init.js:add the this variable is getting corrupted, so changed to use the _this you already had
2: the JSON.stringify in init.js:add is escaping quotes with a '' character, which causes the json_decode in controller.php:add to fail, so strip them out prior
3: I also added an error condition to controller.php:add, as the fail was appearing as a success
Below is a diff:
diff /home/aohunga/tmp/Codiad-CodeGit-master/controller.php ./controller.php
68a69,70
> $filelist = $_POST['files'];
> $filelist = str_replace('\\', '', $filelist);
70c72
< $files = json_decode($_POST['files']);
---
> $files = json_decode($filelist);
72,76c74,82
< foreach($files as $file) {
< $result = !(!$result | !$git->add(getWorkspacePath($_GET['path']), $file));
< }
< if ($result) {
< echo '{"status":"success","message":"Files added"}';
---
> if ($files) {
> foreach($files as $file) {
> $result = !(!$result | !$git->add(getWorkspacePath($_GET['path']), $file));
> }
> if ($result) {
> echo '{"status":"success","message":"Files added"}';
> } else {
> echo '{"status":"error","message":"Failed add files!"}';
> }
78c84
< echo '{"status":"error","message":"Failed add files!"}';
---
> echo '{"status":"error","message":"Could not decode files to add \'' . $_POST['files'] . '\'!"}';
diff /home/aohunga/tmp/Codiad-CodeGit-master/init.js ./init.js
217c217
< $.post(this.path + 'controller.php?action=add&path=' + path, {files : JSON.stringify(this.files)}, function(result){
---
> $.post(this.path + 'controller.php?action=add&path=' + path, {files : JSON.stringify(_this.files)}, function(result){
from codiad-codegit.
Also multiple checkin wasn't working. To fix it changed class.git.php:add to
public function add($path, $file) {
if (!is_dir($path)) return false;
$cwd = getcwd();
chdir($path);
$result = $this->executeCommand("git add " . $file);
chdir($cwd);
if ($result === 0) {
return true;
} else {
return false;
}
}
from codiad-codegit.
Thanks for your bug hunting. I added your solution for the multiple checkin. But I can not reproduce your problems with JSON.stringify and this.files. Which browser do you use and on which files does this happen?
from codiad-codegit.
No problem :)
I'm on Chrome. I thought there must have been something environmental,
otherwise it never would have worked, which clearly is not the case.
Changing this.files to _this.files makes sense even if it is only a problem
in some environments right, because it will work in both cases?
I was checking in silverstripe template files. So they were pretty much
html with some php in them with a file extension of .ss. Again replacing
" with " should work because it will replace the slash delimiter if it
exists but leave it as is if it's not there.
Mauri Ora
Jeremy Banks
On 3 August 2014 03:00, Andr3as [email protected] wrote:
Thanks for your bug hunting. I added your solution for the multiple
checkin. But I can not reproduce your problems with JSON.stringify and
this.files. Which browser do you use and on which files does this happen?β
Reply to this email directly or view it on GitHub
#8 (comment)
.
from codiad-codegit.
Related Issues (20)
- Commit messages shouldn't escape ()
- Push action "Hangs" HOT 1
- Pushing/Pulling to/from local remote branch causes crash HOT 2
- Bitbucket Support HOT 7
- βPlease install shell program!β error on FreeBSD
- Undefined variable 'new_path' HOT 1
- how do i setup pexpect to use with codiad HOT 2
- non-latin commit mesage HOT 2
- Corrupted git strings HOT 2
- Git crashes ide HOT 1
- Feature Request - Add git oblivious mode HOT 1
- Permission change on git push HOT 2
- Please install shell program! HOT 3
- Error: "Warning: session_start(): Cannot send session cache limiter" HOT 2
- codiad says commits are being successfully pushed, but they're not HOT 5
- "Please install shell program" with both Expect and pexpect HOT 1
- Use Git.php for better security HOT 2
- problem with merge
- SSH access?
- occasionally falsely says "Failed to push"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codiad-codegit.