X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=unpack-trees.c;h=e4eb8fa3afc7ad895ba925701ee3c6881b29bd91;hb=47abd85ba06ed7209d1caa3e5ac7cc6b232bece4;hp=86e28650b887b4fcc1b05cc4d3102367df18a9ac;hpb=89fbda24256157cc43848488429fd20cf3bb21ab;p=git.git diff --git a/unpack-trees.c b/unpack-trees.c index 86e28650b..e4eb8fa3a 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,8 @@ static int check_updates(struct unpack_trees_options *o) cnt = 0; } + if (o->update) + 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 +113,8 @@ static int check_updates(struct unpack_trees_options *o) } } stop_progress(&progress); + if (o->update) + git_attr_set_direction(GIT_ATTR_CHECKIN, NULL); return errs != 0; }