summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2008-08-22Extend "checkout --track" DWIM to support more casesLibravatar Alex Riesen4-17/+46
The code handles additionally "refs/remotes/<something>/name", "remotes/<something>/name", and "refs/<namespace>/name". Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-22Revert "Convert output messages in merge-recursive to past tense."Libravatar Jonathan del Strother1-18/+18
During a conflicting merge, you would typically see: Auto-merged foo.txt CONFLICT (content): Merge conflict in foo.txt Recorded preimage for 'foo.txt' Automatic merge failed; fix conflicts and then commit the result. and left wondering what happened to "foo.txt". Did it succeed, and then conflicted, and then what? This is because historically there was a progress bar displayed before the auto-merge is mentioned, and it was expected to take long time, before we can say "Auto-merged foo.txt". It turns out it was not the case, and the original wording "Auto-merging foo.txt" we used to have before 89f40be (Convert output messages in merge-recursive to past tense., 2007-01-14) is better. Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-22templates/Makefile: install is unnecessary, just use mkdir -pLibravatar Junio C Hamano1-2/+2
The native install on some platforms (namely IRIX 6.5) treats non-absolute paths as being relative to the root directory rather than relative to the current directory. Work around this by avoiding install in this case since it is unnecessary, and instead depend on the local umask setting and use mkdir. Tested-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-22remote.c: add a function for deleting a refspec array and use it (twice)Libravatar Brandon Casey2-2/+28
A number of call sites allocate memory for a refspec array, populate its members with heap memory, and then free only the refspec pointer while leaking the memory allocated for the member elements. Provide a function for freeing the elements of a refspec array and the array itself. Caution to callers: code paths must be checked to ensure that the refspec members "src" and "dst" can be passed to free. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-21filter-branch: Grok special characters in tag namesLibravatar Johannes Sixt2-5/+15
The tag rewriting code used a 'sed' expression to substitute the new tag name into the corresponding field of the annotated tag object. But this is problematic if the tag name contains special characters. In particular, if the tag name contained a slash, then the 'sed' expression had a syntax error. We now protect against this by using 'printf' to assemble the tag header. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-21test-lib: do not remove trash_directory if called with --debugLibravatar Johannes Schindelin1-1/+1
Sometimes you want to keep the trash directory, even if all tests passed. For example, when extending tests, it comes it quite handy. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-21provide more errors for the "merge into empty head" caseLibravatar Paolo Bonzini1-0/+5
A squash merge into an unborn branch could be implemented by building the index from the merged-from branch, and doing a single commit, but this is not supported yet. A non-fast-forward merge into an unborn branch does not make any sense, because you cannot make a merge commit if you don't have a commit to use as the parent. Signed-off-by: Paolo Bonzini <bonzini@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-21Make reflog query '@{1219188291}' act as '@{2008.8.19.16:24:51.-0700}'Libravatar Shawn O. Pearce1-1/+4
As we support seconds-since-epoch in $GIT_COMMITTER_TIME we should also support it in a reflog @{...} style notation. We can easily tell this part from @{nth} style notation by looking to see if the value is unreasonably large for an @{nth} style notation. The value 100000000 was chosen as it is already used by date.c to disambiguate yyyymmdd format from a seconds-since-epoch time value. A reflog with 100,000,000 record entries is also simply not valid. Such a reflog would require at least 7.7 GB to store just the old and new SHA-1 values. So our randomly chosen upper limit for @{nth} notation is "big enough". Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-21config.mak.in: Pass on LDFLAGS from configureLibravatar Neil Roberts1-0/+1
The configure script allows you to specify flags to pass to the linker step in the LDFLAGS environment variable but this was being ignored in the Makefile. Now a make variable gets set to the value passed down from the configure script. Signed-off-by: Neil Roberts <bpeeluk@yahoo.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-21Merge branch 'maint'Libravatar Junio C Hamano3-4/+10
* maint: compat/snprintf.c: handle snprintf's that always return the # chars transmitted git-svn: fix dcommit to urls with embedded usernames revision.h: make show_early_output an extern which is defined in revision.c
2008-08-21compat/snprintf.c: handle snprintf's that always return the # chars transmittedLibravatar Brandon Casey1-0/+4
Some platforms provide a horribly broken snprintf. More broken than the platforms that return -1 when there is too little space in the target buffer for the formatted string. Some platforms provide an snprintf which _always_ returns the number of characters transmitted to the buffer, regardless of whether there was enough space or not. IRIX 6.5 is such a platform. IRIX does have a working snprintf(), but it is only provided when _NO_XOPEN5 evaluates to zero, and this only happens if _XOPEN_SOURCE is defined, but definition of _XOPEN_SOURCE prevents inclusion of many other common functions and defines. So it must be avoided. Work around these horribly broken snprintf implementations by detecting an snprintf call which results in the number of transmitted characters exactly equal to the length of our buffer and retrying with a larger buffer just to be safe. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Acked-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-20Teach "git diff -p" HTML funcname patternsLibravatar Johan Herland2-2/+5
Find lines with <h1>..<h6> tags. [jc: while at it, reordered entries to sort alphabetically.] Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-20Teach "git diff -p" Python funcname patternsLibravatar Kirill Smelkov2-0/+3
Find classes, functions, and methods definitions. Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-20git-svn: fix dcommit to urls with embedded usernamesLibravatar Eric Wong1-3/+5
Don't rely on the extracted URL from working_head_info since that has the username removed. Instead use the $gs->full_url method (as before with ba24e74 (git-svn: add ability to specify --commit-url for dcommit, 2008-08-07)) to give us the URL to commit to if --commit-url is not specified. Aditionally, since we clean usernames from URLs, checking the URL after rebase can fail because it doesn't match the URL we used to commit; so unconditionally provide a username-free URL for checking the result of the refetch. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-20Merge branch 'ml/submodule-foreach'Libravatar Junio C Hamano2-2/+39
* ml/submodule-foreach: git-submodule - Add 'foreach' subcommand
2008-08-20Merge branch 'pm/log-exit-code'Libravatar Junio C Hamano2-2/+11
* pm/log-exit-code: Teach git log --exit-code to return an appropriate exit code Teach git log --check to return an appropriate exit code
2008-08-20Merge branch 'sb/commit-tree-minileak'Libravatar Junio C Hamano1-1/+4
* sb/commit-tree-minileak: Fix commit_tree() buffer leak
2008-08-20Merge branch 'pb/reflog-dwim'Libravatar Junio C Hamano1-4/+4
* pb/reflog-dwim: builtin-reflog: Allow reflog expire to name partial ref
2008-08-20Merge branch 'jc/add-stop-at-symlink'Libravatar Junio C Hamano4-3/+45
* jc/add-stop-at-symlink: add: refuse to add working tree items beyond symlinks update-index: refuse to add working tree items beyond symlinks
2008-08-20Merge branch 'kh/diff-tree'Libravatar Junio C Hamano3-17/+72
* kh/diff-tree: Add test for diff-tree --stdin with two trees Teach git diff-tree --stdin to diff trees diff-tree: Note that the commit ID is printed with --stdin Refactoring: Split up diff_tree_stdin
2008-08-20Merge branch 'mg/count-objects'Libravatar Junio C Hamano3-3/+7
* mg/count-objects: count-objects: Add total pack size to verbose output
2008-08-20Merge branch 'mz/push-verbose'Libravatar Junio C Hamano1-2/+11
* mz/push-verbose: Make push more verbose about illegal combination of options
2008-08-20Merge branch 'jc/index-extended-flags'Libravatar Junio C Hamano2-0/+5
* jc/index-extended-flags: index: future proof for "extended" index entries
2008-08-20Merge branch 'cc/merge-base-many'Libravatar Junio C Hamano5-28/+133
* cc/merge-base-many: git-merge-octopus: use (merge-base A (merge B C D E...)) for stepwise merge merge-base-many: add trivial tests based on the documentation documentation: merge-base: explain "git merge-base" with more than 2 args merge-base: teach "git merge-base" to drive underlying merge_bases_many()
2008-08-20Merge branch 'jc/test-deeper'Libravatar Junio C Hamano50-131/+152
* jc/test-deeper: tests: use $TEST_DIRECTORY to refer to the t/ directory
2008-08-20Merge branch 'js/parallel-test'Libravatar Junio C Hamano4-7/+14
* js/parallel-test: Update t/.gitignore to ignore all trash directories Enable parallel tests tests: Clarify dependencies between tests, 'aggregate-results' and 'clean' t9700: remove useless check
2008-08-20revision.h: make show_early_output an extern which is defined in revision.cLibravatar Brandon Casey1-1/+1
The variable show_early_output is defined in revision.c and should be declared extern in revision.h so that the linker does not complain about multiply defined variables. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-20Update draft release notes for 1.6.1Libravatar Junio C Hamano1-5/+21
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-20Merge branch 'maint'Libravatar Junio C Hamano18-23/+108
* maint: Update draft release notes for 1.6.0.1 Add hints to revert documentation about other ways to undo changes Install templates with the user and group of the installing personality "git-merge": allow fast-forwarding in a stat-dirty tree completion: find out supported merge strategies correctly decorate: allow const objects to be decorated for-each-ref: cope with tags with incomplete lines diff --check: do not get confused by new blank lines in the middle remote.c: remove useless if-before-free test mailinfo: avoid violating strbuf assertion git format-patch: avoid underrun when format.headers is empty or all NLs
2008-08-20Update draft release notes for 1.6.0.1Libravatar Junio C Hamano1-2/+18
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-20Add hints to revert documentation about other ways to undo changesLibravatar Tarmigan Casebolt1-0/+9
Based on its name, people may read the 'git revert' documentation when they want to undo local changes, especially people who have used other SCM's. 'git revert' may not be what they had in mind, but git provides several other ways to undo changes to files. We can help them by pointing them towards the git commands that do what they might want to do. Cc: Daniel Barkalow <barkalow@iabervon.org> Cc: Lea Wiemann <lewiemann@gmail.com> Signed-off-by: Tarmigan Casebolt <tarmigan+git@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-20Install templates with the user and group of the installing personalityLibravatar Johannes Sixt1-1/+1
If 'make install' was run with sufficient privileges, then the installed templates, which are copied using 'tar', would receive the user and group of whoever built git. This instructs 'tar' to ignore the user and group that are recorded in the archive. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-20"git-merge": allow fast-forwarding in a stat-dirty treeLibravatar Junio C Hamano2-1/+11
We used to refresh the index to clear stat-dirtyness before a fast-forward merge. Recent C rewrite forgot to do this. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-20completion: find out supported merge strategies correctlyLibravatar Junio C Hamano1-6/+8
"git-merge" is a binary executable these days, and looking for assignment to $all_strategies variable with grep/sed does not work well. When asked for an unknown strategy, pre-1.6.0 and post-1.6.0 "git merge" commands respectively say: $ $HOME/git-snap-v1.5.6.5/bin/git merge -s help available strategies are: recur recursive octopus resolve stupid ours subtree $ $HOME/git-snap-v1.6.0/bin/git merge -s help Could not find merge strategy 'help'. Available strategies are: recursive octopus resolve ours subtree. both on their standard error stream. We can use this to learn what strategies are supported. The sed script is written in such a way that it catches both old and new message styles ("Available" vs "available", and the full stop at the end). It also allows future versions of "git merge" to line-wrap the list of strategies, and add extra comments, like this: $ $HOME/git-snap-v1.6.1/bin/git merge -s help Could not find merge strategy 'help'. Available strategies are: blame recursive octopus resolve ours subtree. Also you have custom strategies: theirs Make sure you spell strategy names correctly. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-20decorate: allow const objects to be decoratedLibravatar Jeff King2-8/+9
We don't actually modify the struct object, so there is no reason not to accept const versions (and this allows other callsites, like the next patch, to use the decoration machinery). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-20for-each-ref: cope with tags with incomplete linesLibravatar Junio C Hamano2-1/+13
If you have a tag with a single, incomplete line as its payload, asking git-for-each-ref for its %(body) element accessed a NULL pointer. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-20diff --check: do not get confused by new blank lines in the middleLibravatar Junio C Hamano2-0/+12
The code remembered that the last diff output it saw was an empty line, and tried to reset that state whenever it sees a context line, a non-blank new line, or a new hunk. However, this codepath asks the underlying diff engine to feed diff without any context, and the "just saw an empty line" state was not reset if you added a new blank line in the last hunk of your patch, even if it is not the last line of the file. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-19Merge branch 'bd/diff-strbuf'Libravatar Junio C Hamano5-71/+53
* bd/diff-strbuf: xdiff-interface: hide the whole "xdiff_emit_state" business from the caller Use strbuf for struct xdiff_emit_state's remainder Make xdi_diff_outf interface for running xdiff_outf diffs
2008-08-19Merge branch 'dp/hash-literally'Libravatar Junio C Hamano5-122/+178
* dp/hash-literally: add --no-filters option to git hash-object add --path option to git hash-object use parse_options() in git hash-object correct usage help string for git-hash-object correct argument checking test for git hash-object teach index_fd to work with pipes
2008-08-19Merge branch 'js/checkout-dwim-local'Libravatar Junio C Hamano3-4/+38
* js/checkout-dwim-local: checkout --track: make up a sensible branch name if '-b' was omitted
2008-08-19Merge branch 'ph/enable-threaded'Libravatar Junio C Hamano1-0/+5
* ph/enable-threaded: Enable threaded delta search on *BSD and Linux.
2008-08-19Merge branch 'jk/pager-swap'Libravatar Junio C Hamano3-44/+14
* jk/pager-swap: spawn pager via run_command interface run-command: add pre-exec callback
2008-08-19Merge branch 'rs/imap'Libravatar Junio C Hamano4-423/+586
* rs/imap: Documentation: Improve documentation for git-imap-send(1) imap-send.c: more style fixes imap-send.c: style fixes git-imap-send: Support SSL git-imap-send: Allow the program to be run from subdirectories of a git tree
2008-08-19Merge branch 'js/mingw-stat'Libravatar Junio C Hamano5-43/+26
* js/mingw-stat: Revert "Windows: Use a customized struct stat that also has the st_blocks member." compat: introduce on_disk_bytes()
2008-08-19remote.c: remove useless if-before-free testLibravatar Jim Meyering1-2/+1
We removed a handful of these useless if-before-free tests several months ago. This change removes a new one that snuck back in. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-19mailinfo: avoid violating strbuf assertionLibravatar Jeff King4-1/+25
In handle_from, we calculate the end boundary of a section to remove from a strbuf using strcspn like this: el = strcspn(buf, set_of_end_boundaries); strbuf_remove(&sb, start, el + 1); This works fine if "el" is the offset of the boundary character, meaning we remove up to and including that character. But if the end boundary didn't match (that is, we hit the end of the string as the boundary instead) then we want just "el". Asking for "el+1" caught an out-of-bounds assertion in the strbuf library. This manifested itself when we got a 'From' header that had just an email address with nothing else in it (the end of the string was the end of the address, rather than, e.g., a trailing '>' character), causing git-mailinfo to barf. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-19reword --full-index descriptionLibravatar Jim Meyering1-3/+3
Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-19SubmittingPatches: fix a typoLibravatar Jim Meyering1-1/+1
Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-19add boolean diff.suppress-blank-empty config optionLibravatar Jim Meyering3-0/+56
GNU diff's --suppress-blank-empty option makes it so that diff no longer outputs trailing white space unless the input data has it. With this option, empty context lines are now empty also in diff -u output. Before, they would have a single trailing space. * diff.c (diff_suppress_blank_empty): New global. (git_diff_basic_config): Set it. (fn_out_consume): Honor it. * t/t4029-diff-trailing-space.sh: New file. * Documentation/config.txt: Document it. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-19git format-patch: avoid underrun when format.headers is empty or all NLsLibravatar Jim Meyering1-1/+1
* builtin-log.c (add_header): Avoid a buffer underrun when format.headers is empty or all newlines. Reproduce with this: git config format.headers '' && git format-patch -1 Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>