aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* 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>
* rename --exec to --receive-pack for push and send-packUwe Kleine-König2007-01-19
| | | | | | | | | | | For now it's just to get a more descriptive name. Later we might update the push protocol to run more than one program on the other end. Moreover this matches better the corresponding config option remote.<name>. receivepack. --exec continues to work Signed-off-by: Uwe Kleine-König <zeisberg@informatik.uni-freiburg.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* make --exec=... option to git-push configurableUwe Kleine-König2007-01-19
| | | | | | | | | | | Having to specify git push --exec=... is annoying if you cannot have git-receivepack in your PATH on the remote side (or don't want to). This introduces the config item remote.<name>.receivepack to override the default value (which is "git-receive-pack"). Signed-off-by: Uwe Kleine-König <zeisberg@informatik.uni-freiburg.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Update documentation of fetch-pack, push and send-packUwe Kleine-König2007-01-19
| | | | | | | add all supported options to Documentation/git-....txt and the usage strings. Signed-off-by: Uwe Kleine-König <zeisberg@informatik.uni-freiburg.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation/git.txt: command re-classificationJunio C Hamano2007-01-19
| | | | | | | | | | | | This adds two new classes (pure-helpers and "Interacting with Others") to the command list in the main manual page. The latter class is primarily about foreign SCM interface and is placed before low-level (plumbing) commands. Also it promotes a handful commands to mainporcelain category while demoting some others. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: generated cmds-*.txt does not depend on git.txtJunio C Hamano2007-01-19
| | | | | | Pointed out by Santi. Signed-off-by: Junio C Hamano <junkio@cox.net>
* refs.c::read_ref_at(): fix bogus munmap() call.Junio C Hamano2007-01-19
| | | | | | | The code uses mmap() to read reflog data, but moves the pointer around while reading, and uses that updated pointer in the call to munmap(). Signed-off-by: Junio C Hamano <junkio@cox.net>
* for_each_reflog_ent: do not leak FILE *Junio C Hamano2007-01-18
| | | | | | | The callback function can signal an early return by returning non-zero, but the function leaked the FILE * opened on the reflog when doing so. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: Generate command lists.Junio C Hamano2007-01-18
| | | | | | | | This moves the source of the list of commands and categorization to the end of Documentation/cmd-list.perl, so that re-categorization and re-ordering would become easier to manage. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: sync git.txt command list and manual page titleJunio C Hamano2007-01-18
| | | | | | | Also reorders a handful entries to make each list sorted alphabetically. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: move command list in git.txt into separate files.Junio C Hamano2007-01-18
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* prune-packed: add -q to usageMatthias Lederhofer2007-01-18
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Document --ignore-if-in-upstream in git-format-patchDavid Kågedal2007-01-18
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Shell syntax fix in git-resetDavid Kågedal2007-01-18
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Use standard -t option for touch.Simon 'corecode' Schubert2007-01-18
| | | | | | | | | Non-GNU touch do not have the -d option to take free form date strings. The POSIX -t option should be more widespread. For this to work, date needs to output YYYYMMDDHHMM.SS date strings. Signed-off-by: Simon 'corecode' Schubert <corecode@fs.ei.tum.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Use fixed-size integers for .idx file I/OJunio C Hamano2007-01-18
| | | | | | This attempts to finish what Simon started in the previous commit. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Use fixed-size integers for the on-disk pack structure.Simon 'corecode' Schubert2007-01-18
| | | | | | | | | | Plain integer types without a fixed size can vary between platforms. Even though all common platforms use 32-bit ints, there is no guarantee that this won't change at some point. Furthermore, specifying an integer type with explicit size makes the definition of structures more obvious. Signed-off-by: Simon 'corecode' Schubert <corecode@fs.ei.tum.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-format-patch: the default suffix is now .patch, not .txtJunio C Hamano2007-01-17
| | | | | | | Editors often give easier handling of patch files if the filename ends with .patch, so use it instead of .txt. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-format-patch: make --binary on by defaultJunio C Hamano2007-01-17
| | | | | | | | It does not make much sense to generate a patch that cannot be applied. If --text is specified on the command line it still takes precedence. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add --summary to git-format-patch by defaultJunio C Hamano2007-01-17
| | | | | | | | | | This adds --summary output in addition to the --stat to the output from git-format-patch by default. I think additions, removals and filemode changes are rare but notable events and always showing it makes sense. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-format-patch -3Junio C Hamano2007-01-17
| | | | | | | | | | This teaches "git-format-patch" to honor the --max-count parameter revision traversal machinery takes, so that you can say "git-format-patch -3" to process the three topmost commits from the current HEAD (or "git-format-patch -2 topic" to name a specific branch). Signed-off-by: Junio C Hamano <junkio@cox.net>
* Document pack .idx file format upgrade strategy.Shawn O. Pearce2007-01-17
| | | | | | | | | | | | | | | | | | | | | | | | Way back when Junio developed the 64 bit index topic he came up with a means of changing the .idx file format so that older Git clients would recognize that they don't understand the file and refuse to read it, while newer clients could tell the difference between the old-style and new-style .idx files. Unfortunately this wasn't recorded anywhere. This change documents how we might go about changing the .idx file format by using a special signature in the first four bytes. Credit (and possible blame) goes completely to Junio for thinking up this technique. The change also modifies the error message of the current Git code so that users get a recommendation to upgrade their Git software should this version or later encounter a new-style .idx which it cannot process. We already do this for the .pack files, but since we usually process the .idx files first its important that these files are recognized and encourage an upgrade. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Refer users to git-rev-parse for revision specification syntax.Shawn O. Pearce2007-01-17
| | | | | | | | | | The revision specification syntax (sometimes referred to as SHA1-expressions) is accepted almost everywhere in Git by almost every tool. Unfortunately it is only documented in git-rev-parse.txt, and most users don't know to look there. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Document the master@{n} reflog query syntax.Shawn O. Pearce2007-01-17
| | | | | | | | | In ab2a1a32 Junio improved the reflog query logic to support obtaining the n-th prior value of a ref, but this was never documented in git-rev-parse. Now it is. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation/git-parse-remote.txt: we deal with config vars as wellJunio C Hamano2007-01-17
| | | | | | ... but we never documented it. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: m can be relative in "git-blame -Ln,m"Junio C Hamano2007-01-17
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: suggest corresponding Porcelain-level in plumbing docs.Junio C Hamano2007-01-17
| | | | | | | | Instead of keeping the confused end user reading low-level documentation, suggest the higher level commands that implement what the user may want to do using them upfront. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation/git-resolve: deprecated.Junio C Hamano2007-01-17
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* sanitize content of README fileNicolas Pitre2007-01-17
| | | | | | | | | | | | Current README content is way too esoteric for someone looking at GIT for the first time. Instead it should provide a quick summary of what GIT is with a few pointers to other resources. The bulk of the previous README content is moved to Documentation/core-intro.txt. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-format-patch: do not crash with format.headers without value.Junio C Hamano2007-01-17
| | | | | | | | | | | An incorrect config file can say: [format] headers and crash the parsing. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Introduce 'git-format-patch --suffix=.patch'Junio C Hamano2007-01-17
| | | | | | | The default can also be changed with "format.suffix" configuration. Leaving it empty would not add any suffix. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation/glossary.txt: describe remotes/ tracking and packed-refsJunio C Hamano2007-01-17
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation/glossary.txt: unpacked objects are loose.Junio C Hamano2007-01-17
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: describe shallow repositoryJunio C Hamano2007-01-17
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Make a short-and-sweet "git-add -i" synonym for "git-add --interactive"Junio C Hamano2007-01-17
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: detached HEADJunio C Hamano2007-01-17
| | | | | | | Add discussion section to git-checkout documentation and mention detached HEAD in repository-layout document. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: a few spelling fixesRené Scharfe2007-01-17
| | | | | Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation/git-sh-setup.txt: programmer's docsJunio C Hamano2007-01-17
| | | | | | | Clarify that this is not meant for end users, and list what shell functions are defined. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation/git-whatchanged.txt: show -<n> instead of --max-count.Junio C Hamano2007-01-17
| | | | | | ... to match the change we did earlier to git-log documentation. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation/git-status.txt: mention color configurationJunio C Hamano2007-01-17
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation/git-tar-tree.txt: default umask is now 002Junio C Hamano2007-01-17
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation/git-tools.txt: mention tig and refer to wikiJunio C Hamano2007-01-17
| | | | | | | In general list at Wiki seems to be maintained a lot better than this list. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation/git-tag: the command can be used to also verify a tag.Junio C Hamano2007-01-17
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation/SubmittingPatches: Gnus tipsJunio C Hamano2007-01-17
| | | | | | Also warn about format=flowed (aka 'flawed'). Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-commit: document log message formatting conventionJunio C Hamano2007-01-16
| | | | | | Take it from the tutorial, since not everybody necessarily reads it. Signed-off-by: Junio C Hamano <junkio@cox.net>
* cache.h; fix a couple of prototypesChris Wedgwood2007-01-16
| | | | | | Trivial patch. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Document where configuration files are in config.txtJunio C Hamano2007-01-16
| | | | | | | Talking about what the files contain without talking about where they are does not help new users. Signed-off-by: Junio C Hamano <junkio@cox.net>