gnuastro-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master aefc766: Short tip on writing commit hashes in


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master aefc766: Short tip on writing commit hashes in FITS header
Date: Wed, 5 Oct 2016 18:43:34 +0000 (UTC)

branch: master
commit aefc766caabbdc0d79290cd2b384d666f64d0c93
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>

    Short tip on writing commit hashes in FITS header
    
    Commit hashes can sometimes be confused as a number by Header, so with this
    commit, a tip was added with some solutions.
---
 doc/gnuastro.texi |   31 +++++++++++++++++++++----------
 1 file changed, 21 insertions(+), 10 deletions(-)

diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index ccc01bf..6ba6ea8 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -5470,16 +5470,27 @@ example:
 @end example
 
 @noindent
-The value can be any numerical or string value. Other than the
address@hidden, all the other values are optional. To leave a given
-token empty, follow the preceding comma (@key{,}) immediately with the
-next. If any space character is present around the commas, it will be
-considered part of the respective token. So if more than one token has
-space characters within it, the safest method to specify a value to
-this option is to put double quotation marks around each individual
-token that needs it. Note that without double quotation marks, space
-characters will be seen as option separators and can lead to undefined
-behavior.
+The value can be any numerical or string address@hidden tricky
+situations arise with values like address@hidden', if this was intended
+to be a number it will be kept in the header as @code{8709500000} and there
+is no problem. But this can also be a shortened Git commit hash. In the
+latter case, it should be treated as a string and stored as it is
+written. Commit hashes are very important in keeping the history of a file
+during your research and such values might arise without you noticing them
+in your reproduction pipeline. One solution is to use @command{git
+describe} instead of the short hash alone. A less recommended solution is
+to add a space after the commit hash and Header will write the value as
address@hidden }' in the header. If you later compare the strings on the
+shell, the space character will be ignored by the shell in the latter
+solution and there will be no problem.}. Other than the @code{KEYWORD}, all
+the other values are optional. To leave a given token empty, follow the
+preceding comma (@key{,}) immediately with the next. If any space character
+is present around the commas, it will be considered part of the respective
+token. So if more than one token has space characters within it, the safest
+method to specify a value to this option is to put double quotation marks
+around each individual token that needs it. Note that without double
+quotation marks, space characters will be seen as option separators and can
+lead to undefined behavior.
 
 @item -w
 @itemx --write



reply via email to

[Prev in Thread] Current Thread [Next in Thread]