Skip to content

How to disable --allow-empty with go-git? #390

Closed as not planned
Closed as not planned

Description

@byte-bucket

As per this issue #189 , no options is provided.

But what's the workaround? Like comparing commit hash? Or any quickie way?

Activity

  1. dtelaroli commented on Feb 3, 2022

    @dtelaroli

    I solved this issue using git status.

    worktree, err = repo.Worktree()
    if err != nil {
    	return err
    }
    
    status, err := worktree.Status()
    if err != nil {
    	return err
    }
    
    if status.IsClean() {
    	log.Info("Nothing to commit")
    	return nil
    }
  2. github-actions commented on Apr 11, 2024

    @github-actions

    To help us keep things tidy and focus on the active tasks, we've introduced a stale bot to spot issues/PRs that haven't had any activity in a while.

    This particular issue hasn't had any updates or activity in the past 90 days, so it's been labeled as 'stale'. If it remains inactive for the next 30 days, it'll be automatically closed.

    We understand everyone's busy, but if this issue is still important to you, please feel free to add a comment or make an update to keep it active.

    Thanks for your understanding and cooperation!

  3. added
    stale
    on Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions