git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 9, 2013, 08:53 UTC
Message-ID
<CAMP44s1DPwfiEDuUqUSBN1ShsgLDy9_2E0OD6nnwT7kJeJUCyg@mail.gmail.com>
In-Reply-To
<CAEBDL5VotNSZC_xHc3r49bBFtNwU+drWa_Pj=skC3xzk-CGpKA@mail.gmail.com>
On Thu, May 9, 2013 at 3:52 AM, John Szakmeister <john@szakmeister.net> wrote:
Show 37 quoted lines
> On Wed, May 8, 2013 at 9:16 PM, Felipe Contreras
> <felipe.contreras@gmail.com> wrote:
>> Cast the object to a commit, only to get the object back?
>>
>> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
>> ---
>>  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". :-)
The guideline is:
 - We try to keep to at most 80 characters per line.
The key word being *try*.
-- 
Felipe Contreras
Previous: John SzakmeisterNext: John Szakmeister
Message 37 of 40 in “trivial patches”
  1. 0/4 trivial patchesFelipe Contreras, May 9, 2013
  2. 1/4 documentation: trivial style cleanupsFelipe Contreras, May 9, 2013
  3. Junio C HamanoMay 9, 2013
  4. 2/4 transport-helper: trivial style cleanupFelipe Contreras, May 9, 2013
  5. Junio C HamanoMay 9, 2013
  6. 3/4 {fast-export,transport-helper}: style cleanupsFelipe Contreras, May 9, 2013
  7. John SzakmeisterMay 9, 2013
  8. Felipe ContrerasMay 9, 2013
  9. John SzakmeisterMay 9, 2013
  10. Felipe ContrerasMay 9, 2013
  11. Ramkumar RamachandraMay 9, 2013
  12. Felipe ContrerasMay 9, 2013
  13. Junio C HamanoMay 9, 2013
  14. Felipe ContrerasMay 9, 2013
  15. Junio C HamanoMay 9, 2013
  16. Felipe ContrerasMay 9, 2013
  17. Felipe ContrerasMay 16, 2013
  18. Junio C HamanoMay 16, 2013
  19. Felipe ContrerasMay 16, 2013
  20. Junio C HamanoMay 16, 2013
  21. Felipe ContrerasMay 16, 2013
  22. Junio C HamanoMay 16, 2013
  23. Ramkumar RamachandraMay 16, 2013
  24. Felipe ContrerasMay 16, 2013
  25. Felipe ContrerasMay 16, 2013
  26. Felipe ContrerasMay 17, 2013
  27. Ramkumar RamachandraMay 17, 2013
  28. Felipe ContrerasMay 17, 2013
  29. Junio C HamanoMay 17, 2013
  30. Felipe ContrerasMay 17, 2013
  31. Matthieu MoyMay 17, 2013
  32. Felipe ContrerasMay 17, 2013
  33. Matthieu MoyMay 17, 2013
  34. Felipe ContrerasMay 17, 2013
  35. 4/4 fast-export: trivial cleanupFelipe Contreras, May 9, 2013
  36. John SzakmeisterMay 9, 2013
  37. Felipe ContrerasMay 9, 2013
  38. John SzakmeisterMay 9, 2013
  39. Junio C HamanoMay 9, 2013
  40. Felipe ContrerasMay 16, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.