Skip to content

Commit

Permalink
wt-status: remove unused field in grab_1st_switch_cbdata
Browse files Browse the repository at this point in the history
The struct grab_1st_switch_cbdata has the field "found", which is
set in grab_1st_switch() when a match is found.  This information is
redundant and unused by any code.  The return value of the function
serves to communicate this information anyway.

Remove the field.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Ramkumar Ramachandra authored and Junio C Hamano committed Jun 17, 2013
1 parent 46ab7d4 commit ce23d49
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions wt-status.c
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,6 @@ static char *read_and_strip_branch(const char *path)
}

struct grab_1st_switch_cbdata {
int found;
struct strbuf buf;
unsigned char nsha1[20];
};
Expand All @@ -1059,7 +1058,6 @@ static int grab_1st_switch(unsigned char *osha1, unsigned char *nsha1,
for (end = target; *end && *end != '\n'; end++)
;
strbuf_add(&cb->buf, target, end - target);
cb->found = 1;
return 1;
}

Expand Down

0 comments on commit ce23d49

Please sign in to comment.