Created
August 7, 2013 15:55
-
-
Save artagnon/6175397 to your computer and use it in GitHub Desktop.
The difference between git whatchanged and log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/whatchanged b/log | |
index fa1b223..004d9aa 100644 | |
--- a/tmp/whatchanged | |
+++ b/tmp/log | |
@@ -1,4 +1,4 @@ | |
-int cmd_whatchanged(int argc, const char **argv, const char *prefix) | |
+int cmd_log(int argc, const char **argv, const char *prefix) | |
{ | |
struct rev_info rev; | |
struct setup_revision_opt opt; | |
@@ -7,13 +7,10 @@ int cmd_whatchanged(int argc, const char **argv, const char *prefix) | |
git_config(git_log_config, NULL); | |
init_revisions(&rev, prefix); | |
- rev.diff = 1; | |
- rev.simplify_history = 0; | |
+ rev.always_show_header = 1; | |
memset(&opt, 0, sizeof(opt)); | |
opt.def = "HEAD"; | |
opt.revarg_opt = REVARG_COMMITTISH; | |
cmd_log_init(argc, argv, prefix, &rev, &opt); | |
- if (!rev.diffopt.output_format) | |
- rev.diffopt.output_format = DIFF_FORMAT_RAW; | |
return cmd_log_walk(&rev); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment