# [PATCH] bash completion: remove deprecated --prune from git-gc

8 messages from 2008-12-13 to 2008-12-15. Participants: Markus Heidelberg, Johannes Schindelin, Jeff King, Jakub Narebski, Brandon Casey.
Thread: https://gitlist.dev/t/16715

## Markus Heidelberg, 2008-12-13 19:08

Subject: [PATCH] bash completion: remove deprecated --prune from git-gc
Message-ID: <200812132008.08543.markus.heidelberg@web.de>
URL: https://gitlist.dev/e/200812132008.08543.markus.heidelberg%40web.de

```

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
---
 contrib/completion/git-completion.bash |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index c79c98f..9e0c48b 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -835,7 +835,7 @@ _git_gc ()
 	local cur="${COMP_WORDS[COMP_CWORD]}"
 	case "$cur" in
 	--*)
-		__gitcomp "--prune --aggressive"
+		__gitcomp "--aggressive"
 		return
 		;;
 	esac
-- 
1.6.1.rc1.54.gd1643

```

## Johannes Schindelin, 2008-12-14 10:38

Subject: Re: [PATCH] bash completion: remove deprecated --prune from git-gc
Message-ID: <alpine.DEB.1.00.0812141137350.2014@eeepc-johanness>
URL: https://gitlist.dev/e/alpine.DEB.1.00.0812141137350.2014%40eeepc-johanness
In-Reply-To: <200812132008.08543.markus.heidelberg@web.de>

```
Hi,

On Sat, 13 Dec 2008, Markus Heidelberg wrote:

> -		__gitcomp "--prune --aggressive"
> +		__gitcomp "--aggressive"

git gc --prune is deprecated?  That's news to me.

How would you suggest, then, to remove the loose objects you always get 
with conflicts in a merge?

Ciao,
Dscho

```

## Jeff King, 2008-12-14 11:12

Subject: Re: [PATCH] bash completion: remove deprecated --prune from git-gc
Message-ID: <20081214111213.GA6499@coredump.intra.peff.net>
URL: https://gitlist.dev/e/20081214111213.GA6499%40coredump.intra.peff.net
In-Reply-To: <alpine.DEB.1.00.0812141137350.2014@eeepc-johanness>

```
On Sun, Dec 14, 2008 at 11:38:17AM +0100, Johannes Schindelin wrote:

> > -		__gitcomp "--prune --aggressive"
> > +		__gitcomp "--aggressive"
> git gc --prune is deprecated?  That's news to me.

Check out 9e7d501 (builtin-gc.c: deprecate --prune, it now really has no
effect, 2008-05-09).

Which annoyingly has no discussion about _why_ it no longer has an
effect. But I suspect it has something to do with 25ee973 (gc: call
"prune --expire 2.weeks.ago" by default, 2008-03-12) by you.

-Peff

```

## Johannes Schindelin, 2008-12-14 11:17

Subject: Re: [PATCH] bash completion: remove deprecated --prune from git-gc
Message-ID: <alpine.DEB.1.00.0812141216120.2014@eeepc-johanness>
URL: https://gitlist.dev/e/alpine.DEB.1.00.0812141216120.2014%40eeepc-johanness
In-Reply-To: <20081214111213.GA6499@coredump.intra.peff.net>

```
Hi,

On Sun, 14 Dec 2008, Jeff King wrote:

> On Sun, Dec 14, 2008 at 11:38:17AM +0100, Johannes Schindelin wrote:
> 
> > > -		__gitcomp "--prune --aggressive"
> > > +		__gitcomp "--aggressive"
> > git gc --prune is deprecated?  That's news to me.
> 
> Check out 9e7d501 (builtin-gc.c: deprecate --prune, it now really has no
> effect, 2008-05-09).
> 
> Which annoyingly has no discussion about _why_ it no longer has an
> effect. But I suspect it has something to do with 25ee973 (gc: call
> "prune --expire 2.weeks.ago" by default, 2008-03-12) by you.

Oops.

But I thought that git gc --prune does expire _all_ dangling loose 
objects _now_, not with --expire 2.weeks.ago.

Ciao,
Dscho

```

## Jeff King, 2008-12-14 11:19

Subject: Re: [PATCH] bash completion: remove deprecated --prune from git-gc
Message-ID: <20081214111939.GC6499@coredump.intra.peff.net>
URL: https://gitlist.dev/e/20081214111939.GC6499%40coredump.intra.peff.net
In-Reply-To: <alpine.DEB.1.00.0812141216120.2014@eeepc-johanness>

