Date of clone is not available in log file (solution included) #177
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Log file output only contains time. If logfile is appendes then there is no way of knowing then previous clones were made. If logfile is over-written then creation of the file tells when clone was made.
However, by appending date to start_time and stop_time, that only are used in the logfile output, the date can be logged too. The duration is still calculated correctly as it uses other variables. The solution is it add %F to date command.
Before:
start_time=
date '+%H:%M:%S'
(in 2 places)stop_time=
date '+%H:%M:%S'
After:
start_time=
date '+%F %H:%M:%S'
(in 2 places)stop_time=
date '+%F %H:%M:%S'
Result in logfile:
" Start - 2024-02-19 11:00:37 End - 2024-02-19 11:03:38 Elapsed Time - 3:01"