summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2006-12-21Add a test for git-rerereLibravatar Johannes Schindelin1-0/+154
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-21move read_mmfile() into xdiff-interfaceLibravatar Johannes Schindelin3-18/+22
read_file() was a useful function if you want to work with the xdiff stuff, so it was renamed and put into a more central place. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-21Introduce a global level warn() function.Libravatar Shawn O. Pearce2-0/+21
Like the existing error() function the new warn() function can be used to describe a situation that probably should not be occuring, but which the user (and Git) can continue to work around without running into too many problems. An example situation is a bad commit SHA1 found in a reflog. Attempting to read this record out of the reflog isn't really an error as we have skipped over it in the past. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-21Rename imap-send's internal info/warn functions.Libravatar Shawn O. Pearce1-12/+12
Because I am about to introduce a global warn() function (much like the global error function) this global declaration would conflict with the one supplied by imap-send. Further since imap-send's warn function output depends on its Quiet setting we cannot simply remove its internal definition and use the forthcoming global one. So refactor warn() -> imap_warn() and info() -> imap_info() (the latter was done just to be consistent in naming). Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-21_XOPEN_SOURCE problem also exists on FreeBSDLibravatar Junio C Hamano1-1/+1
Suggested by Rocco Rutte, Marco Roeland and others. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-21parse-remote: mark all refs not for merge only when fetching more than oneLibravatar Junio C Hamano1-2/+9
An earlier commit a71fb0a1 implemented much requested safety valve to refuse "git pull" or "git pull origin" without explicit refspecs from using the first set of remote refs obtained by reading .git/remotes/origin file or branch.*.fetch configuration variables to create a merge. The argument was that while on a branch different from the default branch, it is often wrong to merge the default remote ref suitable for merging into the master. That is fine as a theory. But many repositories already in use by people in the real world do not have any of the per branch configuration crap. They did not need it, and they do not need it now. Merging with the first remote ref listed was just fine, because they had only one ref (e.g. 'master' from linux-2.6.git) anyway. So this changes the safety valve to be a lot looser. When "git fetch" gets only one remote branch, the irritating warning would not trigger anymore. I think we could also make the warning trigger when branch.*.merge is not specified for the current branch, but is for some other branch. That is for another commit. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-21Merge branch 'maint'Libravatar Junio C Hamano1-2/+2
* maint: diff --check: fix off by one error spurious .sp in manpages
2006-12-21git-reset --hard: tell the user what the HEAD was reset toLibravatar Johannes Schindelin1-1/+6
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-21git-tag: support -F <file> optionLibravatar Johannes Schindelin2-1/+16
This imitates the behaviour of git-commit. Noticed by Han-Wen Nienhuys. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-21Revert "git-pull: refuse default merge without branch.*.merge"Libravatar Junio C Hamano1-2/+1
This reverts commit a71fb0a1412c82405f078fb536797d3f5de68d53. The logic to decide when to refuse to use the default "first set of refs fetched" for merge was utterly bogus. In a repository that happily worked correctly without any of the per-branch configuration crap did not have (and did not have to have) any branch.<current>.merge. With that broken commit, pulling from origin no longer would work.
2006-12-21Suggest 'add' in am/revert/cherry-pick.Libravatar Shawn O. Pearce2-3/+3
Now that we have decided to make 'add' behave like 'update-index' (and therefore fully classify update-index as strictly plumbing) the am/revert/cherry-pick family of commands should not steer the user towards update-index. Instead send them to the command they probably already know, 'add'. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-21Use git-merge-file in git-merge-one-file, tooLibravatar Johannes Schindelin1-1/+1
Would you believe? I edited git-merge-one-file (note the missing ".sh"!) when I submitted the patch which became commit e2b7008752... Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-21diff --check: fix off by one errorLibravatar Johannes Schindelin1-2/+2
When parsing the diff line starting with '@@', the line number of the '+' file is parsed. For the subsequent line parses, the line number should therefore be incremented after the parse, not before it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-20Documentation/git-branch: new -r to delete remote-tracking branches.Libravatar Quy Tonthat1-5/+8
Signed-off-by: Quy Tonthat <qtonthat@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-20Fix system header problems on Mac OS XLibravatar Terje Sten Bjerkseth1-0/+2
For Mac OS X 10.4, _XOPEN_SOURCE defines _POSIX_C_SOURCE which hides many symbols from the program. Breakage noticed and initial analysis provided by Randal L. Schwartz. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-20Merge branch 'ew/svn-pm'Libravatar Junio C Hamano10-1087/+198
* ew/svn-pm: git-svn: rename 'commit' command to 'set-tree' git-svn: remove support for the svn command-line client git-svn: convert to using Git.pm
2006-12-20diff documentation: mostly talk about <commit>Libravatar Junio C Hamano1-2/+2
This corrects minor remaining bits that still talked about <tree-ish>; the Porcelain users (as opposed to plumbers) are mostly interested in commits so use <commit> consistently and keep a sentence that mentions that <tree-ish> can be used in place of them.
2006-12-20Merge branch 'jc/leftright'Libravatar Junio C Hamano5-10/+43
* jc/leftright: Revert "Make left-right automatic." Make left-right automatic. Teach all of log family --left-right output. rev-list --left-right
2006-12-20Merge branch 'jc/blame'Libravatar Junio C Hamano1-2/+31
* jc/blame: blame: -b (blame.blankboundary) and --root (blame.showroot)
2006-12-20Merge branch 'jc/branch-remove-remote'Libravatar Junio C Hamano1-26/+62
* jc/branch-remove-remote: git-branch -d: do not stop at the first failure. Teach git-branch to delete tracking branches with -r -d
2006-12-20Merge branch 'jc/clone'Libravatar Junio C Hamano13-85/+52
* jc/clone: Move "no merge candidate" warning into git-pull Use preprocessor constants for environment variable names. Do not create $GIT_DIR/remotes/ directory anymore. Introduce GIT_TEMPLATE_DIR Revert "fix testsuite: make sure they use templates freshly built from the source" fix testsuite: make sure they use templates freshly built from the source git-clone: lose the traditional 'no-separate-remote' layout git-clone: lose the artificial "first" fetch refspec git-pull: refuse default merge without branch.*.merge git-clone: use wildcard specification for tracking branches
2006-12-20compat/inet_ntop: do not use u_intLibravatar Junio C Hamano1-1/+1
It is pointless. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-20spurious .sp in manpagesLibravatar Junio C Hamano1-0/+14
This cherry-picks 7ef04350 that has been applied to the 'master' to fix ".sp" in generated manpages. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-20git-add: error out when given no arguments.Libravatar Junio C Hamano1-0/+5
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-20Merge branch 'maint'Libravatar Junio C Hamano1-1/+1
* maint: GIT 1.4.4.3
2006-12-20GIT 1.4.4.3Libravatar Junio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-20clarify some error messages wrt unknown object typesLibravatar Nicolas Pitre2-3/+3
If ever new object types are added for future extensions then better have current git version report them as "unknown" instead of "corrupted". Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-20simplify inclusion of system header files.Libravatar Junio C Hamano72-201/+42
This is a mechanical clean-up of the way *.c files include system header files. (1) sources under compat/, platform sha-1 implementations, and xdelta code are exempt from the following rules; (2) the first #include must be "git-compat-util.h" or one of our own header file that includes it first (e.g. config.h, builtin.h, pkt-line.h); (3) system headers that are included in "git-compat-util.h" need not be included in individual C source files. (4) "git-compat-util.h" does not have to include subsystem specific header files (e.g. expat.h). Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-20index-pack usage of mmap() is unacceptably slower on many OSes other than LinuxLibravatar Nicolas Pitre1-13/+14
It was reported by Randal L. Schwartz <merlyn@stonehenge.com> that indexing the Linux repository ~150MB pack takes about an hour on OS x while it's a minute on Linux. It seems that the OS X mmap() implementation is more than 2 orders of magnitude slower than the Linux one. Linus proposed a patch replacing mmap() with pread() bringing index-pack performance on OS X in line with the Linux one. The performances on Linux also improved by a small margin. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-19gitweb: Show '...' links in "summary" view only if there are more itemsLibravatar Robert Fitzsimons1-2/+9
Show "..." links in "summary" view to shortlog, heads (if there are any), and tags (if there are any) only if there are more items to show than shown already. This means that "..." link is shown below shortened shortlog if there are more than 16 commits, "..." link below shortened heads list if there are more than 16 heads refs (16 branches), "..." link below shortened tags list if there are more than 16 tags. Modified patch from Jakub to to apply cleanly to master, also preform the same "..." link logic to the forks list. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-19config_rename_section: fix FILE* leakLibravatar Junio C Hamano1-6/+13
Noticed by SungHyun Nam. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-19Remove COLLISION_CHECK from Makefile since it's not used.Libravatar Brian Gernhardt2-8/+0
It's rather misleading to have configuration options that don't do anything. If someone adds collision checking they might also want to restore this option. Signed-off-by: Brian Gernhardt <benji@silverinsanity.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-19fix populate-filespecLibravatar Junio C Hamano1-1/+1
I hand munged the original patch when committing 1510fea78, and screwed up the conversion. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-19git-cvsserver: fix breakage when calling git merge-fileLibravatar Eric Wong1-1/+1
In the same vein as 8336afa563fbeff35e531396273065161181f04c, this fixes the the RCS merge to git-merge-file conversion in commit e2b70087. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-19Revert "Make left-right automatic."Libravatar Junio C Hamano2-11/+3
This reverts commit 5761231975ceffa531d86d9bab0f9a9a370674f6. Feeding symmetric difference to gitk is so useful, and it is the same for other graphical Porcelains. Rather than forcing them to pass --no-left-right, making it optional. Noticed and reported by Jeff King.
2006-12-19Move "no merge candidate" warning into git-pullLibravatar Josef Weidendorfer2-10/+4
The warning triggered even when running "git fetch" only when resulting .git/FETCH_HEAD only contained branches marked as 'not-for-merge'. Signed-off-by: Josef Weidendorfer <weidendo@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-19Use preprocessor constants for environment variable names.Libravatar Junio C Hamano6-12/+16
We broke the discipline Linus set up to allow compiler help us avoid typos in environment names in the early days of git over time. This defines a handful preprocessor constants for environment variable names used in relatively core parts of the system. I've left out variable names specific to subsystems such as HTTP and SSL as I do not think they are big problems. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-19Do not create $GIT_DIR/remotes/ directory anymore.Libravatar Junio C Hamano2-5/+3
Because we do not use --no-separate-remote anymore, there is no reason to create that directory from the template. t5510 test is updated to test both $GIT_DIR/remotes/ based configuration and $GIT_DIR/config variable (credits to Johannes). Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-19Merge branch 'jc/test-clone' into jc/cloneLibravatar Junio C Hamano29-106/+564
* jc/test-clone: (35 commits) Introduce GIT_TEMPLATE_DIR Revert "fix testsuite: make sure they use templates freshly built from the source" fix testsuite: make sure they use templates freshly built from the source rerere: fix breakage of resolving. Add config example with respect to branch Add documentation for show-branch --topics make git a bit less cryptic on fetch errors make patch_delta() error cases a bit more verbose racy-git: documentation updates. show-ref: fix --exclude-existing parse-remote::expand_refs_wildcard() vim syntax: follow recent changes to commit template show-ref: fix --verify --hash=length show-ref: fix --quiet --verify avoid accessing _all_ loose refs in git-show-ref --verify git-fetch: Avoid reading packed refs over and over again Teach show-branch how to show ref-log data. markup fix in svnimport documentation. Documentation: new option -P for git-svnimport Fix mis-mark-up in git-merge-file.txt documentation ...
2006-12-19Introduce GIT_TEMPLATE_DIRLibravatar Johannes Schindelin2-3/+7
Instead of passing --template explicitely to init-db and clone, you can just set the environment variable GIT_TEMPLATE_DIR. Also make use of it in the tests, to make sure that the templates are copied. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-19Revert "fix testsuite: make sure they use templates freshly built from the ↵Libravatar Junio C Hamano11-36/+26
source" This reverts commit 74d20040cafdced657efbf49795183d209a3a07b. Version from Johannes to introduce GIT_TEMPLATE_DIR is simpler, although I unconsciously stayed away from introducing yet another environment variable.
2006-12-18blame: -b (blame.blankboundary) and --root (blame.showroot)Libravatar Junio C Hamano1-2/+31
When blame.blankboundary is set (or -b option is given), commit object names are blanked out in the "human readable" output format for boundary commits. When blame.showroot is not set (or --root is not given), the root commits are treated as boundary commits. The code still attributes the lines to them, but with -b their object names are not shown. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-18git-branch -d: do not stop at the first failure.Libravatar Quy Tonthat1-18/+39
If there are more than one branches to be deleted, failure on one will no longer stop git-branch to process the next ones. The command still reports failures by exitting non-zero status. Signed-off-by: Quy Tonthat <qtonthat@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-18Teach git-branch to delete tracking branches with -r -dLibravatar Junio C Hamano1-13/+28
Because -r already means "remote" when listing, you can say: $ git branch -d -r origin/todo origin/html origin/man I just twisted it not to check fast-forwardness with the current branch when you are removing a tracking branch. Most likely, removal of a tracking branch is not because you are "done with" it (for a local branch, it usually means "you merged it up"), but because you are not even interested in it. In other words, remote tracking branches are more like tags than branches. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-18fix testsuite: make sure they use templates freshly built from the sourceLibravatar Junio C Hamano11-26/+36
The initial t/trash repository for testing was created properly but over time we gained many tests that create secondary test repositories with init-db or clone and they were not careful enough. This fixes it. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-18rerere: fix breakage of resolving.Libravatar Junio C Hamano1-1/+1
commit e2b70087 botched the RCS merge to git-merge-file conversion. There is no command called "git merge-file" (yes, we are using safer variant of Perl's system(3)). Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-18Add config example with respect to branchLibravatar Aneesh Kumar K.V1-0/+5
Update config.txt with example with respect to branch config variable. This give a better idea regarding how branch names are expected. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-18Add documentation for show-branch --topicsLibravatar Brian Gernhardt1-1/+9
Add a quick paragraph explaining the --topics option for show-branch. The explanation is an abbreviated version of the commit message from d320a5437f8304cf9ea3ee1898e49d643e005738. Signed-off-by: Brian Gernhardt <benji@silverinsanity.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-18make git a bit less cryptic on fetch errorsLibravatar Nicolas Pitre3-3/+3
The remote server might not want to tell why it doesn't like us for security reasons, but let's make the client report such error in a bit less confusing way. The remote failure remains a mystery, but the local message might be a bit less so. [jc: with a gentle wording updates from Andy Parkins] Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-18make patch_delta() error cases a bit more verboseLibravatar Nicolas Pitre2-9/+8
It is especially important to distinguish between a malloc() failure from all the other cases. An out of memory condition is much less worrisome than a compatibility/corruption problem. Also make test-delta compilable again. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>