]> git.ipfire.org Git - thirdparty/git.git/commitdiff
wt-status: remove unused field in grab_1st_switch_cbdata
authorRamkumar Ramachandra <artagnon@gmail.com>
Sun, 16 Jun 2013 08:45:14 +0000 (14:15 +0530)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Jun 2013 16:56:32 +0000 (09:56 -0700)
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>
wt-status.c

index bf84a86ee3d6b136bd83115f0bf15a55835817fc..251127021cd68b9cad67683c2b7f5c0b98492fa6 100644 (file)
@@ -1035,7 +1035,6 @@ got_nothing:
 }
 
 struct grab_1st_switch_cbdata {
-       int found;
        struct strbuf buf;
        unsigned char nsha1[20];
 };
@@ -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;
 }