From: Axel Bonnet <axel.bonnet@ensimag.imag.fr>
To: git@vger.kernel.org
Cc: "Axel Bonnet" <axel.bonnet@ensimag.imag.fr>,
"Diane Gasselin" <diane.gasselin@ensimag.imag.fr>,
"Clément Poulain" <clement.poulain@ensimag.imag.fr>
Subject: [RFC/PATCH 2/4] textconv: make diff_options accessible from blame
Date: Thu, 3 Jun 2010 12:47:16 +0200 [thread overview]
Message-ID: <1275562038-7468-3-git-send-email-axel.bonnet@ensimag.imag.fr> (raw)
In-Reply-To: <1275562038-7468-2-git-send-email-axel.bonnet@ensimag.imag.fr>
Diff_options specify whether conversion is activated or not. Blame needs
to access these options in order to concert files with external drivers
Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr>
Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr>
Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr>
---
builtin/blame.c | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/builtin/blame.c b/builtin/blame.c
index fc15863..63b497c 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -89,7 +89,8 @@ struct origin {
* Given an origin, prepare mmfile_t structure to be used by the
* diff machinery
*/
-static void fill_origin_blob(struct origin *o, mmfile_t *file)
+static void fill_origin_blob(struct diff_options opt,
+ struct origin *o, mmfile_t *file)
{
if (!o->file.ptr) {
enum object_type type;
@@ -741,8 +742,8 @@ static int pass_blame_to_parent(struct scoreboard *sb,
if (last_in_target < 0)
return 1; /* nothing remains for this target */
- fill_origin_blob(parent, &file_p);
- fill_origin_blob(target, &file_o);
+ fill_origin_blob(sb->revs->diffopt, parent, &file_p);
+ fill_origin_blob(sb->revs->diffopt, target, &file_o);
num_get_patch++;
memset(&xpp, 0, sizeof(xpp));
@@ -922,7 +923,7 @@ static int find_move_in_parent(struct scoreboard *sb,
if (last_in_target < 0)
return 1; /* nothing remains for this target */
- fill_origin_blob(parent, &file_p);
+ fill_origin_blob(sb->revs->diffopt, parent, &file_p);
if (!file_p.ptr)
return 0;
@@ -1063,7 +1064,7 @@ static int find_copy_in_parent(struct scoreboard *sb,
norigin = get_origin(sb, parent, p->one->path);
hashcpy(norigin->blob_sha1, p->one->sha1);
- fill_origin_blob(norigin, &file_p);
+ fill_origin_blob(sb->revs->diffopt, norigin, &file_p);
if (!file_p.ptr)
continue;
@@ -1990,7 +1991,9 @@ static int git_blame_config(const char *var, const char *value, void *cb)
* Prepare a dummy commit that represents the work tree (or staged) item.
* Note that annotating work tree item never works in the reverse.
*/
-static struct commit *fake_working_tree_commit(const char *path, const char *contents_from)
+static struct commit *fake_working_tree_commit(struct diff_options opt,
+ const char *path,
+ const char *contents_from)
{
struct commit *commit;
struct origin *origin;
@@ -2384,7 +2387,8 @@ parse_done:
* or "--contents".
*/
setup_work_tree();
- sb.final = fake_working_tree_commit(path, contents_from);
+ sb.final = fake_working_tree_commit(sb.revs->diffopt, path,
+ contents_from);
add_pending_object(&revs, &(sb.final->object), ":");
}
else if (contents_from)
--
1.6.6.7.ga5fe3
next prev parent reply other threads:[~2010-06-03 11:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-03 10:47 [RFC/PATCH 0/4] textconv support for blame Axel Bonnet
2010-06-03 10:47 ` [RFC/PATCH 1/4] textconv: make the API public Axel Bonnet
2010-06-03 10:47 ` Axel Bonnet [this message]
2010-06-03 10:47 ` [RFC/PATCH 3/4] textconv: support for blame Axel Bonnet
2010-06-03 10:47 ` [RFC/PATCH 4/4] t/t8006: test textconv " Axel Bonnet
2010-06-03 15:44 ` Johannes Sixt
2010-06-04 8:55 ` Diane Gasselin
2010-06-04 9:45 ` Matthieu Moy
2010-06-04 8:49 ` Matthieu Moy
2010-06-04 6:00 ` [RFC/PATCH 3/4] textconv: " Junio C Hamano
2010-06-04 10:34 ` Diane Gasselin
2010-06-06 21:51 ` Jeff King
2010-06-04 5:48 ` [RFC/PATCH 2/4] textconv: make diff_options accessible from blame Junio C Hamano
2010-06-04 7:59 ` Matthieu Moy
2010-06-04 10:21 ` bonneta
2010-06-04 17:23 ` Matthieu Moy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1275562038-7468-3-git-send-email-axel.bonnet@ensimag.imag.fr \
--to=axel.bonnet@ensimag.imag.fr \
--cc=clement.poulain@ensimag.imag.fr \
--cc=diane.gasselin@ensimag.imag.fr \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).