threads / discuss / 46824

'--shallow-since' option is not available for git-pull in Git version 2.14.1

Subject: '--shallow-since' option is not available for git-pull in Git version 2.14.1

## tl;dr

2 messages between Sep 25, 2017 and Sep 26, 2017.

replies: 1people: 2as markdown or json

Sanggyu Nam· Sep 25, 2017, 07:31 UTC · lore
I’ve found that some subcommands such as git-clone, git-fetch, and git-pull support an option named ‘--shallow-since’, as of Git version 2.11. This option is documented in the man page of each subcommand. In Git 2.14.1, I’ve checked that the option is available for git-clone and git-fetch so that the history of a shallow repository is updated. However, running git-pull with this option shows an error as follows:
error: unknown option `shallow-since=2017-09-10T00:00:00+00:00'

usage: git pull [<options>] [<repository> [<refspec>...]] ...

I found that this option is not available in Git 2.14.1 on macOS and Ubuntu 16.04.1. It seems the option handling of git-pull does not match with what’s described in the man page. Since ‘git pull’ is a shorthand for ‘git fetch’ followed by ‘git merge FETCH_HEAD’ in its default mode, we can run these two commands in this order as a workaround.
Kevin Daudt· Sep 26, 2017, 05:15 UTC · re: Sanggyu Nam · lore

Re: '--shallow-since' option is not available for git-pull in Git version 2.14.1

On Mon, Sep 25, 2017 at 04:31:10PM +0900, Sanggyu Nam wrote:
Show 20 quoted lines
> I’ve found that some subcommands such as git-clone, git-fetch, and
> git-pull support an option named ‘--shallow-since’, as of Git version
> 2.11. This option is documented in the man page of each subcommand. In
> Git 2.14.1, I’ve checked that the option is available for git-clone
> and git-fetch so that the history of a shallow repository is updated.
> However, running git-pull with this option shows an error as follows:
> 
> error: unknown option `shallow-since=2017-09-10T00:00:00+00:00'
> 
> usage: git pull [<options>] [<repository> [<refspec>...]]
> ...
> 
> I found that this option is not available in Git 2.14.1 on macOS and
> Ubuntu 16.04.1. It seems the option handling of git-pull does not
> match with what’s described in the man page. Since ‘git pull’ is a
> shorthand for ‘git fetch’ followed by ‘git merge FETCH_HEAD’ in its
> default mode, we can run these two commands in this order as a
> workaround.
> 
> 

This does not only count for --shallow-since, but also --deepen and --shallow-exclude.

← back to recent threads