Re: multi-project repos

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Junio C Hamano
Date: Friday, November 17, 2006 - 1:24 pm

Marko Macek <marko.macek@gmx.net> writes:


When I make a tag that says "this is the v1.2.0 release", it is
expected it won't change in the future, ever.  I _can_ make
mistake and tag a wrong commit under v1.2.0 name, in which case
I may have to replace it with another corrected tag, but
recoding that mistake does not really add value.  So most of the
time ref-log for a tag would contain only one entry per file, its
creation, but that creation time is already recorded in the tag
object itself anyway.

At times, it may be useful to have some floating tag that point
at the "latest", or "today's", but that use is a minority.  For
these minority cases, you can manually create an empty file
under .git/logs/ directory to record their updates.

The configuration mechanism only kicks in when there is no such
existing file to prime the process, and not creating ref-log for
tags by default is the sensible thing to do.


They deliberately ignore ref-log for the same reason lost-found
does not drop found refs under .git/refs hierarchy.

This only matters if you somehow rewind an existing branch in
order to lose part of its history, using "reset --hard HEAD~n"
or "rebase".  If the updates to your branch tips always build on
top of the previous (either by commiting on top of the current,
merging on top of the current, or fast-forwarding), and if you
never rewind the branch, the commits recorded in the ref-log for
the branch are always ancestors of the tip of the branch, so
checking ref-log does not give you anything other than slowing
the operation down.

However, if you rewind the tip of a branch, the story changes.
Until the next "prune", objects reachable from the ref-log of
the branch but not reachable from the tip of the branch are
still available in your object store and in a pinch you can
recover them, but after a "prune" they will be lost forever if
they do not have any other references.  So it might seem that
they should be protected from pruning.

But if you did so, you can never remove cruft from your object
store once you make a mistake.  You can clean up your history by
a reset and/or a rebase, and cleaning up to _lose_ part of the
history was the reason you rewound the branch in the first
place.

In other words, running 'prune' is a conscious act of saying "I
know I am not in the middle of something; I thought over what
I've done recently, salvaged necessary bits from what I
discarded earlier, and there is nothing that need to be salvaged
later anymore -- I have refs to what I need.  Now go clean up
the cruft from my object store".




