Skip to content

Commit

Permalink
fixup pullrequest from mrdomino
Browse files Browse the repository at this point in the history
  • Loading branch information
schachmat committed Jan 19, 2015
1 parent 0b360a8 commit 16c933c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions slcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ int main(int argc, char* argv[])
git_state = "revert";
lentmp = 6;
break;
case GIT_REPOSITORY_STATE_CHERRY_PICK:
case GIT_REPOSITORY_STATE_CHERRYPICK:
git_state = "cherry";
lentmp = 6;
break;
Expand Down Expand Up @@ -236,7 +236,10 @@ int main(int argc, char* argv[])
if(git_repo && (origgitd = git_repository_workdir(git_repo))) {
/* get pointers and len of outside-repo- and inside-repo-path */
for(i = 0; origpwd[i] && origpwd[i] == origgitd[i]; i++);
for(i -= !origpwd[i] ? 1 : 2; origpwd[i] != '/'; i--);
for(i -= !origpwd[i] ? 1 : 2; origpwd[i] != '/'; i--) {
if(i == 0)
break;
}
i++;
gitd = origpwd + i;
for(lengitpath = 0; origpwd[i + lengitpath]; lengitpath++);
Expand Down

0 comments on commit 16c933c

Please sign in to comment.