Giter Club home page Giter Club logo

Comments (2)

mschenk42 avatar mschenk42 commented on May 31, 2024 1

We might be able to do this with a shell function! We could add the statsh command to the function below. What would we do when git statsh is called? Should we add a gtm stash command?

function git {
  command git "$@"
  rc=$?
  if [ $rc -ne 0 ]; then
    return $rc
  fi
  case "$1" in
    'init'|'clone')
      output=$(gtm init)
      if [ $? -eq 0 ]; then
        echo "$output"
      fi
      ;;
    'status')
      output=$(gtm status)
      if [ $? -eq 0 ]; then
        echo "$output"
      fi
      ;;
    'push')
      output=$(gtm status)
      if [ $? -ne 0 ]; then
          break
      fi
      echo "git pushgtm..."
      output=$(git pushgtm)
      if [ $? -eq 0 ]; then
        echo "$output"
      fi
      ;;
    'fetch'|'pull')
      output=$(gtm status)
      if [ $? -ne 0 ]; then
          break
      fi
      echo "git fetchgtm..."
      output=$(git fetchgtm)
      if [ $? -eq 0 ]; then
        echo "$output"
      fi
      ;;
  esac
  return $rc
}

from gtm.

devkabiir avatar devkabiir commented on May 31, 2024

I think a command for gtm stash would be more appropriate, which then can be linked as a git sub-command #64. Currently there are no git hooks for stash related operations, it would have been straightforward to integrate gtm stash with each repository. As of now every user would need to manually run gtm stash with everygit stash.

Git also supports naming stashes so I think gtm would also need to do the same to make sure correct time is being unstashed. This does not look like an easy feature to implement?.

Is it possible that git would also stash the *.event automatically?. That would probably require those files to be tracked by git. But if somehow git can be tricked into thinking that *.event are being tracked then it would stash them and also unstash properly when the user wants to. This would remove the need to implements a gtm stash command.

from gtm.

Related Issues (20)

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.