This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 433255 - Include bash completion for git (patch attached)
Include bash completion for git (patch attached)
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: git (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Chris Wright
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-18 01:40 EST by Todd Zullinger
Modified: 2013-01-10 05:22 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-03-26 08:59:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch to add a git-completion subpackage and fix some rpmlint warnings. (7.85 KB, patch)
2008-02-18 01:40 EST, Todd Zullinger
no flags Details | Diff
updated patch to add a git-completion subpackage and fix some rpmlint warnings. (7.99 KB, patch)
2008-02-23 18:31 EST, Todd Zullinger
no flags Details | Diff
updated patch to add a git-completion subpackage and fix some rpmlint warnings. (2.32 KB, patch)
2008-02-24 13:05 EST, Todd Zullinger
no flags Details | Diff
updated patch to add a git-completion subpackage and fix some rpmlint warnings. (7.56 KB, patch)
2008-03-17 16:36 EDT, Todd Zullinger
no flags Details | Diff

  None (edit)
Description Todd Zullinger 2008-02-18 01:40:53 EST
There is a bash completion script included in the git tarball.  I think it would
be very handy to install this, or at the least include it in %doc so users could
add it.  Considering that the git-foo commands are deprecated and users are
encouraged to use git foo, having bash completion for all of git's commands
would be a big help.

I'll attach a patch against the current spec file that adds a git-completion
subpackage.  If you'd rather not create another subpackage, I'd be happy to roll
this in where ever you'd like (and I won't even start a long thread on
fedora-devel to rant about it ;).

Also included in this patch are a bunch of small fixes for things rpmlint
bitches about.  That makes the patch look more invasive than it really is.  If
you skip the whitespace, there are only 30 insertions and 4 deletions.

I included a changelog with the patch just to document what I did.  I don't mind
taking the blame if I broke it, but I don't particularly care about the credit.
Comment 1 Todd Zullinger 2008-02-18 01:40:53 EST
Created attachment 295137 [details]
patch to add a git-completion subpackage and fix some rpmlint warnings.
Comment 2 Todd Zullinger 2008-02-23 18:31:52 EST
Created attachment 295722 [details]
updated patch to add a git-completion subpackage and fix some rpmlint warnings.

Here's an updated patch against git-1.5.4.3-1, with the git-core -> git rename.
Comment 3 Todd Zullinger 2008-02-24 13:05:02 EST
Created attachment 295744 [details]
updated patch to add a git-completion subpackage and fix some rpmlint warnings.

Updated patch again to remove the %config(noreplace) setting for gitweb config
file.  That change was just made in bug #434693.
Comment 4 Todd Zullinger 2008-03-17 16:36:37 EDT
Created attachment 298305 [details]
updated patch to add a git-completion subpackage and fix some rpmlint warnings.

Updated to apply cleanly against git-1.5.4.4-1.

Is there any interest in including the bash completion script?

The git dash commands have been deprecated since ~2006 and are scheduled to be
moved out of $PATH in git-1.6.0.  Having bash completion that helps/encourages
users to learn git in the proper git <command> form seems like a good thing.
Comment 5 James Bowes 2008-03-26 08:59:54 EDT
Hi Todd:

For git-1.5.4.4-3 I've got the completion script installing in the core git
package, rather than in its own completion subpackage (which seems to be the way
packages go in fedora). Thanks for the patches though ;)
Comment 6 Todd Zullinger 2008-03-26 14:00:22 EDT
James,

Thanks for adding this. :)

A minor nit, but shouldn't you either Require: bash-completion or own
%{_sysconfdir}/bash_completion.d ?  I've seen packages do both.  There are
multiple packages in fedora that own %{_sysconfdir}/bash_completion.d.  I've
wanted to ask the FPC folks if there's a preference on this.  I think having the
dep on bash-completion is excessive, so I'd go for something like this:

-%{_sysconfdir}/bash_completion.d/git
+%dir %{_sysconfdir}/bash_completion.d
+%config(noreplace) %{_sysconfdir}/bash_completion.d/git
Comment 7 James Bowes 2008-03-26 20:05:54 EDT
(In reply to comment #6)
> James,
> 
> Thanks for adding this. :)
> 
> A minor nit, but shouldn't you either Require: bash-completion or own
> %{_sysconfdir}/bash_completion.d ?  I've seen packages do both.  There are
> multiple packages in fedora that own %{_sysconfdir}/bash_completion.d.  I've
> wanted to ask the FPC folks if there's a preference on this.  I think having the
> dep on bash-completion is excessive, so I'd go for something like this:
> 
> -%{_sysconfdir}/bash_completion.d/git
> +%dir %{_sysconfdir}/bash_completion.d
> +%config(noreplace) %{_sysconfdir}/bash_completion.d/git

Sounds good to me; I'll get git owning the dir and rebuild

Note You need to log in before you can comment on or make changes to this bug.