Comments (4)
I wanted to make sure I understood the problem. Members of the team are using both git with
and git author
commands to record who is pairing with who.
In this case git author
is correctly setting the commit message.
In general, I recommend only using one git pairing tool at a time. I realize that git author
uses git together
under the covers. It wouldn't surprise me that there's odd behaviors.
from git-author.
I recommend only using one git pairing tool at a time.
This is not a straightforward recommendation.
git-author is a pairing tool that directly depends on having another pairing tool installed and usable. On CF teams, we move between teams' workstation setups all the time and everyone has a different set of commands they expect to work. It's fine if the other tools fail, but in this particular case we can't disable git with
or else git author
will no longer work. We can't easily stop team members or cross-team-pairs from erroneously using git with
, and that corrupts usage of git-author.
from git-author.
First, just want to confirm, the git with
is actually git-together with
?
Second, inside git author
, we actually called git-together with --global
.
In the repro, people set different authors with git with
and git author
. Where git author
correctly set the commit template message and global setting, and git with
correctly set the author and committer information locally for this repo.
However, that's confusing. We actually have 2 pairs working on the same commit. Hence this ends up the author
and committer
no longer consistent with the commit message template of Co-authored-by:
. I think that's the root cause of the issue.
I would recommend people to use consistent pairs, e.g.
git with cb am
git author cb am
from git-author.
Yup yup, I think you've described the issue pretty clearly, @xinzweb, but your recommendation is not ideal-- we work across many repos and we'd need to constantly re-run git with cb am
to keep things consistent.
All we really want is to force global state to be the only state. git-author is already trying to do this, but its git-together
dependency leaks through and still allows repo-local state to be set and read.
We have found a workaround, though, based on the observation that git with --clear
always correctly removes local state- it's ugly, but it seems to be working so far!
alias git="git-together with --clear 2>/dev/null || true ; git-together"
from git-author.
Related Issues (15)
- [CRITICAL] An Outside Collaborator has been removed!
- [CRITICAL] An Outside Collaborator has been removed!
- [CRITICAL] An Outside Collaborator has been removed!
- [CRITICAL] An Outside Collaborator has been removed!
- [CRITICAL] An Outside Collaborator has been removed!
- brew issue HOT 2
- When template disappears, the error message is cryptic on commit
- unable to install automatically without pivotal org ssh keys HOT 2
- how to install `git-author` script to be invoked as `git author ab cd`? HOT 1
- git-author should work in single-repo configuration HOT 1
- git author brew tap doesn't work properly HOT 1
- Would love a Windows version of this.
- clearer name for the template HOT 1
- STORY_NUM is easy to miss after author is set HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git-author.