On Thu, 12 Aug 2021, Martin Frb via fpc-pascal wrote:

On 12/08/2021 15:04, Michael Van Canneyt via fpc-pascal wrote:

If you do an update of an existing directory, instead of

git clone http://theurl/ thesourcedirectory

you must do

cd thesourcedirectory
git pull
cd ..

This will reduce the download size considerably.

If he stays on the same branch (assuming he is on a branch). Or if his "--depth" was deep enough to have common history with the new target branch.

An svn server (afaik) calculates the diff between any 2 revisions, even on diff branches... But (afaik, really not sure) git will look for the nearest common history, and download all changes from that point.

This makes sense for git, because "--depth" is the exception, and not what the design is made for. So git would assume you want the commits in the middle, and it would assume you have common history.
(But again, not tested at all).

And if you "cloned" only a "tag" (depth 1), not a branch => then you may not have an upstream branch. So you can't "git pull".

If you look at the top of the mail, you'll see I assumed he did a full
clone initially.

Less fuss.

Michael.

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to