aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Merge branch 'lj/refs'Junio C Hamano2006-11-01
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lj/refs: (63 commits) Fix show-ref usagestring t3200: git-branch testsuite update sha1_name.c: avoid compilation warnings. Make git-branch a builtin ref-log: fix D/F conflict coming from deleted refs. git-revert with conflicts to behave as git-merge with conflicts core.logallrefupdates thinko-fix git-pack-refs --all core.logallrefupdates create new log file only for branch heads. Remove bashism from t3210-pack-refs.sh ref-log: allow ref@{count} syntax. pack-refs: call fflush before fsync. pack-refs: use lockfile as everybody else does. git-fetch: do not look into $GIT_DIR/refs to see if a tag exists. lock_ref_sha1_basic does not remove empty directories on BSD Do not create tag leading directories since git update-ref does it. Check that a tag exists using show-ref instead of looking for the ref file. Use git-update-ref to delete a tag instead of rm()ing the ref file. Fix refs.c;:repack_without_ref() clean-up path Clean up "git-branch.sh" and add remove recursive dir test cases. ...
| * Merge branch 'jc/reflog' into lj/refsJunio C Hamano2006-10-26
| |\ | | | | | | | | | | | | | | | * jc/reflog: sha1_name.c: avoid compilation warnings. ref-log: allow ref@{count} syntax.
| | * sha1_name.c: avoid compilation warnings.Junio C Hamano2006-10-23
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| | * ref-log: allow ref@{count} syntax.Junio C Hamano2006-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Often I find myself wanting to say 'tip of "next" before I merged the last three topics'. Now I can say that with: git log next@{3}..next Since small integers alone are invalid input strings to approxidate, there is no fear of confusion. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Fix show-ref usagestringLars Hjemli2006-10-26
| | | | | | | | | | | | | | | | | | | | | This describes the abbreviation possibilities for git-show-ref Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | t3200: git-branch testsuite updateJunio C Hamano2006-10-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test expected "git branch --help" to exit successfully, but built-ins spawn "man" when given --help, and when the test is run, manpages may not be installed yet and "man" can legally exit non-zero in such a case. Also the new implementation logs "Created from master", instead of "Created from HEAD" in the reflog, which makes a lot more sense, so adjust the test to match that. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Make git-branch a builtinLars Hjemli2006-10-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This replaces git-branch.sh with builtin-branch.c The changes is basically a patch from Kristian Høgsberg, updated to apply onto current 'next' Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | ref-log: fix D/F conflict coming from deleted refs.Junio C Hamano2006-10-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After deleting a branch l/k, you should be able to create a branch l. Earlier we added remove_empty_directories() on the ref creation side to remove leftover .git/refs/l directory but we also need a matching code to remove .git/logs/refs/l directory. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | git-revert with conflicts to behave as git-merge with conflictsLuben Tuikov2006-10-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a busy project, reverting a commit almost always results in a conflict between one or more files (depending on the commit being reverted). It is useful to record this conflict in the commit-to-be message of the resulting commit (after the resolve). The process now becomes: git-revert <SHA-1> <git complains and prints failed automatic> <user manually resolves> git-update-index <resolved files> git-commit -s And the commit message is now a merge of the revert commit message and the conflict commit message, giving the user a chance to edit it or add more information: Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | core.logallrefupdates thinko-fixJunio C Hamano2006-10-09
| | |
| * | git-pack-refs --allJunio C Hamano2006-10-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes 'git-pack-refs' to pack only tags by default. Branches are meant to be updated, either by committing onto it yourself or tracking remote branches, and packed entries can become stale easily, but tags are usually "create once and live forever" and benefit more from packing. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | core.logallrefupdates create new log file only for branch heads.Junio C Hamano2006-10-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It used to mean "create log file for any ref that is updated", but now it creates new log files only for branch heads. The old behaviour made this configuration less useful than otherwise it would be; automatically creating log file for tags is almost always not useful. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Remove bashism from t3210-pack-refs.shDennis Stosberg2006-10-06
| |/ | | | | | | | | | | | | This bashism makes the test fail if /bin/sh is not bash. Signed-off-by: Dennis Stosberg <dennis@stosberg.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * pack-refs: call fflush before fsync.Junio C Hamano2006-10-04
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * pack-refs: use lockfile as everybody else does.Junio C Hamano2006-10-03
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * git-fetch: do not look into $GIT_DIR/refs to see if a tag exists.Junio C Hamano2006-10-03
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Merge branch 'master' into lj/refsJunio C Hamano2006-10-02
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (99 commits) lock_ref_sha1_basic does not remove empty directories on BSD git-push: .git/remotes/ file does not require SP after colon git-mv: invalidate the removed path properly in cache-tree Makefile: install and clean merge-recur, still. GIT 1.4.3-rc1 gitweb: tree view: hash_base and hash are now context sensitive git-diff -B output fix. fetch: Reset remote refs list each time fetch_main is called Remove -fPIC which was only needed for Git.xs Fix approxidate() to understand 12:34 AM/PM are 00:34 and 12:34 git-diff -B output fix. Make cvsexportcommit remove files. diff --stat: ensure at least one '-' for deletions, and one '+' for additions diff --stat=width[,name-width]: allow custom diffstat output width. gitweb: History: blob and tree are first, then commitdiff, etc gitweb: Remove redundant "commit" from history http/ftp: optionally ask curl to not use EPSV command gitweb: Don't use quotemeta on internally generated strings gitweb: Add snapshot to shortlog gitweb: Factor out gitweb_have_snapshot() ...
| | * lock_ref_sha1_basic does not remove empty directories on BSDDennis Stosberg2006-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lock_ref_sha1_basic relies on errno beeing set to EISDIR by the call to read() in resolve_ref() to detect directories. But calling read() on a directory under NetBSD returns EPERM, and even succeeds for local filesystems on FreeBSD. Signed-off-by: Dennis Stosberg <dennis@stosberg.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Do not create tag leading directories since git update-ref does it.Christian Couder2006-10-01
| | | | | | | | | | | | | | | Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Check that a tag exists using show-ref instead of looking for the ref file.Christian Couder2006-10-01
| | | | | | | | | | | | | | | Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Use git-update-ref to delete a tag instead of rm()ing the ref file.Christian Couder2006-10-01
| | | | | | | | | | | | | | | Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Fix refs.c;:repack_without_ref() clean-up pathJunio C Hamano2006-10-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function repack_without_ref() passes a lock-file structure on the stack to hold_lock_file_for_update(), which in turn registers it to be cleaned up via atexit(). This is a big no-no. This is the same bug James Bottomley fixed with commit 31f584c242e7af28018ff920b6c8d1952beadbd4. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Clean up "git-branch.sh" and add remove recursive dir test cases.Christian Couder2006-10-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that directory recursive remove works in the core C code, we don't need to do it in "git-branch.sh". Also add test cases to check that directory recursive remove will continue to work. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Fix a remove_empty_dir_recursive problem.Christian Couder2006-10-01
| | | | | | | | | | | | | | | Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | show-ref --hash=len, --abbrev=len, and --abbrevJunio C Hamano2006-10-01
| | | | | | | | | | | | | | | | | | This teaches show-ref to abbreviate the object name. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | git-branch: remove D/F check done by hand.Junio C Hamano2006-09-30
| | | | | | | | | | | | | | | | | | | | | | | | Now ref creation codepath in lock_ref_sha1() and friends notices the directory/file conflict situation, we do not do this by hand in git-branch anymore. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | delete_ref(): delete packed refJunio C Hamano2006-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements deletion of a packed ref. Since it is a very rare event to delete a ref compared to looking up, creating and updating, this opts to remove the ref from the packed-ref file instead of doing any of the filesystem based "negative ref" trick to optimize the deletion path. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | lock_ref_sha1(): check D/F conflict with packed ref when creating.Junio C Hamano2006-09-30
| | | | | | | | | | | | | | | | | | | | | This makes the ref locking codepath to notice if an existing ref overlaps with the ref we are creating. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | lock_ref_sha1(): do not sometimes error() and sometimes die().Junio C Hamano2006-09-30
| | | | | | | | | | | | | | | | | | | | | | | | This cleans up the error path in the function so it does not die() itself sometimes while signalling an error with NULL some other times which was inconsistent and confusing. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | refs: minor restructuring of cached refs data.Junio C Hamano2006-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | Once we read packed and loose refs, for_each_ref() and friends kept using them even after write_ref_sha1() and delete_ref() changed the refs. This adds invalidate_cached_refs() as a way to flush the cached information. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | ref locking: allow 'foo' when 'foo/bar' used to exist but not anymore.Junio C Hamano2006-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | It is normal to have .git/refs/heads/foo directory which is empty after the last branch whose name starts with foo/ is removed. Make sure we notice this case and allow creation of branch foo by removing the empty directory. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Uncomment test case: git branch c/d should barf if branch c exists.Christian Couder2006-09-27
| | | | | | | | | | | | | | | Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | When creating branch c/d check that branch c does not already exists.Christian Couder2006-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With packed refs, there may not be a ".git/refs/heads/c" file when branch c exists. And currently in this case, there is no check to prevent creation of branch c/d. This should probably be rewritten in C and done after the ref lock has been taken to make sure no race exists though. This is mainly to make all test cases in "t3210-pack-refs.sh" work. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Add pack-refs and show-ref test cases.Christian Couder2006-09-27
| | | | | | | | | | | | | | | | | | | | | | | | Some of these test cases are from Junio. One test case is commented out because it doesn't work right now. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Merge branch 'master' into lj/refsJunio C Hamano2006-09-27
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (72 commits) runstatus: do not recurse into subdirectories if not needed grep: fix --fixed-strings combined with expression. grep: free expressions and patterns when done. Corrected copy-and-paste thinko in ignore executable bit test case. An illustration of rev-list --parents --pretty=raw Allow git-checkout when on a non-existant branch. gitweb: Decode long title for link tooltips git-svn: Fix fetch --no-ignore-externals with GIT_SVN_NO_LIB=1 Ignore executable bit when adding files if filemode=0. Remove empty ref directories that prevent creating a ref. Use const for interpolate arguments git-archive: update documentation Deprecate merge-recursive.py gitweb: fix over-eager application of esc_html(). Allow '(no author)' in git-svn's authors file. Allow 'svn fetch' on '(no date)' revisions in Subversion. git-repack: allow git-repack to run in subdirectory Remove upload-tar and make git-tar-tree a thin wrapper to git-archive git-tar-tree: Move code for git-archive --format=tar to archive-tar.c git-tar-tree: Remove duplicate git_config() call ...
| * \ \ Merge branch 'jc/for-each-ref' into jc/ref-lockingJunio C Hamano2006-09-27
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * jc/for-each-ref: git-for-each-ref: improve the documentation on scripting modes
| * | | | receive-pack: call setup_ident before git_configJunio C Hamano2006-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we would end up getting values from Gecos which is often not what people would want. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Teach receive-pack about ref-logJunio C Hamano2006-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This converts receive-pack to use the standard ref locking code instead of its own. As a side effect, it automatically records the "push" event to ref-log if enabled. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | update a few Porcelain-ish for ref lock safety.Junio C Hamano2006-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This updates the use of git-update-ref in git-branch, git-tag and git-commit to make them safer in a few corner cases as demonstration. - git-tag makes sure that the named tag does not exist, allows you to edit tag message and then creates the tag. If a tag with the same name was created by somebody else in the meantime, it used to happily overwrote it. Now it notices the situation. - git-branch -d and git-commit (for the initial commit) had the same issue but with smaller race window, which is plugged with this. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | update-ref: -d flag and ref creation safety.Junio C Hamano2006-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds -d flag to update-ref to allow safe deletion of ref. Before deleting it, the command checks if the given <oldvalue> still matches the value the caller thought the ref contained. Similarly, it also accepts 0{40} or an empty string as <oldvalue> to allow safe creation of a new ref. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Clean-up lock-ref implementationJunio C Hamano2006-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This drops "mustexist" parameter lock_ref_sha1() and lock_any_ref_forupdate() functions take. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Merge branch 'jc/lt-ref2-with-lt-refs' into jc/ref-lockingJunio C Hamano2006-09-27
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/lt-ref2-with-lt-refs: Fix show-ref usage for --dereference. Document git-show-ref [-s|--hash] option. Add man page for git-show-ref gitignore: git-show-ref is a generated file. Use Linus' show ref in "git-branch.sh". Add [-s|--hash] option to Linus' show-ref. Teach "git checkout" to use git-show-ref Add "git show-ref" builtin command
| | * \ \ \ Merge branch 'lt/refs' into jc/lt-ref2-with-lt-refsJunio C Hamano2006-09-21
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lt/refs: (58 commits) git-pack-refs --prune pack-refs: do not pack symbolic refs. Tell between packed, unpacked and symbolic refs. Add callback data to for_each_ref() family. symbolit-ref: fix resolve_ref conversion. Fix broken sha1 locking fsck-objects: adjust to resolve_ref() clean-up. gitignore: git-pack-refs is a generated file. wt-status: use simplified resolve_ref to find current branch Fix t1400-update-ref test minimally Enable the packed refs file format Make ref resolution saner Add support for negative refs Start handling references internally as a sorted in-memory list gitweb fix validating pg (page) parameter git-repack(1): document --window and --depth git-apply(1): document --unidiff-zero gitweb: fix warnings in PATH_INFO code and add export_ok/strict_export upload-archive: monitor child communication even more carefully. gitweb: export options ...
| | * | | | | Fix show-ref usage for --dereference.Christian Couder2006-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| | * | | | | Document git-show-ref [-s|--hash] option.Christian Couder2006-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| | * | | | | Add man page for git-show-refJonas Fonseca2006-09-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
| | * | | | | gitignore: git-show-ref is a generated file.Jeff King2006-09-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| | * | | | | Use Linus' show ref in "git-branch.sh".Christian Couder2006-09-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| | * | | | | Add [-s|--hash] option to Linus' show-ref.Christian Couder2006-09-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this option only the sha1 hash of the ref should be printed. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| | * | | | | Teach "git checkout" to use git-show-refLinus Torvalds2006-09-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That way, it doesn't care how the refs are stored any more Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>