diff --git a/utils/checkstyle.py b/utils/checkstyle.py
old mode 100644
new mode 100755
index 8e456cd..7c2ce00
--- a/utils/checkstyle.py
+++ b/utils/checkstyle.py
@@ -501,6 +501,26 @@ class Index(Commit):
                               stdout=subprocess.PIPE).stdout.decode('utf-8')
 
 
+class Amendment(Index):
+    def __init__(self):
+        Commit.__init__(self, None)
+
+    def det_info(self, top_level):
+        # Create a title using HEAD commit
+        ret = subprocess.run(['git', 'show', '--pretty=oneline', '--name-only', 'HEAD'],
+                             stdout=subprocess.PIPE).stdout.decode('utf-8')
+        title = 'Amendment of: ' + ret.splitlines()[0]
+        # Extract the list of modifier files
+        ret = subprocess.run(['git', 'diff', '--staged', '--name-only', 'HEAD~'],
+                             stdout=subprocess.PIPE).stdout.decode('utf-8')
+        return title, ret.splitlines()
+
+    def get_diff(self, top_level, filename):
+        return subprocess.run(['git', 'diff', '--staged', 'HEAD~', '--',
+                               '%s/%s' % (top_level, filename)],
+                              stdout=subprocess.PIPE).stdout.decode('utf-8')
+
+
 def check_file(top_level, commit, filename):
     # Extract the line numbers touched by the commit.
     diff = commit.get_diff(top_level, filename)
@@ -633,6 +653,8 @@ def main(argv):
                         help='Code formatter. Default to clang-format if not specified.')
     parser.add_argument('--staged', '-s', action='store_true',
                         help='Include the changes in the index. Defaults to False')
+    parser.add_argument('--amend', '-a', action='store_true',
+                        help='Includes changes in the index and the previous patch combined. Defaults to False')
     parser.add_argument('revision_range', type=str, default=None, nargs='?',
                         help='Revision range (as defined by git rev-parse). Defaults to HEAD if not specified.')
     args = parser.parse_args(argv[1:])
@@ -671,6 +693,8 @@ def main(argv):
     revlist = []
     if args.staged:
         revlist.append(Index())
+    if args.amend:
+        revlist.append(Amendment())
 
     # If nothing of --staged or --amend was passed, defaults to HEAD
     if len(revlist) == 0 and not args.revision_range:
