- 19 8月, 2007 9 次提交
-
-
由 Shawn O. Pearce 提交于
As fast-import is quite strict about its input and die()'s anytime something goes wrong it can be difficult for a frontend developer to troubleshoot why fast-import rejected their input, or to even determine what input command it rejected. This change introduces a custom handler for Git's die() routine. When we receive a die() for any reason (fast-import or a lower level core Git routine we called) the error is first dumped onto stderr and then a more extensive crash report file is prepared in GIT_DIR. Finally we exit the process with status 128, just like the stock builtin die handler. An internal flag is set to prevent any further die()'s that may be invoked during the crash report generator from causing us to enter into an infinite loop. We shouldn't die() from our crash report handler, but just in case someone makes a future code change we are prepared to gaurd against small mistakes turning into huge problems for the end-user. Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
-
由 Shawn O. Pearce 提交于
The existing checkpoint command is very useful to force fast-import to dump the branches out to disk so that standard Git tools can access them and the objects they refer to. However there was not a way to know when fast-import had finished executing the checkpoint and it was safe to read those refs. The progress command can be used to make fast-import output any message of the frontend's choosing to standard out. The frontend can scan for these messages using select() or poll() to monitor a pipe connected to the standard output of fast-import. Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
-
由 Shawn O. Pearce 提交于
For the same reasons as the prior change we want to allow frontends to omit the trailing LF that usually delimits commands. In some cases these just make the input stream more verbose looking than it needs to be, and its just simpler for the frontend developer to get started if our parser is slightly more lenient about where an LF is required and where it isn't. To make this optional LF feature work we now have to buffer up to one line of input in command_buf. This buffering can happen if we look at the current input command but don't recognize it at this point in the code. In such a case we need to "unget" the entire line, but we cannot depend upon the stdio library to let us do ungetc() for that many characters at once. Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
-
由 Shawn O. Pearce 提交于
A few fast-import frontend developers have found it odd that we require the LF following a `data` command, especially in the exact byte count format. Technically we don't need this LF to parse the stream properly, but having it here does make the stream more readable to humans. We can easily make the LF optional by peeking at the next byte available from the stream and pushing it back into the buffer if its not LF. Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
-
由 Shawn O. Pearce 提交于
Several frontend developers have asked that some form of stream comments be permitted within a fast-import data stream. This way they can include information from their own frontend program about where specific data was taken from in the source system, or about a decision that their frontend may have made while creating the fast-import data stream. This change introduces comments in the Bourne-shell/Tcl/Perl style. Lines starting with '#' are ignored, up to and including the LF. Unlike the above mentioned three languages however we do not look for and ignore leading whitespace. This just simplifies the definition of the comment format and the code that parses them. To make comments work we had to stop using read_next_command() within cmd_data() and directly invoke read_line() during the inline variant of the function. This is necessary to retain any lines of the input data that might otherwise look like a comment to fast-import. Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
-
由 Shawn O. Pearce 提交于
Instead of growing our buffer by hand during the inline variant of cmd_data() we can save a few lines of code and just use the nifty new ALLOC_GROW macro already available to us. Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
-
由 Shawn O. Pearce 提交于
Michael Haggerty <mhagger@alum.mit.edu> noticed while debugging a Git backend for cvs2svn that fast-import was barfing when he tried to use "TAG_FIXUP" as a branch name for temporary work needed to cleanup the tree prior to creating an annotated tag object. The reason we were rejecting the branch name was check_ref_format() returns -2 when there are less than 2 '/' characters in the input name. TAG_FIXUP has 0 '/' characters, but is technically just as valid of a ref as HEAD and MERGE_HEAD, so we really should permit it (and any other similar looking name) during import. New test cases have been added to make sure we still detect very wrong branch names (e.g. containing [ or starting with .) and yet still permit reasonable names (e.g. TAG_FIXUP). Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
-
由 Alex Riesen 提交于
Something probably assumed that HT indentation is 4 characters. Signed-off-by: NAlex Riesen <raa.lkml@gmail.com> Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
-
由 Mark Levedahl 提交于
Signed-off-by: NMark Levedahl <mdl123@verizon.net> Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
-
- 18 8月, 2007 3 次提交
-
-
由 Mike Hommey 提交于
As per http://marc.info/?l=git&m=118737219702802&w=2 , clarify git-commit-tree documentation. Signed-off-by: NMike Hommey <mh@glandium.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Brian Gernhardt 提交于
- Remove "DESTBRANCH" from usage, as it rewrites the branches given. - Remove an = from an example usage, as the script doesn't understand it. Signed-off-by: NBrian Gernhardt <benji@silverinsanity.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Sean Estabrooks 提交于
Signed-off-by: NSean Estabrooks <seanlkml@sympatico.ca> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 17 8月, 2007 5 次提交
-
-
由 Lars Hjemli 提交于
This was broken as part of ecda0723. Signed-off-by: NLars Hjemli <hjemli@gmail.com> Acked-by: NSven Verdoolaege <skimo@kotnet.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Junio C Hamano 提交于
This is a follow-up to f34f2b0b; list_tree() function is where it first notices that the command line fed too many trees for us to handle, so move the error exit message to there, and raise the MAX_TREES to 8 (not that it matters very much in practice). Acked-by: NLinus Torvalds <torvalds@linux-foundation.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Brian Downing 提交于
Signed-off-by: NBrian Downing <bdowning@lavos.net> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Arjen Laarhoven 提交于
The t1301-shared-repo.sh testscript uses /usr/bin/stat to get the file mode, which isn't portable. Implement the test in shell using 'ls' as shown by Junio. Signed-off-by: NArjen Laarhoven <arjen@yaph.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Junio C Hamano 提交于
The example miscounted the commit to rebase from. Noticed by Cliff Brake. Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 16 8月, 2007 11 次提交
-
-
由 Junio C Hamano 提交于
This is a stop-gap to work around problem with git-init without intrusive changes. Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Nicolas Pitre 提交于
Not only are they unused, but the order in the function declaration and the actual usage don't match. Signed-off-by: NNicolas Pitre <nico@cam.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Sven Verdoolaege 提交于
Apply "Subproject commit HEX" changes produced by git-diff. As usual in the current git, only the superproject itself is actually modified (possibly creating empty directories for new submodules). Any checked-out submodule is left untouched and is not required to be up-to-date. With clean-ups from Junio C Hamano. Signed-off-by: NSven Verdoolaege <skimo@kotnet.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Junio C Hamano 提交于
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Junio C Hamano 提交于
* maint: GIT 1.5.2.5 git-add -u paths... now works from subdirectory Fix "git add -u" data corruption.
-
由 Junio C Hamano 提交于
For multi-base merges, we allowed read-tree -m to take more than three trees (the last two are our and their branches, and all the earlier ones, typically one but potentially more, are used as the merge base). Unfortunately, the conversion done by commit 933bf40a broke this. Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Junio C Hamano 提交于
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Salikh Zakirov 提交于
git-add -u also takes the path limiters, but unlike the command without the -u option, the code forgot that it could be invoked from a subdirectory, and did not correctly handle the prefix. Signed-off-by: NSalikh Zakirov <salikh@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Junio C Hamano 提交于
This applies to 'maint' to fix a rather serious data corruption issue. When "git add -u" affects a subdirectory in such a way that the only changes to its contents are path removals, the next tree object written out of that index was bogus, as the remove codepath forgot to invalidate the cache-tree entry. Reported by Salikh Zakirov. Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 René Scharfe 提交于
Always free .paths if .strdup_paths is set, no matter if the parameter free_items is set or not, plugging a minor memory leak. And to clarify the meaning of the flag, rename it to free_util, since it now only affects the freeing of the .util field. Signed-off-by: NRene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Eric Wong 提交于
Running git-svn log <ref> -r<rev> against a <ref> other than the current HEAD did not work if the <rev> was exclusive to the other branch. Signed-off-by: NEric Wong <normalperson@yhbt.net> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 15 8月, 2007 9 次提交
-
-
由 Junio C Hamano 提交于
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Junio C Hamano 提交于
This makes .gitattributes files to be read from the index when they are not checked out to the work tree. This is in line with the way we always allowed low-level tools to operate in sparsely checked out work tree in a reasonable way. It swaps the order of new file creation and converting the blob to work tree representation; otherwise when we are in the middle of checking out .gitattributes we would notice an empty but unwritten .gitattributes file in the work tree and will ignore the copy in the index. Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Junio C Hamano 提交于
This splits out a common routine that parses a single line of attribute file and adds it to the attr_stack. It should not change any behaviour, other than attrs array in the attr_stack structure is now grown with alloc_nr() macro, instead of one by one, which relied on xrealloc() to give enough slack to be efficient enough. Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Brian Downing 提交于
We can now read .gitattributes files out of the index, but the index must be loaded for this to work. Signed-off-by: NBrian Downing <bdowning@lavos.net> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 René Scharfe 提交于
When we compare two non-tracked files, or explicitly specify --no-index, the suggestion to run git-status is not helpful. The patch adds a new diff_options bitfield member, no_index, that is used instead of the special value of -2 of the rev_info field max_count to indicate that the index is not to be used. This makes it possible to pass that flag down to diffcore_skip_stat_unmatch(), which only has one diff_options parameter. This could even become a cleanup if we removed all assignments of max_count to a value of -2 (viz. replacement of a magic value with a self-documenting field name) but I didn't dare to do that so late in the rc game.. The no_index bit, if set, then tells diffcore_skip_stat_unmatch() to not account for any skipped stat-mismatches, which avoids the suggestion to run git-status. Signed-off-by: NRene Scharfe <rene.scharfe@lsfire.ath.cx> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
xmkstemp() performs error checking and prints a standard error message when an error occur. Signed-off-by: NLuiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
This is a wrapper for mkstemp() that performs error checking and calls die() when an error occur. Signed-off-by: NLuiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
Print the index version when an error occurs so the user knows what type of header (and size) we thought the index should have had. Signed-off-by: NLuiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Junio C Hamano 提交于
When you try to merge a path that involves binary file-level merge, merge-recursive died rudely without cleaning up its own mess. A files added by the merge were left in the working tree, but the index was not written out (because it just punted and died), so it was cumbersome for the user to retry it by first running "git reset --hard". This changes merge-recursive to still warn but do the "binary" merge for such a path; leave the "our" version in the working tree, but still keep the path unmerged so that the user can sort it out. Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 14 8月, 2007 3 次提交
-
-
由 Marco Costalba 提交于
With this option git-log prints log message size just before the corresponding message. Porcelain tools could use this to speedup parsing of git-log output. Note that size refers to log message only. If also patch content is shown its size is not included. In case it is not possible to know the size upfront size value is set to zero. Signed-off-by: NMarco Costalba <mcostalba@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Junio C Hamano 提交于
After starting to edit a working tree file but later when your edit ends up identical to the original (this can also happen when you ran a wholesale regexp replace with something like "perl -i" that does not actually modify many of the paths), "git diff" between the index and the working tree outputs many "empty" diffs that show "diff --git" headers and nothing else, because these paths are stat-dirty. While it was a way to warn the user that the earlier action of the user made the index ineffective as an optimization mechanism, it was felt too loud for the purpose of warning even to experienced users, and also resulted in confusing people new to git. This replaces the "empty" diffs with a single warning message at the end. Having many such paths hurts performance, and you can run "git-update-index --refresh" to update the lstat(2) information recorded in the index in such a case. "git-status" does so as a side effect, and that is more familiar to the end-user, so we recommend it to them. The change affects only "git diff" that outputs patch text, because that is where the annoyance of too many "empty" diff is most strongly felt, and because the warning message can be safely ignored by downstream tools without getting mistaken as part of the patch. For the low-level "git diff-files" and "git diff-index", the traditional behaviour is retained. Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Steffen Prohaska 提交于
The first thing we teach in the tutorial is to set the default identity in $HOME/.gitconfig using "git config --global". The suggestion in the error message should match the order, while hinting that per repository identity can later be configured differently. Signed-off-by: NSteffen Prohaska <prohaska@zib.de> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-