Re: [PATCH 4/4] fast-export: trivial cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 8, 2013 at 9:16 PM, Felipe Contreras
<felipe.contreras@xxxxxxxxx> wrote:
> Cast the object to a commit, only to get the object back?
>
> Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>
> ---
>  builtin/fast-export.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/builtin/fast-export.c b/builtin/fast-export.c
> index 8091354..d24b4d9 100644
> --- a/builtin/fast-export.c
> +++ b/builtin/fast-export.c
> @@ -550,7 +550,6 @@ static void get_tags_and_duplicates(struct rev_cmdline_info *info,
>
>  static void handle_tags_and_duplicates(struct string_list *extra_refs)
>  {
> -       struct commit *commit;
>         int i;
>
>         for (i = extra_refs->nr - 1; i >= 0; i--) {
> @@ -562,9 +561,7 @@ static void handle_tags_and_duplicates(struct string_list *extra_refs)
>                         break;
>                 case OBJ_COMMIT:
>                         /* create refs pointing to already seen commits */
> -                       commit = (struct commit *)object;
> -                       printf("reset %s\nfrom :%d\n\n", name,
> -                              get_object_mark(&commit->object));
> +                       printf("reset %s\nfrom :%d\n\n", name, get_object_mark(object));

FWIW, this line is now too long (exceeds 80 columns).  Good catch on
the casting though.

-John

PS  Sorry for the duplicate Felipe... I still need to get used to
hitting "Reply All". :-)
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]