-
Notifications
You must be signed in to change notification settings - Fork 339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request diff -I/--ignore-matching-lines #489
Comments
Did this ever get addressed/do you still need it? (I was selling my
house and moving at the time, some stuff fell through the cracks...)
|
yeah, the kernel builds still need this. (they pinged about it internally recently.) |
Sigh. Part of the reason I was writing my own diff.c is when I need to
add something like -I to this... it has comp() and bcomp() operating on
v_vector which is a hash container (with _bitfields_) that does NOT have
a pointer to the string. There's also cmp() but that seems unrelated
(only ever used once to sort TT.dir[j].list[1]). Also diff_main() and
do_diff() and print_diff() live alongside a function just called diff()
for some reason.
Looking at what ELSE is permuting the input, FLAG(i) is handled in
read_tok()... which is apparently NOT operating on a line (why would you
tokenize anything in this), which is called from create_j_vector() which
MIGHT be related to v_vector or could be something else...
I can presumably figure it out eventually, but writing my own from
scratch was actually the _easy_ path (for me) to getting something
maintainable. (And mine was a streaming design like patch, so didn't
have to read both whole files into memory at once when most of the data
matched and could thus be discarded early...)
By the way, the TT.F plumbing, which seems like the next closest thing
to copy, is the only caller of a 25 line function called
print_line_matching_regex() which is doing an fseek() on an FILE *. To
print the name of the last line before this that matched a regex. So my
usual trick of diff <(thingy) <(thingy) that I do ALL THE TIME would not
work with this implementation.
|
yeah, that was basically what happened with me: it seemed like this should just need a couple of lines adding somewhere ... followed by a failure to work out where exactly that would be :-( (i think at least one other person has had that same "how hard can it be? ... oh" journey too.) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
May I request
diff
to support the following?We need this feature to use toybox to build kernel because of https://github.com/torvalds/linux/blob/2c71fdf02a95b3dd425b42f28fd47fb2b1d22702/tools/objtool/sync-check.sh#L73 .
Thanks in advance!
The text was updated successfully, but these errors were encountered: