summaryrefslogtreecommitdiff
path: root/src/status.c
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2012-05-08 16:06:27 -0700
committerVicent Martí <tanoku@gmail.com>2012-05-08 16:06:27 -0700
commite65752bb3251f9a308fd4f9cb3b294c4f7d90783 (patch)
treefee4deed1d318f16a266fc5ce6d57e539284c070 /src/status.c
parentfd5faae3466d3d74fd0601a1dac0ef0eaad48844 (diff)
parent7e000ab2ece977a028e3f1327de37342bef9f687 (diff)
downloadlibgit2-e65752bb3251f9a308fd4f9cb3b294c4f7d90783.tar.gz
Merge pull request #677 from arrbee/status-without-head
Add support for diffing index with no HEAD
Diffstat (limited to 'src/status.c')
-rw-r--r--src/status.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/status.c b/src/status.c
index 546dc863d..d07b0c41c 100644
--- a/src/status.c
+++ b/src/status.c
@@ -101,7 +101,7 @@ int git_status_foreach_ext(
diffopt.flags = diffopt.flags | GIT_DIFF_RECURSE_UNTRACKED_DIRS;
/* TODO: support EXCLUDE_SUBMODULES flag */
- if (show != GIT_STATUS_SHOW_WORKDIR_ONLY && head != NULL &&
+ if (show != GIT_STATUS_SHOW_WORKDIR_ONLY &&
(err = git_diff_index_to_tree(repo, &diffopt, head, &idx2head)) < 0)
goto cleanup;