#include "worktree.h"
#include "oidmap.h"
#include "oidset.h"
+#include "alias.h"
#define GIT_REFLOG_ACTION "GIT_REFLOG_ACTION"
if (!(flags & ALLOW_EMPTY) && !oidcmp(current_head ?
get_commit_tree_oid(current_head) :
- &empty_tree_oid, &tree)) {
+ the_hash_algo->empty_tree, &tree)) {
res = 1; /* run 'git commit' to display error message */
goto out;
}
unborn = 1;
} else if (unborn)
oidcpy(&head, the_hash_algo->empty_tree);
- if (index_differs_from(unborn ? EMPTY_TREE_SHA1_HEX : "HEAD",
+ if (index_differs_from(unborn ? empty_tree_oid_hex() : "HEAD",
NULL, 0))
return error_dirty_index(opts);
}
p[i] = save;
}
}
- } else if (((len = strlen(label)) == GIT_SHA1_RAWSZ &&
+ } else if (((len = strlen(label)) == the_hash_algo->hexsz &&
!get_oid_hex(label, &dummy)) ||
(len == 1 && *label == '#') ||
hashmap_get_from_hash(&state->labels,