View Issue Details

IDProjectCategoryView StatusLast Update
0002076OpenFOAMPatchpublic2016-04-30 21:58
ReporterwyldckatAssigned Tohenry 
PrioritylowSeveritytrivialReproducibilityN/A
Status resolvedResolutionfixed 
Product Versiondev 
Fixed in Versiondev 
Summary0002076: Should we use ".org" or ".orig" as the conventional suffix for original tutorial case files?
DescriptionIn a commit this week on OpenFOAM-dev, namely d82049c0b2d2855f98ed367d2275c6a17ba7ab50, a few ".orig" files showed up in the "tutorials" folder and those suffixes were removed from the ".gitignore" to avoid this from occurring again in the future.

AFAIK, these ".orig" files were ignored because they are commonly the result of using the "patch" utility, which can create ".orig" and/or ".rej" when a patch file is applied and something goes well (or not) when applying it.

Therefore, this does raise the question: Should we make it uniformly ".org" or ".orig"?

Given that both have pros and cons:
 - .org is the file extension for emacs org-mode as well
 - .org is shorter than .orig
 - .orig is more to the point (.org isn't always recognized as "original")
 - .original is too long, although more consistent with the convention of source code file naming


... I've tested both solutions and here are the commands for bash (tested on Ubuntu 15.10) to rename the few ".orig" occurrences to ".org":

  tut
  find . -name *.orig | while read line; do lineB=${line%\.orig}; git mv $line $lineB.org; done
  find . -name "All*" -type f | while read line; do grep "\.orig" $line && sed -i -e 's=\.orig=\.org=g' $line; done


Or if it's preferable to simply switch to ".orig":

  tut
  find . -name *.org -type d | while read line; do lineB=${line%\.org}; git mv $line $lineB.orig; done
  find . -name *.org -type f | while read line; do lineB=${line%\.org}; git mv $line $lineB.orig; done
  find . -name "All*" -type f | while read line; do grep "\.org\( \|$\)" $line && sed -i -e 's=\.org\( \|$\)=\.orig\1=g' $line; done
TagsNo tags attached.

Activities

henry

2016-04-30 19:28

manager   ~0006208

My preference is .orig for exactly the reasons you gave. I will make the switch to .orig shortly; thanks fer the script lines to do it.

henry

2016-04-30 21:58

manager   ~0006213

Resolved by commit 8cdd5903334af83b4f33c3efcea9572b411f9294

Issue History

Date Modified Username Field Change
2016-04-30 18:58 wyldckat New Issue
2016-04-30 18:58 wyldckat Status new => assigned
2016-04-30 18:58 wyldckat Assigned To => henry
2016-04-30 19:28 henry Note Added: 0006208
2016-04-30 21:58 henry Note Added: 0006213
2016-04-30 21:58 henry Status assigned => resolved
2016-04-30 21:58 henry Fixed in Version => dev
2016-04-30 21:58 henry Resolution open => fixed