```
On Sun, Dec 14, 2008 at 12:17:07PM +0100, Johannes Schindelin wrote:

> > Which annoyingly has no discussion about _why_ it no longer has an
> > effect. But I suspect it has something to do with 25ee973 (gc: call
> > "prune --expire 2.weeks.ago" by default, 2008-03-12) by you.
> 
> Oops.
> 
> But I thought that git gc --prune does expire _all_ dangling loose 
> objects _now_, not with --expire 2.weeks.ago.

Nope, see 25ee973. You explicitly wrote:

      Note that this new behaviour makes "--prune" be a no-op.

That being said, I think that is perhaps a reasonable thing for --prune
to do (and I don't think there is any conflict with the name, because
that is what it _used_ to do before becoming a no-op). But nobody has
actually implemented it.

-Peff

```

## Jakub Narebski, 2008-12-14 11:23

Subject: Re: [PATCH] bash completion: remove deprecated --prune from git-gc
Message-ID: <m3hc57dmrl.fsf@localhost.localdomain>
URL: https://gitlist.dev/e/m3hc57dmrl.fsf%40localhost.localdomain
In-Reply-To: <alpine.DEB.1.00.0812141137350.2014@eeepc-johanness>

```
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> On Sat, 13 Dec 2008, Markus Heidelberg wrote:
> 
> > -		__gitcomp "--prune --aggressive"
> > +		__gitcomp "--aggressive"
> 
> git gc --prune is deprecated?  That's news to me.

More like "git gc --prune" is no-op now.
 
> How would you suggest, then, to remove the loose objects you always get 
> with conflicts in a merge?

"git gc" does pruning of loose objects, but protected by grace period
for loose objects with gc.pruneexpire

You always have (admittedly lowe level) git-prune.
-- 
Jakub Narebski
Poland
ShadeHawk on #git

```

## Brandon Casey, 2008-12-15 16:51

Subject: Re: [PATCH] bash completion: remove deprecated --prune from git-gc
Message-ID: <0zFE1s-V9qRpO8jkUYC05iTwrouhwDxFz3yJgo_P3R0KZaGeJ6jKSg@cipher.nrlssc.navy.mil>
URL: https://gitlist.dev/e/0zFE1s-V9qRpO8jkUYC05iTwrouhwDxFz3yJgo_P3R0KZaGeJ6jKSg%40cipher.nrlssc.navy.mil
In-Reply-To: <20081214111213.GA6499@coredump.intra.peff.net>

```
Jeff King wrote:
> On Sun, Dec 14, 2008 at 11:38:17AM +0100, Johannes Schindelin wrote:
> 
>>> -		__gitcomp "--prune --aggressive"
>>> +		__gitcomp "--aggressive"
>> git gc --prune is deprecated?  That's news to me.
> 
> Check out 9e7d501 (builtin-gc.c: deprecate --prune, it now really has no
> effect, 2008-05-09).
> 
> Which annoyingly has no discussion about _why_ it no longer has an
> effect. But I suspect it has something to do with 25ee973 (gc: call
> "prune --expire 2.weeks.ago" by default, 2008-03-12) by you.

I think the nail in the coffin for --prune was a37cce3b, which preceded
9e7d501. I guess the commit message for 9e7d501 made sense with a37cce3b
as a reference. There was another commit around the same time which
claimed that --prune was deprecated even though it still provided some
functionality, hence the "...really has no effect" part.

I definitely remember that Johannes implemented the gc.pruneExpire
functionality, so his "That's news to me" made me laugh. Thanks for
the chuckle Johannes. :)

-brandon

```

## Brandon Casey, 2008-12-15 18:06

Subject: Re: [PATCH] bash completion: remove deprecated --prune from git-gc
Message-ID: <FVglwe6MZJA2-0F8smd8RgHUYqc_tvsZE8KdwKzxQK3gqGN8-pvvhQ@cipher.nrlssc.navy.mil>
URL: https://gitlist.dev/e/FVglwe6MZJA2-0F8smd8RgHUYqc_tvsZE8KdwKzxQK3gqGN8-pvvhQ%40cipher.nrlssc.navy.mil
In-Reply-To: <20081214111939.GC6499@coredump.intra.peff.net>

```
Jeff King wrote:
> On Sun, Dec 14, 2008 at 12:17:07PM +0100, Johannes Schindelin wrote:
> 
>>> Which annoyingly has no discussion about _why_ it no longer has an
>>> effect. But I suspect it has something to do with 25ee973 (gc: call
>>> "prune --expire 2.weeks.ago" by default, 2008-03-12) by you.
>> Oops.
>>
>> But I thought that git gc --prune does expire _all_ dangling loose 
>> objects _now_, not with --expire 2.weeks.ago.
> 
> Nope, see 25ee973. You explicitly wrote:
> 
>       Note that this new behaviour makes "--prune" be a no-op.
> 
> That being said, I think that is perhaps a reasonable thing for --prune
> to do (and I don't think there is any conflict with the name, because
> that is what it _used_ to do before becoming a no-op). But nobody has
> actually implemented it.

Maybe --mrproper would be a more appropriate name.

-brandon

```
