diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-03-19 11:37:34 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-03-19 11:37:34 +0000 |
commit | b7b97785ebbb2f11d24d14dab8b81ed274f4ce6a (patch) | |
tree | 9fd110f9fc996e8a4213eeda994a8c112491b86d /app-shells/bash/files/bash-5.0-history-append.patch | |
parent | 066d27181e9a797ad9f8fc43b49fc9a10ff2f707 (diff) |
gentoo resync : 19.03.2019
Diffstat (limited to 'app-shells/bash/files/bash-5.0-history-append.patch')
-rw-r--r-- | app-shells/bash/files/bash-5.0-history-append.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/app-shells/bash/files/bash-5.0-history-append.patch b/app-shells/bash/files/bash-5.0-history-append.patch new file mode 100644 index 000000000000..20f78bfe9f03 --- /dev/null +++ b/app-shells/bash/files/bash-5.0-history-append.patch @@ -0,0 +1,34 @@ +*** ../bash-5.0-patched/bashhist.c 2018-07-05 22:41:14.000000000 -0400 +--- bashhist.c 2019-02-23 17:12:02.000000000 -0500 +*************** +*** 437,445 **** + char *filename; + { +! int fd, result; + struct stat buf; + + result = EXECUTION_SUCCESS; +! if (history_lines_this_session > 0 && (history_lines_this_session <= where_history ())) + { + /* If the filename was supplied, then create it if necessary. */ +--- 437,445 ---- + char *filename; + { +! int fd, result, histlen; + struct stat buf; + + result = EXECUTION_SUCCESS; +! if (history_lines_this_session > 0) + { + /* If the filename was supplied, then create it if necessary. */ +*************** +*** 454,457 **** +--- 454,461 ---- + close (fd); + } ++ /* cap the number of lines we write at the length of the history list */ ++ histlen = where_history (); ++ if (histlen > 0 && history_lines_this_session > histlen) ++ history_lines_this_session = histlen; /* reset below anyway */ + result = append_history (history_lines_this_session, filename); + /* Pretend we already read these lines from the file because we just |