aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* ls-remote and clone: accept --upload-pack=<path> as well.Junio C Hamano2007-01-24
| | | | | | | | | | | This makes them consistent with other commands that take the path to the upload-pack program. We also pass --upload-pack instead of --exec to the underlying fetch-pack, although it is not strictly necessary. [jc: original motivation from Uwe] Signed-off-by: Junio C Hamano <junkio@cox.net>
* rename --exec to --upload-pack for fetch-pack and peek-remoteUwe Kleine-König2007-01-24
| | | | | | | | | | Just some option name disambiguation. This is the counter part to commit d23842fd which made a similar change for push and send-pack. --exec continues to work. Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: --amend cannot be combined with -c/-C/-F.Peter Eriksen2007-01-24
| | | | | | | | | | | | | | We used to get the following confusing error message: $ git commit --amend -a -m foo Option -m cannot be combined with -c/-C/-F This is because --amend cannot be combined with -c/-C/-F, which makes sense, because they try to handle the same log message in different ways. So update the documentation to reflect this. Signed-off-by: Peter Eriksen <s022018@student.dtu.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation/config.txt: Correct info about subsection nameJakub Narebski2007-01-24
| | | | | | | | | Contrary to variable values, in subsection names parsing character escape codes (besides literal escaping of " as \", and \ as \\) is not performed; subsection name cannot contain newlines. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-daemon documentation on enabling services.Junio C Hamano2007-01-24
| | | | | | Noticed by Franck Bui-Huu. Signed-off-by: Junio C Hamano <junkio@cox.net>
* reflog inspection: introduce shortcut "-g"Johannes Schindelin2007-01-24
| | | | | | | | | | | A short-hand "-g" for "git log --walk-reflogs" and "git show-branch --reflog" makes it easier to access the reflog info. [jc: added -g to show-branch for symmetry] Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* annotate: use pagerJohannes Schindelin2007-01-24
| | | | | Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* t/t1300-repo-config.sh: value continued on next lineJakub Narebski2007-01-23
| | | | | | | | | | | Documentation/config.txt: Variable value ending in a '`\`' is continued on the next line in the customary UNIX fashion. Test it. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-checkout -m: fix merge caseJunio C Hamano2007-01-23
| | | | | | | | | | Commit c1a4278e switched the "merging checkout" implementation from 3-way read-tree to merge-recursive, but forgot that merge-recursive will signal an unmerged state with its own exit status code. This prevented the clean-up phase (paths cleanly merged should not be updated in the index) from running. Signed-off-by: Junio C Hamano <junkio@cox.net>
* reflog gc: a tag that does not point at a commit is not a crime.Junio C Hamano2007-01-22
| | | | | | | | Although unusual, tags can point at any object. Warning only once is fine, but warning every time about the same tag gets annoying. Signed-off-by: Junio C Hamano <junkio@cox.net>
* contrib/vim: update syntax for changed commit templateJeff King2007-01-22
| | | | | Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* format-patch: fix bug with --stdout in a subdirectoryJeff King2007-01-22
| | | | | | | | | | | We set the output directory to the git subdirectory prefix if one has not already been specified. However, in the case of --stdout, we explicitly _don't_ want the output directory to be set. The result was that "git-format-patch --stdout" in a directory besides the project root produced the "standard output, or directory, which one?" error message. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] honor --author even with --amend, -C, and -c.Junio C Hamano2007-01-22
| | | | | | | | Earlier code discarded GIT_AUTHOR_DATE taken from the base commit when --author was specified. This was often wrong as that use is likely to fix the spelling of author's name. Signed-off-by: Junio C Hamano <junkio@cox.net>
* .mailmap: fix screw-ups in Uwe's nameJunio C Hamano2007-01-22
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: remove leading slash when printing removed directoriesEric Wong2007-01-22
| | | | | | | | | | Not sure why it was there in the first place, we always do our work relative to the URL we're connected to; even if that URL is the root of the repository, so the leading slash is pointless... Lets be consistent when printing things for the user to see. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* sha1_file.c: Avoid multiple calls to find_pack_entry().Peter Eriksen2007-01-22
| | | | | | | | | | We used to call find_pack_entry() twice from read_sha1_file() in order to avoid printing an error message, when the object did not exist. This is fixed by moving the call to error() to the only place it really could be called. Signed-off-by: Peter Eriksen <s022018@student.dtu.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation/config.txt: Document config file syntax betterJakub Narebski2007-01-22
| | | | | | | | | | | | | | | | Separate part of Documentation/config.txt which deals with git config file syntax into "Syntax" subsection, and expand it. Add information about subsections, boolean values, escaping and escape sequences in string values, and continuing variable value on the next line. Add also proxy settings to config file example to show example of partially enclosed in double quotes string value. Parts based on comments by Junio C Hamano, Johannes Schindelin, config.c, and the smb.conf(5) man page. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* cvsimport: activate -a option, really.Junio C Hamano2007-01-22
| | | | | | | | An earlier commit ded9f400 added $opt_a support to disable the cvsps grace period mechanism, but forgot to tell the option parser about it. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Cleanup uninitialized value in chompAlex Riesen2007-01-22
| | | | | | | | which happens if you use ActiveState Perl and a pipe workaround specially for it. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Force Activestate Perl to tie git command pipe handle to a handle classAlex Riesen2007-01-22
| | | | | | | | | Otherwise it tries to tie it to a scalar and complains about missing method. Dunno why, may be ActiveState brokenness again. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Acked-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Insert ACTIVESTATE_STRING in Git.pmAlex Riesen2007-01-22
| | | | | | | | Also add "git" to the pipe parameters, otherwise it does not work at all, as no git commands are usable out of git context. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* fsck-objects: refactor checking for connectivityLinus Torvalds2007-01-21
| | | | | | | | | | | | | | | | | | | This separates the connectivity check into separate codepaths, one for reachable objects and the other for unreachable ones, while adding a lot of comments to explain what is going on. When checking an unreachable object, unlike a reachable one, we do not have to complain if it does not exist (we used to complain about a missing blob even when the only thing that references it is a tree that is dangling). Also we do not have to check and complain about objects that are referenced by an unreachable object. This makes the messages from fsck-objects a lot less noisy and more useful. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-gc: do not run git-prune by default.Junio C Hamano2007-01-21
| | | | | | | | git-prune is not safe when run uncontrolled in parallel while other git operations are creating new objects. To avoid mistakes, do not run git-prune by default from git-gc. Signed-off-by: Junio C Hamano <junkio@cox.net>
* shallow repository: disable unsupported operations for now.Junio C Hamano2007-01-21
| | | | | | | | We currently do not support fetching/cloning from a shallow repository nor pushing into one. Make sure these are not attempted so that we do not have to worry about corrupting repositories needlessly. Signed-off-by: Junio C Hamano <junkio@cox.net>
* is_repository_shallow(): prototype fix.Junio C Hamano2007-01-21
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Make sure git_connect() always give two file descriptors.Junio C Hamano2007-01-21
| | | | | | | | | | | | | | | | | | | | | | Earlier, git_connect() returned the same fd twice or two separate fds, depending on the way the connection was made (when we are talking to the other end over a single socket, we used the same fd twice, and when our end is connected to a pipepair we used two). This forced callers who do close() and dup() to really care which was which, and most of the existing callers got this wrong, although without much visible ill effect. Many were closing the same fd twice when we are talking over a single socket, and one was leaking a fd. This fixes it to uniformly use two separate fds, so if somebody wants to close only reader side can just do close() on it without worrying about it accidentally also closing the writer side or vice versa. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Revert "prune: --grace=time"Junio C Hamano2007-01-21
| | | | | | | | | | This reverts commit 9b088c4e394df84232cfd37aea78349a495b09c1. Protecting 'mature' objects does not make it any safer. We should admit that git-prune is inherently unsafe when run in parallel with other operations without involving unwarranted locking overhead, and with the latest git, even rebase and reset would not immediately create crufts anyway.
* Documentation/tutorial-2: Fix interesting typo in an example.Junio C Hamano2007-01-21
| | | | | | | | | | | Marco Candrian noticed that one cat-file example refers to a blob object that is never used in the example sequence. The bug is interesting in that the output from the botched sample command is consistent with the incorrect blob object name ;-). Signed-off-by: Junio C Hamano <junkio@cox.net>
* GIT v1.5.0-rc2v1.5.0-rc2Junio C Hamano2007-01-20
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* prune: --grace=timeMatthias Lederhofer2007-01-20
| | | | | | | | | | | This option gives grace period to objects that are unreachable from the refs from getting pruned. The default value is 24 hours and may be changed using gc.prunegrace. Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* --walk-reflogs: do not crash with cyclic reflog ancestryJohannes Schindelin2007-01-20
| | | | | | | | Since you can reset --hard to any revision you already had, when traversing the reflog ancestry, we may not free() the commit buffer. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* --walk-reflogs: actually find the right commit by date.Johannes Schindelin2007-01-20
| | | | | | Embarassing thinko. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
* Fix --walk-reflog with --pretty=onelineJunio C Hamano2007-01-20
| | | | | | | Now, "git log --abbrev-commit --pretty=o --walk-reflogs HEAD" is reasonably pleasant to use. Signed-off-by: Junio C Hamano <junkio@cox.net>
* reflog-walk: build fixesJunio C Hamano2007-01-20
| | | | | | | Dependency on reflog-walk.h was missing in the Makefile, and reflog-walk.c did not even include it. Signed-off-by: Junio C Hamano <junkio@cox.net>
* log --walk-reflog: documentationJunio C Hamano2007-01-20
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* --walk-reflogs: disallow uninteresting commitsJohannes Schindelin2007-01-20
| | | | | | | | | | Do not allow uninteresting commits with --walk-reflogs, since it is not clear what should be shown in these cases: $ git log --walk-reflogs master..next $ git log --walk-reflogs ^master Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
* Teach the revision walker to walk by reflogs with --walk-reflogsJohannes Schindelin2007-01-20
| | | | | | | | | When called with "--walk-reflogs", as long as there are reflogs available, the walker will take this information into account, rather than the parent information in the commit object. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-rebase: allow rebasing a detached HEAD.Junio C Hamano2007-01-20
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* branch -f: no reason to forbid updating the current branch in a bare repo.Junio C Hamano2007-01-20
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-tag -d: allow deleting multiple tags at once.Junio C Hamano2007-01-20
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Do not verify filenames in a bare repositoryJohannes Schindelin2007-01-20
| | | | | | | | | For example, it makes no sense to check the presence of a file named "HEAD" when calling "git log HEAD" in a bare repository. Noticed by Han-Wen Nienhuys. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
* Stop ignoring Documentation/READMEJunio C Hamano2007-01-20
| | | | | | We do not copy this file from elsewhere anymore. Signed-off-by: Junio C Hamano <junkio@cox.net>
* apply --cached: fix crash in subdirectoryJohannes Schindelin2007-01-20
| | | | | | | | The static variable "prefix" was shadowed by an unused parameter of the same name. In case of execution in a subdirectory, the static variable was accessed, leading to a crash. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
* show-branch --reflog: fix show_date() callJunio C Hamano2007-01-20
| | | | | | Not passing tz to show_date() is not a fix. Signed-off-by: Junio C Hamano <junkio@cox.net>
* show_date(): fix relative datesJohannes Schindelin2007-01-20
| | | | | | | | We pass a timestamp (i.e. number of seconds elapsed since Jan 1 1970, 00:00:00 GMT) to the function. So there is no need to "fix" the timestamp according to the timezone. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
* show-branch --reflog: tighten input validation.Junio C Hamano2007-01-19
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* show-branch --reflog: show the reflog message at the top.Junio C Hamano2007-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the output so the list at the top shows the reflog message, along with their relative timestamps. You can use --reflog=<n> to show <n> most recent log entries, or use --reflog=<n>,<b> to show <n> entries going back from the entry <b>. <b> can be either a number (so --reflog=4,20 shows 4 records starting from @{20}) or a timestamp (e.g. --reflog='4,1 day'). Here is a sample output (with --list option): $ git show-branch --reflog=10 --list jc/show-reflog [jc/show-reflog@{0}] (3 minutes ago) commit (amend): show-branch --ref [jc/show-reflog@{1}] (5 minutes ago) reset HEAD^ [jc/show-reflog@{2}] (14 minutes ago) commit: show-branch --reflog: sho [jc/show-reflog@{3}] (14 minutes ago) commit: show-branch --reflog: sho [jc/show-reflog@{4}] (18 minutes ago) commit (amend): Extend read_ref_a [jc/show-reflog@{5}] (18 minutes ago) commit (amend): Extend read_ref_a [jc/show-reflog@{6}] (18 minutes ago) commit (amend): Extend read_ref_a [jc/show-reflog@{7}] (18 minutes ago) am: read_ref_at(): allow retrievi [jc/show-reflog@{8}] (18 minutes ago) reset --hard HEAD~4 [jc/show-reflog@{9}] (61 minutes ago) commit: show-branch --reflog: use This shows what I did more cleanly: $ git show-branch --reflog=10 jc/show-reflog ! [jc/show-reflog@{0}] (3 minutes ago) commit (amend): show-branch --ref ! [jc/show-reflog@{1}] (5 minutes ago) reset HEAD^ ! [jc/show-reflog@{2}] (14 minutes ago) commit: show-branch --reflog: ! [jc/show-reflog@{3}] (14 minutes ago) commit: show-branch --reflog: ! [jc/show-reflog@{4}] (18 minutes ago) commit (amend): Extend read_ ! [jc/show-reflog@{5}] (18 minutes ago) commit (amend): Extend read ! [jc/show-reflog@{6}] (18 minutes ago) commit (amend): Extend rea ! [jc/show-reflog@{7}] (18 minutes ago) am: read_ref_at(): allow ! [jc/show-reflog@{8}] (18 minutes ago) reset --hard HEAD~4 ! [jc/show-reflog@{9}] (61 minutes ago) commit: show-branch --r ---------- + [jc/show-reflog@{0}] show-branch --reflog: show the reflog + [jc/show-reflog@{2}] show-branch --reflog: show the reflog +++ [jc/show-reflog@{1}] show-branch --reflog: show the reflog +++++ [jc/show-reflog@{4}] Extend read_ref_at() to be usable fro + [jc/show-reflog@{5}] Extend read_ref_at() to be usable fro + [jc/show-reflog@{6}] Extend read_ref_at() to be usable fro + [jc/show-reflog@{7}] read_ref_at(): allow retrieving the r + [jc/show-reflog@{9}] show-branch --reflog: use updated rea + [jc/show-reflog@{9}^] read_ref_at(): allow reporting the c + [jc/show-reflog@{9}~2] show-branch --reflog: show the refl + [jc/show-reflog@{9}~3] read_ref_at(): allow retrieving the ++++++++++ [jc/show-reflog@{8}] dwim_ref(): Separate name-to-ref DWIM At @{9}, I had a commit to complete 5 patch series, but I wanted to consolidate two commits that enhances read_ref_at() into one (they were @{9}^ and @{9}~3), and another two that touch show-branch into one (@{9} and @{9}~2). I first saved them with "format-patch -4", and then did a reset at @{8}. At @{7}, I applied one of them with "am", and then used "git-apply" on the other one, and amended the commit at @{6} (so @{6} and @{7} has the same parent). I did not like the log message, so I amended again at @{5}. Then I cherry-picked @{9}~2 to create @{3} (the log message shows that it needs to learn to set GIT_REFLOG_ACTION -- it uses "git-commit" and the log entry is attributed for it). Another cherry-pick built @{2} out of @{9}, but what I wanted to do was to squash these two into one, so I did a "reset HEAD^" at @{1} and then made the final commit by amending what was at the top. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Extend read_ref_at() to be usable from places other than sha1_name.Junio C Hamano2007-01-19
| | | | | | | | | | | | | You can pass an extra argument to the function to receive the reflog message information. Also when the log does not go back beyond the point the user asked, the cut-off time and count are given back to the caller for emitting the error messages as appropriately. We could later add configuration for get_sha1_basic() to make it an error instead of it being just a warning. Signed-off-by: Junio C Hamano <junkio@cox.net>
* dwim_ref(): Separate name-to-ref DWIM code out.Junio C Hamano2007-01-19
| | | | | | | I'll be using this in another function to figure out what to pass to resolve_ref(). Signed-off-by: Junio C Hamano <junkio@cox.net>
* config_set_multivar(): disallow newlines in keysJohannes Schindelin2007-01-19
| | | | | | | | | This will no longer work: $ git repo-config 'key.with newline' some-value Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>