-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Cleaning up git user-interface warts, Jakub Narebski, (Tue Nov 14, 2:30 pm)
Re: Cleaning up git user-interface warts, Nicolas Pitre, (Tue Nov 14, 2:34 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Tue Nov 14, 3:56 pm)
Re: Cleaning up git user-interface warts, Nicolas Pitre, (Tue Nov 14, 6:48 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Tue Nov 14, 7:10 pm)
Re: Cleaning up git user-interface warts, Michael K. Edwards, (Tue Nov 14, 7:27 pm)
Re: Cleaning up git user-interface warts, Nicolas Pitre, (Tue Nov 14, 9:20 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Tue Nov 14, 9:58 pm)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Wed Nov 15, 11:03 am)
Re: Cleaning up git user-interface warts, Nicolas Pitre, (Wed Nov 15, 11:43 am)
Re: Cleaning up git user-interface warts, Shawn Pearce, (Wed Nov 15, 11:49 am)
Re: Cleaning up git user-interface warts, Andy Parkins, (Wed Nov 15, 11:58 am)
Re: Cleaning up git user-interface warts, Marko Macek, (Wed Nov 15, 12:05 pm)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Wed Nov 15, 12:18 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Wed Nov 15, 12:32 pm)
Re: Cleaning up git user-interface warts, Michael K. Edwards, (Wed Nov 15, 12:39 pm)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Wed Nov 15, 1:09 pm)
Re: Cleaning up git user-interface warts, Petr Baudis, (Wed Nov 15, 1:12 pm)
Re: Cleaning up git user-interface warts, Nicolas Pitre, (Wed Nov 15, 1:21 pm)
Re: Cleaning up git user-interface warts, Nicolas Pitre, (Wed Nov 15, 1:26 pm)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Wed Nov 15, 1:40 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Wed Nov 15, 1:41 pm)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Wed Nov 15, 1:50 pm)
Re: Cleaning up git user-interface warts, Carl Worth, (Wed Nov 15, 2:08 pm)
Re: Cleaning up git user-interface warts, Nicolas Pitre, (Wed Nov 15, 2:18 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Wed Nov 15, 2:31 pm)
Re: Cleaning up git user-interface warts, Nicolas Pitre, (Wed Nov 15, 2:40 pm)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Wed Nov 15, 2:45 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Wed Nov 15, 2:52 pm)
Re: Cleaning up git user-interface warts, Nicolas Pitre, (Wed Nov 15, 2:59 pm)
Re: Cleaning up git user-interface warts, Shawn Pearce, (Wed Nov 15, 3:07 pm)
Re: Cleaning up git user-interface warts, Sean, (Wed Nov 15, 3:28 pm)
Re: Cleaning up git user-interface warts, Carl Worth, (Wed Nov 15, 3:52 pm)
Re: Cleaning up git user-interface warts, Shawn Pearce, (Wed Nov 15, 4:02 pm)
Re: Cleaning up git user-interface warts, Sean, (Wed Nov 15, 4:07 pm)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Wed Nov 15, 4:33 pm)
Re: Cleaning up git user-interface warts, Nicolas Pitre, (Wed Nov 15, 5:08 pm)
Re: Cleaning up git user-interface warts, Theodore Tso, (Wed Nov 15, 6:14 pm)
Re: Cleaning up git user-interface warts, Han-Wen Nienhuys, (Wed Nov 15, 6:20 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Wed Nov 15, 7:03 pm)
Re: Cleaning up git user-interface warts, Han-Wen Nienhuys, (Wed Nov 15, 7:30 pm)
Re: Cleaning up git user-interface warts, Michael K. Edwards, (Wed Nov 15, 8:02 pm)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Wed Nov 15, 8:07 pm)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Wed Nov 15, 8:12 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Wed Nov 15, 8:27 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Wed Nov 15, 8:35 pm)
Re: Cleaning up git user-interface warts, Nicolas Pitre, (Wed Nov 15, 8:43 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Wed Nov 15, 9:07 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Wed Nov 15, 9:21 pm)
Re: Cleaning up git user-interface warts, Theodore Tso, (Wed Nov 15, 9:26 pm)
Re: Cleaning up git user-interface warts, Petr Baudis, (Wed Nov 15, 9:30 pm)
Re: Cleaning up git user-interface warts, Marko Macek, (Wed Nov 15, 11:07 pm)
Re: Cleaning up git user-interface warts, Han-Wen Nienhuys, (Thu Nov 16, 3:45 am)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Thu Nov 16, 4:11 am)
Re: Cleaning up git user-interface warts, Alexandre Julliard, (Thu Nov 16, 4:34 am)
Re: Cleaning up git user-interface warts, Andreas Ericsson, (Thu Nov 16, 4:35 am)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Thu Nov 16, 4:47 am)
Re: Cleaning up git user-interface warts, Andreas Ericsson, (Thu Nov 16, 4:50 am)
Re: Cleaning up git user-interface warts, Han-Wen Nienhuys, (Thu Nov 16, 6:03 am)
Re: Cleaning up git user-interface warts, Han-Wen Nienhuys, (Thu Nov 16, 6:11 am)
Re: Cleaning up git user-interface warts, Petr Baudis, (Thu Nov 16, 7:01 am)
Re: Cleaning up git user-interface warts, Alexandre Julliard, (Thu Nov 16, 8:48 am)
Re: Cleaning up git user-interface warts, Theodore Tso, (Thu Nov 16, 9:07 am)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Thu Nov 16, 9:23 am)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Thu Nov 16, 9:30 am)
Re: Cleaning up git user-interface warts, Carl Worth, (Thu Nov 16, 9:37 am)
Re: Cleaning up git user-interface warts, Han-Wen Nienhuys, (Thu Nov 16, 9:42 am)
Re: Cleaning up git user-interface warts, Theodore Tso, (Thu Nov 16, 9:49 am)
Re: Cleaning up git user-interface warts, Carl Worth, (Thu Nov 16, 10:01 am)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Thu Nov 16, 10:17 am)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Thu Nov 16, 10:30 am)
multi-project repos (was Re: Cleaning up git user-interfac ..., Han-Wen Nienhuys, (Thu Nov 16, 10:40 am)
Re: Cleaning up git user-interface warts, Sean, (Thu Nov 16, 10:44 am)
Re: Cleaning up git user-interface warts, Michael K. Edwards, (Thu Nov 16, 10:57 am)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Thu Nov 16, 10:57 am)
Re: Cleaning up git user-interface warts, Carl Worth, (Thu Nov 16, 11:13 am)
Re: Cleaning up git user-interface warts, Carl Worth, (Thu Nov 16, 11:23 am)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Thu Nov 16, 11:27 am)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Thu Nov 16, 11:28 am)
Re: multi-project repos, Junio C Hamano, (Thu Nov 16, 11:33 am)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Thu Nov 16, 12:47 pm)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Thu Nov 16, 12:53 pm)
Re: multi-project repos (was Re: Cleaning up git user-inte ..., Johannes Schindelin, (Thu Nov 16, 3:21 pm)
Re: multi-project repos, Junio C Hamano, (Thu Nov 16, 3:44 pm)
Re: Cleaning up git user-interface warts, Johannes Schindelin, (Thu Nov 16, 4:00 pm)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Thu Nov 16, 4:22 pm)
Re: multi-project repos (was Re: Cleaning up git user-inte ..., Johannes Schindelin, (Thu Nov 16, 4:36 pm)
Re: Cleaning up git user-interface warts, Han-Wen Nienhuys, (Thu Nov 16, 5:05 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Thu Nov 16, 5:13 pm)
Re: Cleaning up git user-interface warts, Han-Wen Nienhuys, (Thu Nov 16, 5:27 pm)
Re: multi-project repos, Johannes Schindelin, (Thu Nov 16, 5:29 pm)
Re: Cleaning up git user-interface warts, Petr Baudis, (Thu Nov 16, 5:35 pm)
Re: Cleaning up git user-interface warts, Carl Worth, (Thu Nov 16, 5:37 pm)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Thu Nov 16, 5:39 pm)
Re: Cleaning up git user-interface warts, Han-Wen Nienhuys, (Thu Nov 16, 5:52 pm)
Re: multi-project repos (was Re: Cleaning up git user-inte ..., Johannes Schindelin, (Thu Nov 16, 6:22 pm)
Re: Cleaning up git user-interface warts, Carl Worth, (Thu Nov 16, 6:25 pm)
Re: Cleaning up git user-interface warts, Michael K. Edwards, (Thu Nov 16, 6:34 pm)
Re: multi-project repos (was Re: Cleaning up git user-inte ..., Johannes Schindelin, (Thu Nov 16, 7:16 pm)
Re: Cleaning up git user-interface warts, Michael K. Edwards, (Thu Nov 16, 11:42 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Fri Nov 17, 12:32 am)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Fri Nov 17, 1:41 am)
Re: Cleaning up git user-interface warts, Carl Worth, (Fri Nov 17, 2:18 am)
Re: Cleaning up git user-interface warts, Johannes Schindelin, (Fri Nov 17, 3:11 am)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Fri Nov 17, 4:29 am)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Fri Nov 17, 4:41 am)
Re: Cleaning up git user-interface warts, Karl , (Fri Nov 17, 5:20 am)
Re: Cleaning up git user-interface warts, Shawn Pearce, (Fri Nov 17, 9:58 am)
Re: multi-project repos, Junio C Hamano, (Fri Nov 17, 10:39 am)
Re: multi-project repos, Junio C Hamano, (Fri Nov 17, 1:24 pm)
Re: Cleaning up git user-interface warts, Michael K. Edwards, (Fri Nov 17, 6:24 pm)
Re: multi-project repos, Shawn Pearce, (Fri Nov 17, 11:02 pm)
Re: multi-project repos, Junio C Hamano, (Sat Nov 18, 12:31 am)
Re: multi-project repos, Shawn Pearce, (Sat Nov 18, 12:45 am)
Re: Cleaning up git user-interface warts , Horst H. von Brand, (Mon Nov 20, 12:44 pm)
Re: Cleaning up git user-interface warts, Shawn Pearce, (Mon Nov 20, 12:46 pm)
Re: Cleaning up git user-interface warts, Jerome Lovy, (Tue Nov 21, 6:25 am)
Re: Cleaning up git user-interface warts , Sanjoy Mahajan, (Wed Nov 22, 4:21 pm)
Re: Cleaning up git user-interface warts , Horst H. von Brand, (Wed Nov 22, 7:52 pm)