Skip to content

Instantly share code, notes, and snippets.

@SuperFluffy
Created April 24, 2017 13:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SuperFluffy/a948769f9cb47e2ae0551e81405aba0f to your computer and use it in GitHub Desktop.
Save SuperFluffy/a948769f9cb47e2ae0551e81405aba0f to your computer and use it in GitHub Desktop.
How to git add -p a hunk?
# Manual hunk edit mode -- see bottom for a quick guide.
@@ -1,13 +4,14 @@
#[macro_use(azip)]
extern crate ndarray;
#[cfg(feature="tuple")]
extern crate tuple;
-mod integrators;
+// mod integrators;
mod steppers;
mod ode;
pub mod observers;
// Re-exports
# ---
# To remove '-' lines, make them ' ' lines (context).
# To remove '+' lines, delete them.
# Lines starting with # will be removed.
#
# If the patch applies cleanly, the edited hunk will immediately be
# marked for staging.
# If it does not apply cleanly, you will be given an opportunity to
# edit again. If all lines of the hunk are removed, then the edit is
# aborted and the hunk is left unchanged.
error: patch failed: src/lib.rs:1
error: src/lib.rs: patch does not apply
Your edited hunk does not apply. Edit again (saying "no" discards!) [y/n]?
Stage this hunk [y,n,q,a,d,/,j,J,g,e,?]? n
@@ -1,13 +4,14 @@
#[macro_use(azip)]
extern crate ndarray;
#[cfg(feature="tuple")]
extern crate tuple;
-mod integrators; <--- keep this
+// mod integrators; <--- keep this
+// mod integrator_derive; <--- remove this
mod steppers;
mod ode;
pub mod observers;
// Re-exports
# Manual hunk edit mode -- see bottom for a quick guide.
@@ -1,13 +4,14 @@
#[macro_use(azip)]
extern crate ndarray;
#[cfg(feature="tuple")]
extern crate tuple;
-mod integrators;
+// mod integrators;
+// mod integrator_derive;
mod steppers;
mod ode;
pub mod observers;
// Re-exports
# ---
# To remove '-' lines, make them ' ' lines (context).
# To remove '+' lines, delete them.
# Lines starting with # will be removed.
#
# If the patch applies cleanly, the edited hunk will immediately be
# marked for staging.
# If it does not apply cleanly, you will be given an opportunity to
# edit again. If all lines of the hunk are removed, then the edit is
# aborted and the hunk is left unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment