From: Dmitry Pavlenko <dmit10@mail.ru>
To: git@vger.kernel.org
Subject: git diff-index and both deleted conflict
Date: Fri, 11 Mar 2011 19:47:55 +0300 [thread overview]
Message-ID: <201103111947.55412.dmit10@mail.ru> (raw)
Hello all,
Could you advise me the fastest way to check in my script
that there's "no local changes in the repository (in the working tree and
index)" so that I could perform "git rebase" there?
git svn dcommit" should check for the same because it performs rebase.
"git svn dcommit" calls "git diff-index HEAD".
According to the documentation "git diff-index HEAD" performs the check I need.
But I've discovered that in the case of "both deleted" conflict "git diff-index
HEAD" outputs nothing but rebase still doesn't want to run.
So, at least either "git diff-index HEAD" or its documentation and "git-svn"
should be fixed, I think.
And I'm still asking for the fastest method that could predict that working
tree and index are clean, no conflict, and I can run "git rebase".
A simple script to generate "both deleted":
#!/bin/sh
git init
touch foo
git add foo
git commit -m 'initial commit'
git checkout -b tmp
git mv foo X
git commit -m 'rename to X'
git checkout -
git mv foo Y
git commit -m 'rename to Y'
git merge tmp
git add Y
git rm X
next reply other threads:[~2011-03-11 17:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-11 16:47 Dmitry Pavlenko [this message]
2011-03-11 17:28 ` git diff-index and both deleted conflict Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201103111947.55412.dmit10@mail.ru \
--to=dmit10@mail.ru \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).