[MPlayer-cvslog] r38678 - trunk/configure

al subversion at mplayerhq.hu
Tue Apr 1 22:49:45 EEST 2025


Author: al
Date: Tue Apr  1 22:49:45 2025
New Revision: 38678

Log:
configure: Make it possible to switch to a different branch in a shallow ffmpeg clone

If ffmpeg is automatically checked out by configure, we end up
with a shallow clone by default. That's good because it saves
time and bandwith.

It has the drawback that a later request to switch to a different
branch will fail.

Shallow fetch the dependent objects for the requested branch to
make it possible to switch to the requested branch even if it
differs from the initially requested branch.

Modified:
   trunk/configure

Modified: trunk/configure
==============================================================================
--- trunk/configure	Tue Feb 18 21:56:33 2025	(r38677)
+++ trunk/configure	Tue Apr  1 22:49:45 2025	(r38678)
@@ -1531,8 +1531,9 @@ FFBRANCH=master
 test -e FFBRANCH && FFBRANCH=$(cat FFBRANCH)
 
 if test -e ffmpeg/mp_auto_pull ; then
+    cfg_fetch="remote.origin.fetch=+refs/heads/$FFBRANCH:refs/remotes/origin/$FFBRANCH"
     echo "Updating FFmpeg, (re)move ffmpeg/mp_auto_pull to disable"
-    (cd ffmpeg && git checkout $FFBRANCH)
+    (cd ffmpeg && git -c "$cfg_fetch" fetch --depth 1 origin && git -c "$cfg_fetch" checkout $FFBRANCH)
     if ! (cd ffmpeg && git pull --rebase --ff-only) ; then
         echo "git pull failed, (re)move ffmpeg/mp_auto_pull to disable pulling"
         exit 1


More information about the MPlayer-cvslog mailing list