Re: [PATCH/RFC 06/10] Unify the lenght of $SHORT* and the commits in the TODO list
- From
- Jörg Sommer <joerg@alea.gnuu.de>
- Date
- Apr 13, 2008, 16:39 UTC
- Message-ID
- <20080413163950.GA3179@alea.gnuu.de>
- In-Reply-To
- <7v63umff7r.fsf@gitster.siamese.dyndns.org>
Hallo,
Junio C Hamano schrieb am Sat 12. Apr, 23:20 (-0700):
Show 12 quoted lines
> Jörg Sommer <joerg@alea.gnuu.de> writes: > > > “This makes it easier to test for equality of a commit in the TODO list > > and one of SHORTUPSTREAM, SHORTHEAD or SHORTONTO.” > > "Equality testing?" --- that makes me worried. short=7 does not chomp > them at 7 but only tells rev-parse to use at least 7. You may get 8 or > more if there are other objects that share the same prefix when you get > them. > > Perhaps by forcing "at least 7" everywhere you are getting consistent > result that makes them easier to compare.
That's what I want.
Show 6 quoted lines
> But considering that this is a candidate for a general mechanism to > eventual grow into the git-sequencer, and that we expect to have richer, > smarter, and/or more complex set of tools that feeds you the TODO list, > I'd feel safer if the internal comparison used to determine which one > commit the user meant in his TODO file is robust and does not rely on > where the abbreviated object name was chomped at.
I use it one time while building the TODO list given to the editor. I've to replace $UPSTREAM with $ONTO everywhere $UPSTREAM occures.
Do you still have a bad feeling? I can replace all tests by
test "$(git rev-parse $a)" = "$(git rev-parse $b)"
Bye, Jörg.
-- Was man mühelos erreichen kann, ist gewöhnlich nicht der Mühe wert, erreicht zu werden.