GithubHelp home page GithubHelp logo

Comments (4)

professor avatar professor commented on July 24, 2024

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.

cwlbraa avatar cwlbraa commented on July 24, 2024

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.

xinzweb avatar xinzweb commented on July 24, 2024

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.

cwlbraa avatar cwlbraa commented on July 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.