Skip to contentSkip to conversation

bash completion: remove deprecated --prune from git-gc

PATCH In review Markus Heidelberg 5 participants 8 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bash completion: remove deprecated --prune from git-gc

---
 contrib/completion/git-completion.bash |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
contrib/completion/git-completion.bash +1 -1
index c79c98f..9e0c48b 100755
@@ -835,7 +835,7 @@ _git_gc ()
 	local cur="${COMP_WORDS[COMP_CWORD]}"
 	case "$cur" in
 	--*)
-		__gitcomp "--prune --aggressive"
+		__gitcomp "--aggressive"
 		return
 		;;
 	esac
Signature · 1 line
1.6.1.rc1.54.gd1643
#1 lore raw

Hi,

contrib/completion/git-completion.bash _git_gc () · line 838

Quoted 2 lines · Markus Heidelberg
contrib/completion/git-completion.bash +1 -1
-		__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

#2 lore raw
Quoted 3 lines · Johannes Schindelin

contrib/completion/git-completion.bash _git_gc () · line 838

Quoted 2 lines
contrib/completion/git-completion.bash +1 -1
-		__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

#3 lore raw
Quoted 6 lines · Jeff King
Quoted 3 lines · Johannes Schindelin

contrib/completion/git-completion.bash _git_gc () · line 838

Quoted 2 lines
contrib/completion/git-completion.bash +1 -1
-		__gitcomp "--prune --aggressive"
+		__gitcomp "--aggressive"

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

Quoted 6 lines

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

#4 lore raw
In reply to Jeff King

Hi,

Quoted 6 lines · Jeff King
Quoted 3 lines · Johannes Schindelin

contrib/completion/git-completion.bash _git_gc () · line 838

Quoted 2 lines
contrib/completion/git-completion.bash +1 -1
-		__gitcomp "--prune --aggressive"
+		__gitcomp "--aggressive"

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

Quoted 6 lines

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

#5 lore raw
Quoted 8 lines · Johannes Schindelin
Quoted 3 lines

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

#6 lore raw
Quoted 10 lines · Jeff King
Quoted 7 lines · Johannes Schindelin
Quoted 3 lines

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.

Quoted 8 lines

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

#7 lore raw
In reply to Johannes Schindelin
Quoted 6 lines · Johannes Schindelin

contrib/completion/git-completion.bash _git_gc () · line 838

Quoted 2 lines · Markus Heidelberg
contrib/completion/git-completion.bash +1 -1
-		__gitcomp "--prune --aggressive"
+		__gitcomp "--aggressive"

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

More like "git gc --prune" is no-op now.

Quoted 2 lines

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.

Signature · 3 lines
Jakub Narebski
Poland
ShadeHawk on #git