Рассмотрим следующий машинописный:`мерзавец -S` не находит все совершает
$ git clone [email protected]:laravel/framework.git
$ cd framework
$ git log --all --oneline --graph --decorate
...
| * | | | | | 07bb4d7 fix
| * | | | | | 0c2b7da Use the current timestamp as a default.
| * | | | | | 26cd65e (tag: v5.2.7) increment version
$ git show 0c2b7da
commit 0c2b7da2635f7bbbaf63d1b93fa817232bdd9d65
Author: Taylor Otwell <[email protected]>
Date: Thu Jan 7 08:01:39 2016 -0600
Use the current timestamp as a default.
diff --git a/src/Illuminate/Database/Schema/Blueprint.php b/src/Illuminate/Database/Schema/Blueprint.php
index fca8e89..7e179aa 100755
--- a/src/Illuminate/Database/Schema/Blueprint.php
+++ b/src/Illuminate/Database/Schema/Blueprint.php
@@ -791,9 +791,9 @@ class Blueprint
*/
public function timestamps()
{
- $this->timestamp('created_at');
+ $this->timestamp('created_at')->useCurrent();
- $this->timestamp('updated_at');
+ $this->timestamp('updated_at')->useCurrent();
}
/**
$ git log -p -m --full-history 07bb4d7 -Stimestamp src/Illuminate/Database/Schema/Blueprint.php
Вы не будете видеть это обязательство на выходе последней команды. Но если вы делаете:
$ git log -p origin/master -Stimestamp src/Illuminate/Database/Schema/Blueprint.php
Вы увидите, что это один:
commit 720a116897a4cc6780fa22f34d30c5986eafc581
Author: Taylor Otwell <[email protected]>
Date: Wed Feb 3 08:13:22 2016 -0600
make timestamps nullable by default
diff --git a/src/Illuminate/Database/Schema/Blueprint.php b/src/Illuminate/Database/Schema/Blueprint.php
index fca8e89..6cfab6f 100755
--- a/src/Illuminate/Database/Schema/Blueprint.php
+++ b/src/Illuminate/Database/Schema/Blueprint.php
@@ -779,9 +779,7 @@ class Blueprint
*/
public function nullableTimestamps()
{
- $this->timestamp('created_at')->nullable();
-
- $this->timestamp('updated_at')->nullable();
+ return $this->timestamps();
}
/**
@@ -791,9 +789,9 @@ class Blueprint
*/
public function timestamps()
{
- $this->timestamp('created_at');
+ $this->timestamp('created_at')->nullable();
- $this->timestamp('updated_at');
+ $this->timestamp('updated_at')->nullable();
}
/**
@@ -803,9 +801,9 @@ class Blueprint
*/
public function timestampsTz()
{
- $this->timestampTz('created_at');
+ $this->timestampTz('created_at')->nullable();
- $this->timestampTz('updated_at');
+ $this->timestampTz('updated_at')->nullable();
}
/**
Что я делаю неправильно? Как найти коммиты, которые меняют метод timestamps
?