graykode

(fixed) git diff example

Showing 1 changed file with 11 additions and 7 deletions
...@@ -18,10 +18,13 @@ Have you ever hesitated to write a commit message? Now get a commit message from ...@@ -18,10 +18,13 @@ Have you ever hesitated to write a commit message? Now get a commit message from
18 ```text 18 ```text
19 diff --git a/test.py b/test.py 19 diff --git a/test.py b/test.py
20 new file mode 100644 20 new file mode 100644
21 -index 0000000..1b1b82a 21 +index 0000000..d13f441
22 --- /dev/null 22 --- /dev/null
23 +++ b/test.py 23 +++ b/test.py
24 -@@ -0,0 +1,3 @@ 24 +@@ -0,0 +1,6 @@
25 ++
26 ++import torch
27 ++import argparse
25 + 28 +
26 +def add(a, b): 29 +def add(a, b):
27 + return a + b 30 + return a + b
...@@ -32,13 +35,14 @@ Recommended Commit Message : Add two arguments . ...@@ -32,13 +35,14 @@ Recommended Commit Message : Add two arguments .
32 We can use CodeBERT to create a model that generates a commit message when code is added. However, most code changes are not made only by add of the code, and some parts of the code are deleted. 35 We can use CodeBERT to create a model that generates a commit message when code is added. However, most code changes are not made only by add of the code, and some parts of the code are deleted.
33 ```text 36 ```text
34 diff --git a/test.py b/test.py 37 diff --git a/test.py b/test.py
35 -index 1b1b82a..32a93f1 100644 38 +index d13f441..1b1b82a 100644
36 --- a/test.py 39 --- a/test.py
37 +++ b/test.py 40 +++ b/test.py
38 -@@ -1,3 +1,5 @@ 41 +@@ -1,6 +1,3 @@
39 -+import torch 42 +
40 -+import arguments 43 +-import torch
41 - 44 +-import argparse
45 +-
42 def add(a, b): 46 def add(a, b):
43 return a + b 47 return a + b
44 ``` 48 ```
......