Dear Gnulib maintainers, The GNU Octave project successfully uses your great library for many years. We would like to contribute a local change the Octave project has tested for the past half year on your bootstrap script [1,2,3] (also attached as file to this email):
------------------------------------------------------------ diff --git a/build-aux/bootstrap b/build-aux/bootstrap index 8f76d6962..3a87e7f7e 100755 --- a/build-aux/bootstrap +++ b/build-aux/bootstrap @@ -670,6 +670,11 @@ if $use_gnulib; then || cleanup_gnulib trap - 1 2 13 15 + + elif test -n "$GNULIB_REVISION" \ + && ! git --git-dir="$gnulib_path"/.git cat-file \ + commit "$GNULIB_REVISION"; then + git --git-dir="$gnulib_path"/.git fetch fi GNULIB_SRCDIR=$gnulib_path ;; ------------------------------------------------------------ The idea is as follows (with dates as fake revision IDs): - We have an "old" gnulib clone (ID 2020-08-01) and want to build a newer revision (ID 2020-08-15) - If we run in the "old" gnulib clone GNULIB_REVISION=2020-08-15 ./bootstrap we get the message fatal: reference is not a tree: 2020-08-15 even though revision 2020-08-15 exists. It is just not available in the "old" local clone. To resolve it, we either have to update (fetch/pull) the gnulib clone manually, or we developed the aforementioned patch to fetch recent changes, if the desired revision is not fetched in the local clone. Thank you for your time and help, Kai [1] https://savannah.gnu.org/bugs/?57044 [2] https://octave.discourse.group/t/update-gnulib-ahead-of-octave-6-release-candidate/76 [3] https://hg.savannah.gnu.org/hgweb/octave/rev/717e3780805c (still using "pull", later changed to "fetch")
diff --git a/build-aux/bootstrap b/build-aux/bootstrap index 8f76d6962..3a87e7f7e 100755 --- a/build-aux/bootstrap +++ b/build-aux/bootstrap @@ -670,6 +670,11 @@ if $use_gnulib; then || cleanup_gnulib trap - 1 2 13 15 + + elif test -n "$GNULIB_REVISION" \ + && ! git --git-dir="$gnulib_path"/.git cat-file \ + commit "$GNULIB_REVISION"; then + git --git-dir="$gnulib_path"/.git fetch fi GNULIB_SRCDIR=$gnulib_path ;;