nvie / git-toolbelt

A suite of useful Git commands that aid with scripting or every day command line usage
BSD 3-Clause "New" or "Revised" License
1.25k stars 111 forks source link

Fall back to 'tac' [sic] when 'rev' is not available (see comments) #39

Closed ernstki closed 4 years ago

ernstki commented 4 years ago

NOTE: tac is not a substitute for rev, and this PR was completely wrongheaded from the start. See this comment.

ernstki commented 4 years ago

I had a serious misunderstanding about tac vs. rev; tac reverses linewise, re-ordering the lines in the file, but rev reverses character-wise, without changing the top-to-bottom order of the lines.

They are not drop-in replacements for one another like I mistakenly assumed they were without carefully reading the man pages.

I'm going to close this for now and reopen (with the other fixes you suggest already implemented) once I'm sure I'm doing the right thing here.