Defaults to true.
format.pretty::
+ifndef::with-breaking-changes[]
The default pretty format for log/show/whatchanged command.
See linkgit:git-log[1], linkgit:git-show[1],
linkgit:git-whatchanged[1].
+endif::with-breaking-changes[]
+ifdef::with-breaking-changes[]
+ The default pretty format for log/show command.
+ See linkgit:git-log[1], linkgit:git-show[1].
+endif::with-breaking-changes[]
format.thread::
The default threading style for 'git format-patch'. Can be
log.abbrevCommit::
- If true, makes linkgit:git-log[1], linkgit:git-show[1], and
- linkgit:git-whatchanged[1] assume `--abbrev-commit`. You may
+ If true, makes
+ifndef::with-breaking-changes[]
+ linkgit:git-log[1], linkgit:git-show[1], and
+ linkgit:git-whatchanged[1]
+endif::with-breaking-changes[]
+ifdef::with-breaking-changes[]
+ linkgit:git-log[1] and linkgit:git-show[1]
+endif::with-breaking-changes[]
+ assume `--abbrev-commit`. You may
override this option with `--no-abbrev-commit`.
log.date::
--notes[=<ref>]::
Show the notes (see linkgit:git-notes[1]) that annotate the
commit, when showing the commit log message. This is the default
+ifndef::with-breaking-changes[]
for `git log`, `git show` and `git whatchanged` commands when
+endif::with-breaking-changes[]
+ifdef::with-breaking-changes[]
+ for `git log` and `git show` commands when
+endif::with-breaking-changes[]
there is no `--pretty`, `--format`, or `--oneline` option given
on the command line.
+
ifdef::git-rev-list[]
Using these options, linkgit:git-rev-list[1] will act similar to the
-more specialized family of commit log tools: linkgit:git-log[1],
-linkgit:git-show[1], and linkgit:git-whatchanged[1]
+more specialized family of commit log tools:
+ifndef::with-breaking-changes[]
+linkgit:git-log[1], linkgit:git-show[1], and linkgit:git-whatchanged[1].
+endif::with-breaking-changes[]
+ifdef::with-breaking-changes[]
+linkgit:git-log[1] and linkgit:git-show[1].
+endif::with-breaking-changes[]
endif::git-rev-list[]
include::pretty-options.adoc[]
* blame (only matters when one or more -C flags are passed)
* and annotate
* log
- * whatchanged
+ * whatchanged (may not exist anymore)
* ls-files
* diff-index
* diff-tree
char *fmt_pretty;
char *default_date_mode;
+#ifndef WITH_BREAKING_CHANGES
/*
* Note: git_log_config() does not touch this member and that
* is very deliberate. This member is only to be used to
* resurrect whatchanged that is deprecated.
*/
int i_still_use_this;
+#endif
};
static void log_config_init(struct log_config *cfg)
OPT__QUIET(&quiet, N_("suppress diff output")),
OPT_BOOL(0, "source", &source, N_("show source")),
OPT_BOOL(0, "use-mailmap", &mailmap, N_("use mail map file")),
+#ifndef WITH_BREAKING_CHANGES
OPT_HIDDEN_BOOL(0, "i-still-use-this", &cfg->i_still_use_this,
"<use this deprecated command>"),
+#endif
OPT_ALIAS(0, "mailmap", "use-mailmap"),
OPT_CALLBACK_F(0, "clear-decorations", NULL, NULL,
N_("clear all previously-defined decoration filters"),
return git_diff_ui_config(var, value, ctx, cb);
}
+#ifndef WITH_BREAKING_CHANGES
int cmd_whatchanged(int argc,
const char **argv,
const char *prefix,
log_config_release(&cfg);
return ret;
}
+#endif
static void show_tagger(const char *buf, struct rev_info *rev)
{
{ "verify-pack", cmd_verify_pack },
{ "verify-tag", cmd_verify_tag, RUN_SETUP },
{ "version", cmd_version },
+#ifndef WITH_BREAKING_CHANGES
{ "whatchanged", cmd_whatchanged, RUN_SETUP },
+#endif
{ "worktree", cmd_worktree, RUN_SETUP },
{ "write-tree", cmd_write_tree, RUN_SETUP },
};
expect="$TEST_DIRECTORY/t4013/diff.$test"
actual="$pfx-diff.$test"
- test_expect_success "git $cmd # magic is ${magic:-(not used)}" '
+ case "$cmd" in
+ whatchanged | whatchanged" "*)
+ prereq=WITHOUT_BREAKING_CHANGES
+ ;;
+ *)
+ prereq=;;
+ esac
+
+ test_expect_success $prereq "git $cmd # magic is ${magic:-(not used)}" '
{
echo "$ git $cmd"
diff-tree -R --stat --compact-summary initial mode
EOF
-test_expect_success 'whatchanged needs --i-still-use-this' '
+test_expect_success WITHOUT_BREAKING_CHANGES 'whatchanged needs --i-still-use-this' '
test_must_fail git whatchanged >message 2>&1 &&
test_grep "nominated for removal" message
'
)
'
-for cmd in show whatchanged reflog format-patch
+cmds="show reflog format-patch"
+if test_have_prereq WITHOUT_BREAKING_CHANGES
+then
+ cmds="$cmds whatchanged"
+fi
+for cmd in $cmds
do
case "$cmd" in
format-patch) myarg="HEAD~.." ;;
test_cmp expect actual
'
-test_expect_success 'whatchanged is expected format' '
+test_expect_success WITHOUT_BREAKING_CHANGES 'whatchanged is expected format' '
whatchanged="whatchanged --i-still-use-this" &&
git log --no-merges --raw >expect &&
git $whatchanged >actual &&
git log --pretty=raw >expect.log.raw &&
git reflog --abbrev-commit >expect.reflog.abbrev &&
git reflog --no-abbrev-commit >expect.reflog.full &&
- git $whatchanged --abbrev-commit >expect.whatchanged.abbrev &&
- git $whatchanged --no-abbrev-commit >expect.whatchanged.full &&
+
+ if test_have_prereq WITHOUT_BREAKING_CHANGES
+ then
+ git $whatchanged --abbrev-commit >expect.whatchanged.abbrev &&
+ git $whatchanged --no-abbrev-commit >expect.whatchanged.full
+ fi &&
test_config log.abbrevCommit true &&
git reflog --no-abbrev-commit >actual &&
test_cmp expect.reflog.full actual &&
- git $whatchanged >actual &&
- test_cmp expect.whatchanged.abbrev actual &&
- git $whatchanged --no-abbrev-commit >actual &&
- test_cmp expect.whatchanged.full actual
+ if test_have_prereq WITHOUT_BREAKING_CHANGES
+ then
+ git $whatchanged >actual &&
+ test_cmp expect.whatchanged.abbrev actual &&
+ git $whatchanged --no-abbrev-commit >actual &&
+ test_cmp expect.whatchanged.full actual
+ fi
'
test_expect_success '--abbrev-commit with core.abbrev=false' '