Opened 7 years ago

Closed 3 years ago

#9490 closed enhancement (fixed)

A 20KB+ Patch containing codestyle fixes for any part of the system

Reported by: mmadia Owned by: nobody
Priority: low Milestone: Unscheduled
Component: - General Version: R1/Development
Keywords: Cc: Freeman
Blocked By: Blocking:
Has a Patch: yes Platform: All

Description

This is a patch by Freeman for Google Code-In 2012, task 7949206.

The patch mostly applies cleanly to master (currently hrev45328).

patching file src/system/kernel/arch/arm/arch_int.cpp
Hunk #2 succeeded at 163 with fuzz 1.
Hunk #3 FAILED at 190.
Hunk #4 FAILED at 288.
2 out of 4 hunks FAILED -- saving rejects to file src/system/kernel/arch/arm/arch_int.cpp.rej

It also looks like some trailing whitespace was introduced. Looking at Automatic whitespace cleanup will show how to remove it on the fly.

Would you be willing to recreate this patch using git format-patch. This will give you a better level of recognition for your contribution.

Attachments (2)

gci2012-7980209-patch.diff (25.4 KB ) - added by mmadia 7 years ago.
white-space-removed.diff (25.3 KB ) - added by Freeman 7 years ago.

Download all attachments as: .zip

Change History (10)

by mmadia, 7 years ago

Attachment: gci2012-7980209-patch.diff added

comment:1 by mmadia, 7 years ago

Has a Patch: set

comment:2 by Freeman, 7 years ago

I'll try to get to this asap, just have to finish some projects for school first. Most likely gonna get to it later this week.

by Freeman, 7 years ago

Attachment: white-space-removed.diff added

comment:3 by Freeman, 7 years ago

Hi I dont understand why I would have to do a git format-patch if the remove trailing white-spaces link just says to open it in PE and remove the whitespaces, but the patch I just submitted should have them removed.

comment:4 by mmadia, 7 years ago

Thanks for following up! The git format-patch will allow your name and email address to show up in the commit logs as the author (as opposed to the person who commits it to Haiku's repository). For example, hrev45330 is an example of committing a diff made with git format-patch. Another example is having the real author show up on statistic sites, like http://www.ohloh.net/p/haiku

Also, some parts don't apply cleanly to the current codebase.

/use-the-source/haiku> patch -p1 -i white-space-removed.diff --dry-run
patching file src/servers/index/CatchUpManager.cpp
patching file src/servers/index/IndexServer.cpp
patching file src/system/kernel/arch/arm/arch_debug.cpp
patching file src/system/kernel/arch/arm/arch_elf.cpp
Hunk #1 FAILED at 34.
1 out of 1 hunk FAILED -- saving rejects to file src/system/kernel/arch/arm/arch_elf.cpp.rej
patching file src/system/kernel/arch/arm/arch_int.cpp
Hunk #2 succeeded at 163 with fuzz 1.
Hunk #3 FAILED at 190.
Hunk #4 FAILED at 288.
2 out of 4 hunks FAILED -- saving rejects to file src/system/kernel/arch/arm/arch_int.cpp.rej
patching file src/system/kernel/arch/arm/arch_timer.cpp
patching file src/system/kernel/arch/arm/arch_uart_8250.cpp
patching file src/system/kernel/arch/arm/arch_uart_pl011.cpp
patching file src/system/kernel/arch/arm/arch_vm_translation_map.cpp
patching file src/system/kernel/arch/arm/paging/ARMPagingMethod.h
patching file src/system/kernel/arch/generic/debug_uart_8250.cpp
patching file src/system/kernel/arch/generic/generic_vm_physical_page_mapper.cpp
patching file src/tests/add-ons/index_server/fulltext_search/BeaconSearcher.h
Hunk #1 FAILED at 23.
1 out of 1 hunk FAILED -- saving rejects to file src/tests/add-ons/index_server/fulltext_search/BeaconSearcher.h.rej
patching file src/tests/add-ons/kernel/bus_managers/agp_gart/gart_tester.cpp
patching file src/tests/add-ons/kernel/busses/scsi/example/example_scsi.c
patching file src/tests/add-ons/kernel/drivers/tty/tty-test.cpp

I'm guessing a git pull --rebase is needed before generating the patch?

comment:5 by Freeman, 7 years ago

Since I don't have my original code anymore, what would I do after checking out again?

comment:6 by mmadia, 6 years ago

You could apply the patch with patch -p1 -i white-space-removed.diff . After that view the various *.rej files and manually apply the changes. Finally do the git format-patch steps.

comment:7 by waddlesplash, 5 years ago

Milestone: R1Unscheduled
Priority: normallow

Coding style is not a must-have for R1.

comment:8 by pulkomandy, 3 years ago

Resolution: fixed
Status: newclosed

Applied the still relevant parts in hrev50911.

Note: See TracTickets for help on using tickets.