Hacker Newsnew | past | comments | ask | show | jobs | submit | ozay's commentslogin

I recently found LosslessCut (https://github.com/mifi/lossless-cut) that is basically a GUI for ffmpeg, you can make simple edits without re-encoding the stream.


git blame shows only who made the last change. Maybe that person only changed the name of a variable, applied a codestyle change, moved a function declaration to another file or many other things that the change was almost irrelevant to the code behavior.

There are a few options that help you out with this:

-M Detect moved or copied lines within a file

-C In addition to -M, detect lines moved or copied from other files that were modified in the same commit.

--ignore-rev <rev> Ignore changes made by the revision when assigning blame, as if the change never happened

--ignore-revs-file <file> Ignore revisions listed in file

https://git-scm.com/docs/git-blame


I wish they would make long option names for everything, including -C and -M. (Perhaps I should contribute that..)

I use short options interactively on the command line, but in scripts and when communicating with other people, I prefer longer options because they are self-documenting and can catch most typos. (For a long option, typos are more likely to result in an invalid option, and thus an error message. For one-letter options, a typo could result in anything..)


FWIW, -C has precedents: `make` and `tar` have the same option with the same meaning.


Yes, sticking to precedent is a good idea in general, too. But that's independent of long options.


I recommend just skipping blame and going to git log -L to see the full evolution of a range of lines, I set up a little keybind in vim which does this for the current visual selection and it works much better than blame.


And for those using Magit in Emacs, you can do this by selecting a region of lines and hitting `C-c M-g l`.

https://magit.vc/manual/magit/Commands-for-Buffers-Visiting-...


This feature is built into Emacs, no Magit needed. It's the vc-region-history command, bound to `C-x v h` by default. It works across all version control systems Emacs supports, not just git.


There's also git time machine to quickly rollback a buffer in place


Nice. Can you share your vim configuration for that?


My config is kind of cluttered so this is a simplified version without dependencies. Glogr is for range history, GLogf for file history and <leader>gc for showing a commit based on hash:

    nnoremap <leader>gc :Gshow <C-R><C-W><cr>
    command! -nargs=1 Gshow enew | set ft=diff buftype=nofile | 0r!git log -p -n 1 "<args>"
    command! -nargs=0 Glogf tabnew | set ft=diff buftype=nofile | 0r!git -C "#:h" log -p --follow "#:t"
    command! -nargs=0 -range Glogr tabnew | set ft=diff buftype=nofile | 0r!git -C "#:h" log -L "<line1>,<line2>:#:t"


These are the things that can be a chore to find in man pages. There needs to be a way to "sort" man page elements to show most commonly used switches first.


That's him imitating another YouTuber who does this stupid face all the time.


They don't wear helmets because they aren't zooming around like Lance Armstrong. The risk of accidents with head injuries a helmet would help against is limited. Same thing why you don't wear a helmet when you go by car although an occupants risk of head injuries in a typical accident is comparable.


You can't really equate safety gear across different modes of transportation, otherwise if you wear a seat belt when riding in a car then why not wear a seat belt when riding a bicycle?


Amphetamines aren't psychedelics. Like nicotine or caffeine they increase performance.


In large doses over extended periods of time, they do change how someone thinks and perceives the world, perhaps for the worse. See stories of amphetamine psychosis. Those somewhat mirror a type of extended bad experience after using psychedelics, often called dark nights.


Amphetamine psychosis isn't a trip; it's more like being poisoned.


He doesn't say it was written while high. He is wondering if H knew the effects of psychedelics and maybe tried to replicate the feeling in the reader.


He doesn't 'say', no. He implies. Not a whole lot of difference. Unless you're in the Bill Clinton camp of wordsmithing.


I was always fascinated by the BMW ads of the time: https://www.motortrend.com/news/bmw-1980s-ads-jeff-zwart-pho...


Did you mean uBlock?


> How does that happen?!

The guy who knows where it is stored, or who knows what is stored on "that hard drive", leaves the company.


Also look at Liebig's barrel (https://en.wikipedia.org/wiki/Liebig%27s_law_of_the_minimum#.... It was originally applied to plant growth, but it is a helpful metaphor for vitamin substitution.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: