summaryrefslogtreecommitdiff
path: root/unpack-trees.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-03-26 00:27:33 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-03-26 00:27:33 -0700
commit6ba8b079cbe49e2e49bc26a0ca2e47185337142c (patch)
treeaad000ecd7316a43ee2e6e8ffb31e9955e9609e9 /unpack-trees.c
parentMerge branch 'js/maint-diff-temp-smudge' (diff)
parentAdd a test for checking whether gitattributes is honored by checkout. (diff)
downloadtgif-6ba8b079cbe49e2e49bc26a0ca2e47185337142c.tar.xz
Merge branch 'jc/attributes-checkout'
* jc/attributes-checkout: Add a test for checking whether gitattributes is honored by checkout. Read attributes from the index that is being checked out
Diffstat (limited to 'unpack-trees.c')
-rw-r--r--unpack-trees.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/unpack-trees.c b/unpack-trees.c
index 86e28650b8..6847c2d966 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -7,6 +7,7 @@
#include "unpack-trees.h"
#include "progress.h"
#include "refs.h"
+#include "attr.h"
/*
* Error messages expected by scripts out of plumbing commands such as
@@ -86,6 +87,7 @@ static int check_updates(struct unpack_trees_options *o)
cnt = 0;
}
+ git_attr_set_direction(GIT_ATTR_CHECKOUT, &o->result);
for (i = 0; i < index->cache_nr; i++) {
struct cache_entry *ce = index->cache[i];
@@ -110,6 +112,7 @@ static int check_updates(struct unpack_trees_options *o)
}
}
stop_progress(&progress);
+ git_attr_set_direction(GIT_ATTR_CHECKIN, NULL);
return errs != 0;
}