私はGITにかなり慣れていないので、ステージング領域のコンテンツを最後のコミットと比較する必要があるgit diff --stagedの正しい使用について、次の疑問があります。
したがって、次の出力が得られます。
$ git diff --staged
diff --git a/game.js b/game.js
index 49bf5ea..0783175 100644
--- a/game.js
+++ b/game.js
@@ -421,6 +421,7 @@ Ship = function () {
}
if (KEY_STATUS.space) {
if (this.delayBeforeBullet <= 0) {
+ this.delayBeforeBullet = 10;
// added to fix the bug !!!
for (var i = 0; i < this.bullets.length; i++) {
if (!this.bullets[i].visible) {
SFX.laser();
@@ -539,6 +540,7 @@ BigAlien = function () {
this.delayBeforeBullet -= delta;
if (this.delayBeforeBullet <= 0) {
+ //if (this.delayBeforeBullet = 10) {
this.delayBeforeBullet = 22;
for (var i = 0; i < this.bullets.length; i++) {
if (!this.bullets[i].visible) {
Andrea@Andrea-PC MINGW64 ~/Documents/WS_vari/version-control/asteroids ((3884eab
...))
では、この出力は正確には何を意味するのでしょうか? これは、ステージング エリアに次の 2 行を追加したことを意味していると思います。
1)
+ this.delayBeforeBullet = 10; // added to fix the bug !!!
2)
+ //if (this.delayBeforeBullet = 10) {
最後のコミットにはありません。
私の推論は正しいですか?