tj / tj/git-extras

`git-extras update` disregards aliases

Open
#456 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
18.1k
Forks
1.2k
Avg merge
5d 17h
Merged PRs (30d)
1

Description

If I install git-extras manually, I get prompts for conflicting aliases, and can skip those.

~/local/opp/git/git-extras
[~/local/opp/git/git-extras on ⇄ relocatable-etc]
$ make PREFIX=/tmp/gitex SYSCONFPREFIX=/tmp/gitex install
... installing bins to /tmp/gitex/bin
... installing man pages to /tmp/gitex/share/man/man1
... installing git-archive-file
... installing git-authors
... installing git-back
git-bug conflicts with an alias, still install it and disable the alias? [y/n]n
... installing git-changelog

With git-extras update, it doesn't issue the prompt, and just clobbers all the aliases with commands.

$ git config --get-regexp 'alias.*'
alias.bug git checkout
[~]
$ git-extras update
...
... installing git-back
... installing git-bug
... installing git-changelog
... installing git-chore
... installing git-commits-since

I suspect it's because the curl -s | bash form that git-extras update uses from #381 is incompatible with the prompting the Makefile does: it can't read user response from stdin because the script it's executing is on stdin instead.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with bin/git-extras, especially the update flow linked in the issue, and compare it with the prompting behavior in the Makefile. Reproduce the alias conflict using the shown git config and git-extras update commands; done means update handles the existing alias instead of silently clobbering it.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, shell
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.