Giter VIP home page Giter VIP logo

dontsplit's Introduction

git log --oneline will show folowing history:
{{{
ac958dd (HEAD -> master) Use sum function instead of repeating code
c21198b Added sum function
f191517 New functionality: divide result by 5
b5f03bc Move hardcoded values to variable
d0930ca Initail functionality
34f5b9c Initial commit
}}}

All was broken in ac958dd, but you can not see any mistake in commit
{{{
# git show ac958dd
commit ac958dd7ae20797b6b8b9fb7de53007f0c3a330f (HEAD -> master)
Author: Igor Tkachenko <[email protected]>
Date:   Thu Mar 26 12:40:33 2020 +0300

    Use sum function instead of repeating code

diff --git a/example.php b/example.php
index bad82a8..ac73e8b 100755
--- a/example.php
+++ b/example.php
@@ -1,5 +1,6 @@
 #!/usr/bin/php
 <?php
+  include "./sum.php";
   $a = 5;
   $b = 5;
   $c = 5;
@@ -7,6 +8,6 @@
   $e = 4;

   echo "Result is: ";
-  echo ($a+$b)*$c/($d+$e);
+  echo sum($a, $b)*$c/sum($d,$e);
   echo "\n"
 ?>
}}},
so you have to go deeper and find commits where sum function was added or changed:
{{{
# git blame sum.php
...
c21198be (Igor Tkachenko 2020-03-26 12:37:29 +0300 2)   function sum($a, $b) {
...
}}}
and check these commits instead of original commit that broke functionality.

In this example we have just one layer of splitted changes. In general you may face up with many levels and have to check everything related to broken commit as deep as new functionality was splitted.

dontsplit's People

Contributors

iatkachenko avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.