From: Eugene Sajine <euguess@gmail.com>
To: Avery Pennarun <apenwarr@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: how to fix the problem correctly?
Date: Wed, 28 Apr 2010 14:55:01 -0400 [thread overview]
Message-ID: <t2h76c5b8581004281155ta77ad992xc36b5d87824ec9cf@mail.gmail.com> (raw)
In-Reply-To: <s2v32541b131004281130m1c79ff4dp8c02afc8b70bbde5@mail.gmail.com>
>
> Virtually any way that works is "correct." It depends a bit on your goals.
>
> Step 1 is certainly the easiest place to start. If you're then
> concerned about making sure your history never showed the mistake
> (which is a lofty goal, though rarely very important), you could use
> git rebase to 'squash' this new commit into C. But rewriting history
> in git has well-documented dangers, so you should be careful and read
> the docs first.
Good idea to clean up with rebase after step 1. I didn't think about
that, thanks! And yes I know about the restrictions;)
>
>> PS interesting enough – CVS keywords helped us to notice the problem
>> as master state was imported from CVS.
>> In commit A file 1.txt had version ID 1.5 in commit B it was 1.6 ,
>> commit C was changing the line back to 1.5
>> Is there a way for git to help me to recognize this kind of issue if
>> there are no keywords?
>
> Sadly, git doesn't have any magic features for detecting when someone
> checks in something stupid :) But 'git bisect' can be very helpful
> in isolating which commit caused a particular problem. Once you know
> you have a problem, it's pretty easy to narrow it down that way.
yes, it is very hard to be fool-proof. I just got an idea:
In this particular case some script scanning for pairs of commits
where blob SHA-1 changes
are like below (for the same path) and warns about such occurrences.
commit 1111
... blobaaaaaa... blobbbbbbb... path
commit 3333
... blobbbbbbb... blobaaaaaaa... path
Unless the commit 3333 is a real revert, this might be suspicious, isn't it?
I don't know if it has any real sense or use, but i will try to create
such thing at least as an exercise...
Thanks,
Eugene
prev parent reply other threads:[~2010-04-28 18:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-28 16:54 how to fix the problem correctly? Eugene Sajine
2010-04-28 18:30 ` Avery Pennarun
2010-04-28 18:55 ` Eugene Sajine [this message]
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=t2h76c5b8581004281155ta77ad992xc36b5d87824ec9cf@mail.gmail.com \
--to=euguess@gmail.com \
--cc=apenwarr@gmail.com \
--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).