* Re: [PATCH] git-diff.txt: add section "output format" describing the diff formats
From: Junio C Hamano @ 2007-11-01 6:33 UTC (permalink / raw)
To: Gerrit Pape; +Cc: git
In-Reply-To: <20071031135916.5625.qmail@134c5e95d8ec4d.315fe32.mid.smarden.org>
Gerrit Pape <pape@smarden.org> writes:
> diff --git a/Documentation/diff-format.txt b/Documentation/diff-format.txt
> index 0015032..a580f18 100644
> --- a/Documentation/diff-format.txt
> +++ b/Documentation/diff-format.txt
> @@ -1,5 +1,5 @@
> -The output format from "git-diff-index", "git-diff-tree" and
> -"git-diff-files" are very similar.
> +The output format from "git-diff-index", "git-diff-tree",
> +"git-diff-files" and "git diff --raw" are very similar.
I like this attention to the detail of mentioning "--raw".
> @@ -62,9 +62,9 @@ respectively.
> diff format for merges
> ----------------------
>
> -"git-diff-tree" and "git-diff-files" can take '-c' or '--cc' option
> -to generate diff output also for merge commits. The output differs
> -from the format described above in the following way:
> +"git-diff-tree", "git-diff-files" and "git-diff" can take '-c' or
> +'--cc' option to generate diff output also for merge commits. The
> +output differs from the format described above in the following way:
... and this part should do so, too.
^ permalink raw reply
* Re: [PATCH] Don't use cpio in git-clone when not installed
From: Mike Hommey @ 2007-11-01 6:31 UTC (permalink / raw)
To: Linus Torvalds; +Cc: git, Junio C Hamano
In-Reply-To: <alpine.LFD.0.999.0710311742170.3342@woody.linux-foundation.org>
On Wed, Oct 31, 2007 at 05:46:40PM -0700, Linus Torvalds wrote:
>
>
> On Wed, 31 Oct 2007, Mike Hommey wrote:
> > + if type cpio > /dev/null 2>&1; then
> > + local=yes
> > + fi
>
> Isn't "type" a bashism?
I think it's POSIX, and since I found the same construct in
git-mergetool.sh, I thought it would be okay for git.
Mike
^ permalink raw reply
* What's cooking in git.git (topics)
From: Junio C Hamano @ 2007-11-01 5:41 UTC (permalink / raw)
To: git
In-Reply-To: <7vzly84qwf.fsf@gitster.siamese.dyndns.org>
Here are the topics that have been cooking. Commits prefixed
with '-' are only in 'pu' while commits prefixed with '+' are
in 'next'. The topics list the commits in reverse chronological
order.
I think it is time to plan freezing for 1.5.4 and this list is a
good place to start.
* js/forkexec (Fri Oct 19 21:48:06 2007 +0200) 14 commits
+ Use the asyncronous function infrastructure to run the content
filter.
+ Avoid a dup2(2) in apply_filter() - start_command() can do it for
us.
+ t0021-conversion.sh: Test that the clean filter really cleans
content.
+ upload-pack: Run rev-list in an asynchronous function.
+ upload-pack: Move the revision walker into a separate function.
+ Use the asyncronous function infrastructure in builtin-fetch-
pack.c.
+ Add infrastructure to run a function asynchronously.
+ upload-pack: Use start_command() to run pack-objects in
create_pack_file().
+ Have start_command() create a pipe to read the stderr of the
child.
+ Use start_comand() in builtin-fetch-pack.c instead of explicit
fork/exec.
+ Use run_command() to spawn external diff programs instead of
fork/exec.
+ Use start_command() to run content filters instead of explicit
fork/exec.
+ Use start_command() in git_connect() instead of explicit
fork/exec.
+ Change git_connect() to return a struct child_process instead of a
pid_t.
I haven't seen anything wrong with this series and we haven't
heard breakages from people on 'next' who have been running with
this for the past ten days. Will merge to 'master'.
* db/remote-builtin (Mon Oct 29 22:03:42 2007 -0400) 4 commits
- Use built-in send-pack.
- Build-in send-pack, with an API for other programs to call.
- Build-in peek-remote, using transport infrastructure.
- Miscellaneous const changes and utilities
Will be in 'next' soon after reviewing it again; hopefully in
'master' before 1.5.4.
* ph/parseopt (Tue Oct 30 14:15:21 2007 -0500) 23 commits
+ Fixed a command line option type for builtin-fsck.c
+ Make builtin-pack-refs.c use parse_options.
+ Make builtin-name-rev.c use parse_options.
+ Make builtin-count-objects.c use parse_options.
+ Make builtin-fsck.c use parse_options.
+ Update manpages to reflect new short and long option aliases
+ Make builtin-for-each-ref.c use parse-opts.
+ Make builtin-symbolic-ref.c use parse_options.
+ Make builtin-update-ref.c use parse_options
+ Make builtin-revert.c use parse_options.
+ Make builtin-describe.c use parse_options
+ Make builtin-branch.c use parse_options.
+ Make builtin-mv.c use parse-options
+ Make builtin-rm.c use parse_options.
+ Port builtin-add.c to use the new option parser.
+ parse-options: allow callbacks to take no arguments at all.
+ parse-options: Allow abbreviated options when unambiguous
+ Add shortcuts for very often used options.
+ parse-options: make some arguments optional, add callbacks.
+ Rework make_usage to print the usage message immediately
+ Add tests for parse-options.c
+ parse-options: be able to generate usages automatically
+ Add a simple option parser.
It appears 1.5.4 will be, to a certain extent, a "Let's clean up
the internal implementation" release. This series should become
part of it. Hopefully will merge to 'master' soon, but I
haven't looked this series very closely yet.
* kh/commit (Mon Sep 17 20:06:47 2007 -0400) 4 commits
+ Export rerere() and launch_editor().
+ Introduce entry point add_interactive and add_files_to_cache
+ Enable wt-status to run against non-standard index file.
+ Enable wt-status output to a given FILE pointer.
These four alone do not change anything user visible, as the
final goal of this series which is "git-commit in C" is not here
yet. But with the other topics touching internal API left and
right that is understandable. Will merge to 'master'.
* sp/help (Sat Oct 27 01:36:55 2007 -0700) 7 commits
+ shell should call the new setup_path() to setup $PATH
+ include $PATH in generating list of commands for "help -a"
+ use only the $PATH for exec'ing git commands
+ list_commands(): simplify code by using chdir()
+ "current_exec_path" is a misleading name, use "argv_exec_path"
+ remove unused/unneeded "pattern" argument of list_commands
+ "git" returns 1; "git help" and "git help -a" return 0
Will merge to 'master'.
* sp/mergetool (Thu Oct 18 12:25:34 2007 +0200) 3 commits
+ mergetool: avoid misleading message "Resetting to default..."
+ mergetool: add support for ECMerge
+ mergetool: use path to mergetool in config var
mergetool.<tool>.path
Will merge to 'master'.
* jc/stash-create (Mon Jul 9 00:51:23 2007 -0700) 2 commits
+ rebase: allow starting from a dirty tree.
+ stash: implement "stash create"
Will revert at least the latter one, but perhaps both, from
'next'. The traditional behaviour of refusing to work in a
dirty tree is much safer, as the tool cannot decide where to
unstash for you.
* js/reflog-delete (Wed Oct 17 02:50:45 2007 +0100) 1 commit
+ Teach "git reflog" a subcommand to delete single entries
This by itself is not useful; will stay in 'next' until it is
used by selective clearing of stash or something else.
* jc/revert-merge (Tue Oct 23 13:33:26 2007 -0700) 1 commit
+ revert/cherry-pick: work on merge commits as well
This allows cherry-pick and revert to act on a merge commit if
you specify which parent to pick the changes from. I think it
would probably be handy when the need arises, but I suspect such
a need is felt only occasionally. I haven't heard any comment
on the list since it was posted. I am somewhat tempted to merge
this, but I am not in a hurry.
* np/progress (Wed Oct 31 23:57:04 2007 -0400) 17 commits
. Show total transferred as part of throughput progress display
- add throughput display to git-push
- add some copyright notice to the progress display code
- add throughput display to index-pack
- add throughput to progress display
- relax usage of the progress API
- make struct progress an opaque type
- prune-packed: don't call display_progress() for every file
+ Stop displaying "Pack pack-$ID created." during git-gc
+ Teach prune-packed to use the standard progress meter
+ Change 'Deltifying objects' to 'Compressing objects'
+ fix for more minor memory leaks
+ fix const issues with some functions
+ pack-objects.c: fix some global variable abuse and memory leaks
+ pack-objects: no delta possible with only one object in the list
+ cope with multiple line breaks within sideband progress messages
+ more compact progress display
This would give us a good usability enhancement. Will merge the
first half to 'master', cook the rest in 'next' and aim to merge
the whole thing before 1.5.4.
* jc/format-patch-encoding (Wed Oct 31 14:55:17 2007 -0700) 1 commit
- format-patch -s: add MIME encoding header if signer's name
requires so
Topic appeared today. I think this is a safe and sane
fix to a real problem. Needs cherry-pick to 'maint'.
* jc/spht (Tue Oct 2 18:00:27 2007 -0700) 1 commit
- git-diff: complain about >=8 consecutive spaces in initial indent
This is a counterpart of an earlier patch from J. Bruce Fields
to change "git-apply --whitespace" to make SP{8,} at the
beginning of line a whitespace error.
Personally, I am in favor of the stricter check, but I had to
reject the "git-apply" patch because there was no way to disable
the additional check without disabling the existing check for
trailing whitespaces. We probably would want to revisit that
one (perhaps with a new option and/or config to selectively
enable different kinds of whitespace check).
* dz/color-addi (Tue Oct 16 21:42:23 2007 -0400) 1 commit
- Add color support to git-add--interactive
I am not a big fan of color, and Shawn's "What's cooking"
mentioned issues with the implementation. Will not merge to
'next'.
* sp/push-refspec (Sun Oct 28 18:46:20 2007 +0100) 6 commits
- push: teach push to pass --verbose option to transport layer
- push: teach push to accept --verbose option
- push: use same rules as git-rev-parse to resolve refspecs
- add ref_abbrev_matches_full_with_rev_parse_rules() comparing
abbrev with full ref name
- rename ref_matches_abbrev() to
ref_abbrev_matches_full_with_fetch_rules()
- push: support pushing HEAD to real branch name
I have been meaning to review these again and merge to 'next'
but it seems I've been spending more time discussing the ones I
did not even pick up for 'pu'. Will try to find time to do so.
* jk/terse-fetch (Fri Oct 19 03:40:57 2007 -0400) 2 commits
- park
- git-fetch: mega-terse fetch output
No change ;-)
* jc/nu (Sun Oct 14 22:07:34 2007 -0700) 3 commits
- merge-nu: a new merge backend without using unpack_trees()
- read_tree: take an explicit index structure
- gcc 4.2.1 -Werror -Wall -ansi -pedantic -std=c99: minimum fix
I was hoping that I can work on this series while in Japan, but
attending funeral and helping others to deal with the fallout
sucked all my energy and time. This is still a wip and not
progressing.
* jc/pathspec (Thu Sep 13 13:38:19 2007 -0700) 3 commits
- pathspec_can_match(): move it from builtin-ls-tree.c to tree.c
- ls-tree.c: refactor show_recursive() and rename it.
- tree-diff.c: split out a function to match a single pattern.
My pet project to unify the pathspec handling between tree-diff
family and ls-files family (one side only knows "in this
directory" match, and the other knows how to handle fnmatch
globs as well). Stalled.
* jk/rename (Tue Oct 30 00:24:42 2007 -0400) 3 commits
. handle renames using similarity engine
. introduce generic similarity library
. change hash table calling conventions
Aiming for a worthy goal, but not merged to 'pu' yet.
* tf/afs (Fri Oct 19 07:38:16 2007 -0500) 1 commit
. Better support AFS hardlinking across object directories
Will drop from topic queue. This is labelled as "AFS hack", but
it hacks around a problem AFS has by breaking the safety we had
from very early days of git for everybody else.
^ permalink raw reply
* What's in git.git (stable)
From: Junio C Hamano @ 2007-11-01 5:39 UTC (permalink / raw)
To: git
In-Reply-To: <20071022061115.GR14735@spearce.org>
* The 'maint' branch has just produced the 1.5.3.5 release.
* The 'master' branch has these since the last announcement
in addition to what's in 1.5.3.5.
- git-bisect enhancements to support "git bisect skip".
- git-fetch rewritten in C for performance and portability.
- git-svnimport is no more --- use git-svn.
- git-send-pack does not update the tracking ref on the local
side for failed push (needs cherry-picking to 'maint').
- git-rebase does not choke when $GIT_DIR has whitespace in it
(needs cherry-picking to 'maint').
- optimize rename detection.
- comes with updated gitk.
The above list makes me realize that it probably is a good
time to start freezing things for 1.5.4. Tonight's "What's
cooking" will talk about what other topics should graduate to
'master' before that happens.
Alex Riesen (1):
Fix a crash in ls-remote when refspec expands into nothing
Alexandre Julliard (4):
git.el: Fix typo in "Reverted file" message.
git.el: Fix typo in git-update-saved-file error handling.
git.el: Refresh only the changed file marks when marking/unmarking
all.
git.el: Run git-gc --auto after commits.
Benoit Sigoure (1):
core-tutorial: Catch up with current Git
Christian Couder (12):
Test suite: reset TERM to its previous value after testing.
rev-list: implement --bisect-all
rev-list documentation: add "--bisect-all".
Bisect: fix some white spaces and empty lines breakages.
Bisect: implement "bisect skip" to mark untestable revisions.
Bisect: refactor "bisect_write_*" functions.
Bisect: refactor some logging into "bisect_write".
Bisect: refactor "bisect_{bad,good,skip}" into "bisect_state".
Bisect: add "bisect skip" to the documentation.
Bisect: add a "bisect replay" test case.
Bisect run: "skip" current commit if script exit code is 125.
Bisect: add "skip" to the short usage string.
Dan McGee (1):
Remove outdated references to cogito in documentation
Daniel Barkalow (15):
Refactor http.h USE_CURL_MULTI fill_active_slots().
Make function to refill http queue a callback
Remove obsolete commit-walkers
Modularize commit-walker
Add uploadpack configuration info to remote.
Report information on branches from remote.h
Make fetch-pack a builtin with an internal API
Push code for transport library
Add matching and parsing for fetch-side refspec rules
Add fetch methods to transport library.
Make fetch a builtin
Allow abbreviations in the first refspec to be merged
Restore default verbosity for http fetches.
Remove duplicate ref matches in fetch
Correct handling of upload-pack in builtin-fetch-pack
David Symonds (3):
gitweb: Provide title attributes for abbreviated author names.
gitweb: Refactor abbreviation-with-title-attribute code.
gitweb: Use chop_and_escape_str in more places.
Gerrit Pape (1):
No longer install git-svnimport, move to contrib/examples
Jakub Narebski (1):
gitweb: Fix and simplify "split patch" detection
Jari Aalto (1):
On error, do not list all commands, but point to --help option
Jeff King (2):
send-pack: don't update tracking refs on error
t5516: test update of local refs on push
Jim Meyering (1):
hooks-pre-commit: use \t, rather than a literal TAB in regexp
Johannes Schindelin (6):
Move bundle specific stuff into bundle.[ch]
Add bundle transport
Introduce remove_dir_recursively()
fetch/push: readd rsync support
Fix compilation when NO_CURL is defined
fetch: if not fetching from default remote, ignore default merge
Jonathan del Strother (1):
Fixing path quoting in git-rebase
Junio C Hamano (5):
bundle transport: fix an alloc_ref() call
k.org git toppage: Add link to 1.5.3 release notes.
help: remove extra blank line after "See 'git --help'" message
git-fetch: do not fail when remote branch disappears
RelNotes-1.5.4: describe recent updates
Lars Hjemli (1):
Teach git-pull about --[no-]ff, --no-squash and --commit
Lars Knoll (1):
Speedup scanning for excluded files.
Linus Torvalds (8):
Add 'diffcore.h' to LIB_H
Split out "exact content match" phase of rename detection
Ref-count the filespecs used by diffcore
copy vs rename detection: avoid unnecessary O(n*m) loops
Do linear-time/space rename logic for exact renames
Do exact rename detection regardless of rename limits
Fix ugly magic special case in exact rename detection
Do the fuzzy rename detection limits with the exact renames removed
Miklos Vajna (1):
git-send-email: add a new sendemail.to configuration variable
Nguyễn Thái Ngọc Duy (1):
git-sh-setup.sh: use "git rev-parse --show-cdup" to check for
SUBDIRECTORY_OK
Paul Mackerras (34):
gitk: Establish and use global left-to-right ordering for commits
gitk: Improve the drawing of links to parent lines
gitk: Eliminate diagonal arrows
gitk: Get rid of idrowranges and rowrangelist
gitk: Get rid of idinlist array
gitk: Fix some problems with the display of ids as links
gitk: Get rid of the rowchk array
gitk: Do only the parts of the layout that are needed
gitk: Fix bug causing incorrect ref list contents when switching
view
gitk: Fix bug causing undefined variable error when cherry-picking
gitk: Add a cache for the topology info
gitk: Make it possible to lay out all the rows we have received so
far
gitk: Fix bugs in setting rowfinal
gitk: Get rid of lookingforhead, use commitinterest instead
gitk: Fix bug in generating patches
gitk: Simplify highlighting interface and combine with Find
function
gitk: Fix a couple of bugs
gitk: Add progress bars for reading in stuff and for finding
gitk: Fix the tab setting in the diff display window
gitk: Fix bug causing Tcl error when changing find match type
gitk: Use named fonts instead of the font specification
gitk: Keep track of font attributes ourselves instead of using font
actual
gitk: Add a font chooser
gitk: Fix bug where the last few commits would sometimes not be
visible
gitk: Get rid of the diffopts variable
gitk: Fix Tcl error: can't unset findcurline
gitk: Limit diff display to listed paths by default
gitk: Ensure tabstop setting gets restored by Cancel button
gitk: Integrate the reset progress bar in the main frame
gitk: Use the status window for other functions
gitk: Fix some bugs with path limiting in the diff display
gitk: Fix a couple more bugs in the path limiting
gitk: Simplify the code for finding commits
gitk: Use the UI font for the diff/old version/new version radio
buttons
Pierre Habouzit (3):
Add some fancy colors in the test library when terminal supports
it.
Support a --quiet option in the test-suite.
fast-import.c: fix regression due to strbuf conversion
Shawn O. Pearce (37):
Correct builtin-fetch to handle + in refspecs
Fix off by one bug in reflog messages written by builtin-fetch
Remove unnecessary debugging from builtin-fetch
Remove unused unpacklimit variable from builtin-fetch
Replace custom memory growth allocator with ALLOC_GROW
Simplify fetch transport API to just one function
Refactor index-pack "keep $sha1" handling for reuse
Remove pack.keep after ref updates in git-fetch
Always ensure the pack.keep file is removed by git-fetch
Fix builtin-fetch memory corruption by not overstepping array
Backup the array passed to fetch_pack so we can free items
Properly cleanup in http_cleanup so builtin-fetch does not segfault
Don't bother passing ref log details to walker in builtin-fetch
Cleanup duplicate initialization code in transport_get
Add transport.h to LIB_H as transport.o is in LIB_OBJS
Remove unnecessary 'fetch' argument from transport_get API
Allow builtin-fetch to work on a detached HEAD
Don't configure remote "." to fetch everything to itself
Remove more debugging from builtin-fetch
builtin-fetch: Don't segfault on "fetch +foo"
Don't attempt to merge non-existant remotes in t5515
Correct handling of branch.$name.merge in builtin-fetch
Avoid printing unnecessary warnings during fetch and push
Use 'unsigned:1' when we mean boolean options
Rename remote.uri to remote.url within remote handling internals
Refactor struct transport_ops inlined into struct transport
Always obtain fetch-pack arguments from struct fetch_pack_args
Ensure builtin-fetch honors {fetch,transfer}.unpackLimit
Fix memory leaks when disconnecting transport instances
Cleanup style nit of 'x == NULL' in remote.c
Cleanup unnecessary break in remote.c
Prevent send-pack from segfaulting when a branch doesn't match
Fix 'push --all branch...' error handling
Support 'push --dry-run' for rsync transport
Support 'push --dry-run' for http transport
Avoid scary errors about tagged trees/blobs during git-fetch
Define compat version of mkdtemp for systems lacking it
Väinö Järvelä (1):
Added a test for fetching remote tags when there is not tags.
^ permalink raw reply
* Re: [PATCH] rebase: standardize on $() for command substitution
From: Dan McGee @ 2007-11-01 5:27 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vr6jaczps.fsf@gitster.siamese.dyndns.org>
On 11/1/07, Junio C Hamano <gitster@pobox.com> wrote:
> Dan McGee <dpmcgee@gmail.com> writes:
>
> > Commit 889a50e909dba5f4416049afc5eeae601fe133bc changed several `` to $()
> > format for command substitution, so we should standardize on one format
> > for clarity.
> > ...
> > @@ -203,7 +203,7 @@ do
> > -s|--s|--st|--str|--stra|--strat|--strate|--strateg|--strategy)
> > case "$#,$1" in
> > *,*=*)
> > - strategy=`expr "z$1" : 'z-[^=]*=\(.*\)'` ;;
> > + strategy=$(expr "z$1" : 'z-[^=]*=\(.*\)'` ;)
> > 1,*)
> > usage ;;
> > *)
>
> The patch might have meant well, but it is a rather unnecessary
> code churn without fixing anything and introducing a bug X-<.
Wow, back to the drawing board here. I've been up too long today.
-Dan
^ permalink raw reply
* Re: [PATCH] rebase: standardize on $() for command substitution
From: Junio C Hamano @ 2007-11-01 5:16 UTC (permalink / raw)
To: Dan McGee; +Cc: git
In-Reply-To: <1193892608-31322-1-git-send-email-dpmcgee@gmail.com>
Dan McGee <dpmcgee@gmail.com> writes:
> Commit 889a50e909dba5f4416049afc5eeae601fe133bc changed several `` to $()
> format for command substitution, so we should standardize on one format
> for clarity.
> ...
> @@ -203,7 +203,7 @@ do
> -s|--s|--st|--str|--stra|--strat|--strate|--strateg|--strategy)
> case "$#,$1" in
> *,*=*)
> - strategy=`expr "z$1" : 'z-[^=]*=\(.*\)'` ;;
> + strategy=$(expr "z$1" : 'z-[^=]*=\(.*\)'` ;)
> 1,*)
> usage ;;
> *)
The patch might have meant well, but it is a rather unnecessary
code churn without fixing anything and introducing a bug X-<.
^ permalink raw reply
* Re: remote#branch
From: Theodore Tso @ 2007-11-01 5:11 UTC (permalink / raw)
To: Jakub Narebski; +Cc: Mike Hommey, Andreas Ericsson, Jeff King, git
In-Reply-To: <200711010122.34190.jnareb@gmail.com>
On Thu, Nov 01, 2007 at 01:22:33AM +0100, Jakub Narebski wrote:
> The only thing to add (for absolutely no gain IMHO) would be code
> which would add quotes (single or double) around URL/path which
> contain spaces:
>
> Mirror URL 'git://repo.or.cz/repo with spaces.git'
> 'http://repo.or.cz/r/repo with spaces.git'
> Push URL 'repo.or.cz:/srv/git/repo with spaces.git'
The one thing that I think might be worth doing out of all of this is
to add code to git so that it can accept URL quoted arguments. Given
that it's highly unlikely anyone is using repository pathnames that
contain the '%' character, this would be highly unlikely to cause any
backwards compatibility problems.
- Ted
^ permalink raw reply
* [PATCH] rebase: standardize on $() for command substitution
From: Dan McGee @ 2007-11-01 4:50 UTC (permalink / raw)
To: git; +Cc: Dan McGee
Commit 889a50e909dba5f4416049afc5eeae601fe133bc changed several `` to $()
format for command substitution, so we should standardize on one format
for clarity.
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
---
git-rebase.sh | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/git-rebase.sh b/git-rebase.sh
index 224cca9..63dea56 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -59,7 +59,7 @@ continue_merge () {
die "$RESOLVEMSG"
fi
- cmt=`cat "$dotest/current"`
+ cmt=$(cat "$dotest/current")
if ! git diff-index --quiet HEAD
then
if ! git-commit -C "$cmt"
@@ -74,7 +74,7 @@ continue_merge () {
fi
git rev-list --pretty=oneline -1 "$cmt" | sed -e 's/^[^ ]* //'
- prev_head=`git rev-parse HEAD^0`
+ prev_head=$(git rev-parse HEAD^0)
# save the resulting commit so we can read-tree on it later
echo "$prev_head" > "$dotest/prev_head"
@@ -203,7 +203,7 @@ do
-s|--s|--st|--str|--stra|--strat|--strate|--strateg|--strategy)
case "$#,$1" in
*,*=*)
- strategy=`expr "z$1" : 'z-[^=]*=\(.*\)'` ;;
+ strategy=$(expr "z$1" : 'z-[^=]*=\(.*\)'` ;)
1,*)
usage ;;
*)
@@ -265,7 +265,7 @@ esac
# The upstream head must be given. Make sure it is valid.
upstream_name="$1"
-upstream=`git rev-parse --verify "${upstream_name}^0"` ||
+upstream=$(git rev-parse --verify "${upstream_name}^0") ||
die "invalid upstream $upstream_name"
# Make sure the branch to rebase onto is valid.
@@ -288,9 +288,9 @@ case "$#" in
git-checkout "$2" || usage
;;
*)
- if branch_name=`git symbolic-ref -q HEAD`
+ if branch_name=$(git symbolic-ref -q HEAD)
then
- branch_name=`expr "z$branch_name" : 'zrefs/heads/\(.*\)'`
+ branch_name=$(expr "z$branch_name" : 'zrefs/heads/\(.*\)')
else
branch_name=HEAD ;# detached
fi
@@ -343,11 +343,11 @@ fi
mkdir -p "$dotest"
echo "$onto" > "$dotest/onto"
echo "$onto_name" > "$dotest/onto_name"
-prev_head=`git rev-parse HEAD^0`
+prev_head=$(git rev-parse HEAD^0)
echo "$prev_head" > "$dotest/prev_head"
msgnum=0
-for cmt in `git rev-list --reverse --no-merges "$upstream"..ORIG_HEAD`
+for cmt in $(git rev-list --reverse --no-merges "$upstream"..ORIG_HEAD)
do
msgnum=$(($msgnum + 1))
echo "$cmt" > "$dotest/cmt.$msgnum"
--
1.5.3.5
^ permalink raw reply related
* Re: [PATCH] git-gui: Update Japanese strings
From: Shawn O. Pearce @ 2007-11-01 4:18 UTC (permalink / raw)
To: Junio C Hamano
Cc: しらいしななこ, git
In-Reply-To: <7v640mfvqu.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> wrote:
> しらいしななこ <nanako3@bluebottle.com> writes:
>
> > This updates the Japanese translation file.
>
> This seems to be missing an earlier suggestion from Christian.
Thanks for the follow-up. This plus all of the other git-gui
patches from the past couple of days are now on repo.or.cz.
--
Shawn.
^ permalink raw reply
* Re: [PATCH 1/1] Add --first-parent support to interactive rebase.
From: Jeff King @ 2007-11-01 4:14 UTC (permalink / raw)
To: Junio C Hamano
Cc: Dmitry Potapov, Karl Hasselström, Björn Steinbrink,
Johannes.Schindelin, git
In-Reply-To: <7vabpyfvwp.fsf@gitster.siamese.dyndns.org>
On Wed, Oct 31, 2007 at 09:10:30PM -0700, Junio C Hamano wrote:
> I think assuming utf-8 and reencoding is actively wrong.
> Existing setups of people with names that cannot be expressed in
> ASCII would already have the commit encoding specified in the
> configuration and user.name stored in that encoding, so passing
> things through as we have always done is the right thing to do.
That will break any time somebody uses -s with a --encoding= that is
different from their usual encoding. My patch assumes the source is
utf-8, but should perhaps assume some other default encoding from the
config.
But if this is not a problem for people, I'm not going to push it. I
don't actually use any of these features; it was just something I
noticed while looking at the actual bug.
-Peff
^ permalink raw reply
* Re: [PATCH] git-gui: Update Japanese strings
From: Junio C Hamano @ 2007-11-01 4:14 UTC (permalink / raw)
To: しらいしななこ; +Cc: spearce, git
In-Reply-To: <200710311412.l9VECpnI002616@mi0.bluebottle.com>
しらいしななこ <nanako3@bluebottle.com> writes:
> This updates the Japanese translation file.
This seems to be missing an earlier suggestion from Christian.
diff --git a/po/ja.po b/po/ja.po
index e4491f7..f3a547b 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -1776,7 +1776,7 @@
#: lib/status_bar.tcl:83
#, tcl-format
msgid "%s ... %*i of %*i %s (%3i%%)"
-msgstr "%1$s ... %3$*i %4$s 中の %$2*i (%5$3i%%)"
+msgstr "%1$s ... %4$*i %6$s 中の %2$*i (%7$3i%%)"
#: lib/transport.tcl:6
#, tcl-format
^ permalink raw reply related
* Re: [PATCH 1/1] Add --first-parent support to interactive rebase.
From: Junio C Hamano @ 2007-11-01 4:10 UTC (permalink / raw)
To: Jeff King
Cc: Dmitry Potapov, Karl Hasselström, Björn Steinbrink,
Johannes.Schindelin, git
In-Reply-To: <20071101032303.GA14495@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> On Wed, Oct 31, 2007 at 03:31:20PM -0700, Junio C Hamano wrote:
>
>> > ... I had one concern that
>> > I was tracking down: is the author name encoding necessarily the same as
>> > the commit text encoding?
>>
>> The user is screwing himself already if that is the case and
>> uses -s to format-patch, isn't he?
>
> Hrm, they probably _should_ be the same in the output. It's not clear to
> me what encoding we assume the name comes in (utf-8, I guess). Looks
> like we don't touch it at all when putting it in the signoff. I think we
> should just be able to reencode when appending the signoff; patch is
> below.
I think assuming utf-8 and reencoding is actively wrong.
Existing setups of people with names that cannot be expressed in
ASCII would already have the commit encoding specified in the
configuration and user.name stored in that encoding, so passing
things through as we have always done is the right thing to do.
^ permalink raw reply
* [PATCH] Show total transferred as part of throughput progress display
From: Shawn O. Pearce @ 2007-11-01 3:57 UTC (permalink / raw)
To: Junio C Hamano, Nicolas Pitre; +Cc: git
Right now it is infeasible to offer to the user a reasonable concept
of when a clone will be complete as we aren't able to come up with
the final pack size until after we have actually transferred the
entire thing to the client. However in many cases users can work
with a rough rule-of-thumb; for example it is somewhat well known
that git.git is about 16 MiB today and that linux-2.6.git is over
120 MiB.
We now show the total amount of data we have transferred over
the network as part of the throughput meter, organizing it in
"human friendly" terms like `ls -h` would do. Users can glance at
this, see that the total transferred size is about 3 MiB, see the
throughput of X KiB/sec, and determine a reasonable figure of about
when the clone will be complete, assuming they know the rough size
of the source repository or are able to obtain it.
This is also a helpful indicator that there is progress being made
even if we stall on a very large object. The thoughput meter may
remain relatively constant and the percentage complete and object
count won't be changing, but the total transferred will be increasing
as additional data is received for this object.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
This follows on top of Nico's 5 patch series to add the thoughput
meter. I think its a useful addition.
progress.c | 32 +++++++++++++++++++++++++++++---
1 files changed, 29 insertions(+), 3 deletions(-)
diff --git a/progress.c b/progress.c
index 23ee9f3..5c95091 100644
--- a/progress.c
+++ b/progress.c
@@ -11,7 +11,11 @@ struct throughput {
unsigned int avg_misecs;
unsigned int last_misecs[TP_IDX_MAX];
unsigned int idx;
- char display[20];
+ unsigned int unit_size;
+ unsigned int unit_index;
+ unsigned int total_units;
+ unsigned int curr_bytes;
+ char display[40];
};
struct progress {
@@ -24,6 +28,7 @@ struct progress {
struct throughput *throughput;
};
+static const char *units[] = {"bytes", "KiB", "MiB", "GiB"};
static volatile sig_atomic_t progress_update;
static void progress_interval(int signum)
@@ -113,12 +118,27 @@ void display_throughput(struct progress *progress, unsigned long n)
if (!tp) {
progress->throughput = tp = calloc(1, sizeof(*tp));
- if (tp)
+ if (tp) {
tp->prev_tv = tv;
+ tp->unit_size = 1;
+ }
return;
}
tp->count += n;
+ tp->curr_bytes += n;
+ if (tp->curr_bytes > tp->unit_size) {
+ tp->total_units += tp->curr_bytes / tp->unit_size;
+ tp->curr_bytes = tp->curr_bytes % tp->unit_size;
+
+ while (tp->total_units >= 1024
+ && tp->unit_index < ARRAY_SIZE(units)) {
+ tp->curr_bytes += (tp->total_units % 1024) * tp->unit_size;
+ tp->total_units = tp->total_units / 1024;
+ tp->unit_size *= 1024;
+ tp->unit_index++;
+ }
+ }
/*
* We have x = bytes and y = microsecs. We want z = KiB/s:
@@ -143,7 +163,13 @@ void display_throughput(struct progress *progress, unsigned long n)
tp->avg_bytes += tp->count;
tp->avg_misecs += misecs;
snprintf(tp->display, sizeof(tp->display),
- ", %lu KiB/s", tp->avg_bytes / tp->avg_misecs);
+ ", %3u.%2.2u %s %lu KiB/s",
+ tp->total_units,
+ tp->unit_size > 1
+ ? tp->curr_bytes / (tp->unit_size / 100)
+ : 0,
+ units[tp->unit_index],
+ tp->avg_bytes / tp->avg_misecs);
tp->avg_bytes -= tp->last_bytes[tp->idx];
tp->avg_misecs -= tp->last_misecs[tp->idx];
tp->last_bytes[tp->idx] = tp->count;
--
1.5.3.4.1481.g854da
^ permalink raw reply related
* Re: [PATCH 1/1] Add --first-parent support to interactive rebase.
From: Jeff King @ 2007-11-01 3:23 UTC (permalink / raw)
To: Junio C Hamano
Cc: Dmitry Potapov, Karl Hasselström, Björn Steinbrink,
Johannes.Schindelin, git
In-Reply-To: <7vzlxygblz.fsf@gitster.siamese.dyndns.org>
On Wed, Oct 31, 2007 at 03:31:20PM -0700, Junio C Hamano wrote:
> > ... I had one concern that
> > I was tracking down: is the author name encoding necessarily the same as
> > the commit text encoding?
>
> The user is screwing himself already if that is the case and
> uses -s to format-patch, isn't he?
Hrm, they probably _should_ be the same in the output. It's not clear to
me what encoding we assume the name comes in (utf-8, I guess). Looks
like we don't touch it at all when putting it in the signoff. I think we
should just be able to reencode when appending the signoff; patch is
below.
I'm sure there are other weird interactions lurking. For example, do we
correctly detect an existing signoff if we are storing in a non-utf8
encoding? I must admit to being a little ignorant to some of the
encoding magic of git, having a us-ascii name myself.
---
diff --git a/log-tree.c b/log-tree.c
index 3763ce9..906942d 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -3,6 +3,7 @@
#include "commit.h"
#include "log-tree.h"
#include "reflog-walk.h"
+#include "utf8.h"
struct decoration name_decoration = { "object names" };
@@ -111,7 +112,14 @@ static void append_signoff(struct strbuf *sb, const char *signoff)
strbuf_addch(sb, '\n');
strbuf_addstr(sb, signed_off_by);
- strbuf_add(sb, signoff, signoff_len);
+ if (git_log_output_encoding) {
+ char *encoded_name = reencode_string(signoff,
+ git_log_output_encoding, "utf-8");
+ strbuf_addstr(sb, encoded_name);
+ free(encoded_name);
+ }
+ else
+ strbuf_add(sb, signoff, signoff_len);
strbuf_addch(sb, '\n');
}
^ permalink raw reply related
* Re: [PATCH 1/5] prune-packed: don't call display_progress() for every file
From: Shawn O. Pearce @ 2007-11-01 2:58 UTC (permalink / raw)
To: Nicolas Pitre; +Cc: Junio C Hamano, git
In-Reply-To: <1193770655-20492-2-git-send-email-nico@cam.org>
Nicolas Pitre <nico@cam.org> wrote:
> The progress count is per fanout directory, so it is useless to call
> it for every file as the count doesn't change that often.
If you go back into the history and look at the commit message for
when I introduced this per-object display_progress() call we find
the following:
commit b5d72f0a4cd3cce945ca0d37e4fa0ebbfcdcdb52
Author: Shawn O. Pearce <spearce@spearce.org>
Date: Fri Oct 19 00:08:37 2007 -0400
[...snip...]
We perform the display_progress() call from within the very innermost
loop in case we spend more than 1 second within any single object
directory. This ensures that a progress_update event from the
timer will still trigger in a timely fashion and allow the user to
see the progress meter.
During my testing with a 40,000 loose object case (yea, I fully
unpacked a git.git clone I had laying around) my system stalled
hard in the first object directory. A *lot* longer than 1 second.
So I got no progress meter for a long time, and then a progress
meter appeared on the second directory.
The display_progress() call already does a reasonably cheap
comparsion to see if the timer has tripped or if the percent complete
has changed. So I figured it was more useful to get feedback to
the user that we were working, but were going to take a while,
than it was to optimize a few machine instructions out of that
inner-most per-object loop.
So I'm a little against this patch. But I think I understand why
you think its worth doing. I just consider the progress feedback
more important than the few machine cycles avoiding it saves.
--
Shawn.
^ permalink raw reply
* Re: Newbie: report of first experience with git-rebase.
From: Nicolas Pitre @ 2007-11-01 2:27 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Johannes Schindelin, Sergei Organov, git
In-Reply-To: <7vhck7gdzs.fsf@gitster.siamese.dyndns.org>
On Wed, 31 Oct 2007, Junio C Hamano wrote:
> A rebase conflict resolution that results in emptiness is a
> rather rare event (especially because rebase drops upfront the
> identical changes from the set of commits to be replayed), but
> it does happen. One could argue that "rebase --continue" can
> notice that the resolved index is identical to the tree of the
> HEAD commit and skip it automatically.
>
> Given an index that is identical to HEAD, however, it is not
> easy to safely determine if that is because the patch did not
> apply at all, or the patch was applied with conflicts _and_ the
> user decided to make the patch a no-op by resolving. The
> automatic droppage of the commit needs to happen only on the
> latter and never on the former.
Probably some additional clue could be displayed for the user benefit.
This might solve the issue nicely.
Nicolas
^ permalink raw reply
* Re: [PATCH] Don't use cpio in git-clone when not installed
From: Nguyen Thai Ngoc Duy @ 2007-11-01 1:25 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Mike Hommey, git
In-Reply-To: <7vejfag40g.fsf@gitster.siamese.dyndns.org>
On 11/1/07, Junio C Hamano <gitster@pobox.com> wrote:
> "Nguyen Thai Ngoc Duy" <pclouds@gmail.com> writes:
>
> > BTW, you have workaround for git-merge also? It uses cpio to save/restore state.
>
> Why do people want "workaround"? Is installing cpio such a
> hassle?
It is on Windows because busybox cpio is not really good and busybox
tar is even worse (for cpio emulation). Maybe I should just improve
busybox cpio :-)
--
Duy
^ permalink raw reply
* Re: [PATCH] Don't use cpio in git-clone when not installed
From: Junio C Hamano @ 2007-11-01 1:15 UTC (permalink / raw)
To: Nguyen Thai Ngoc Duy; +Cc: Mike Hommey, git, Junio C Hamano
In-Reply-To: <fcaeb9bf0710311809o41703bc5hda36a9d44a538eeb@mail.gmail.com>
"Nguyen Thai Ngoc Duy" <pclouds@gmail.com> writes:
> BTW, you have workaround for git-merge also? It uses cpio to save/restore state.
Why do people want "workaround"? Is installing cpio such a
hassle?
^ permalink raw reply
* Re: [PATCH] Don't use cpio in git-clone when not installed
From: Junio C Hamano @ 2007-11-01 1:12 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Mike Hommey, git
In-Reply-To: <alpine.LFD.0.999.0710311742170.3342@woody.linux-foundation.org>
Linus Torvalds <torvalds@linux-foundation.org> writes:
> On Wed, 31 Oct 2007, Mike Hommey wrote:
>> + if type cpio > /dev/null 2>&1; then
>> + local=yes
>> + fi
>
> Isn't "type" a bashism?
I seem to recall that it is in POSIX.
^ permalink raw reply
* Re: [PATCH] Don't use cpio in git-clone when not installed
From: Nguyen Thai Ngoc Duy @ 2007-11-01 1:09 UTC (permalink / raw)
To: Mike Hommey; +Cc: git, Junio C Hamano
In-Reply-To: <1193861145-20357-1-git-send-email-mh@glandium.org>
BTW, you have workaround for git-merge also? It uses cpio to save/restore state.
On 11/1/07, Mike Hommey <mh@glandium.org> wrote:
>
> Signed-off-by: Mike Hommey <mh@glandium.org>
> ---
> git-clone.sh | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/git-clone.sh b/git-clone.sh
> index 0ea3c24..57e96ae 100755
> --- a/git-clone.sh
> +++ b/git-clone.sh
> @@ -191,7 +191,9 @@ fi
> # it is local
> if base=$(get_repo_base "$repo"); then
> repo="$base"
> - local=yes
> + if type cpio > /dev/null 2>&1; then
> + local=yes
> + fi
> fi
>
> dir="$2"
> --
> 1.5.3.4
>
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Duy
^ permalink raw reply
* Re: [PATCH] Don't use cpio in git-clone when not installed
From: Nguyen Thai Ngoc Duy @ 2007-11-01 1:05 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Mike Hommey, git, Junio C Hamano
In-Reply-To: <alpine.LFD.0.999.0710311742170.3342@woody.linux-foundation.org>
On 11/1/07, Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
>
> On Wed, 31 Oct 2007, Mike Hommey wrote:
> > + if type cpio > /dev/null 2>&1; then
> > + local=yes
> > + fi
>
> Isn't "type" a bashism?
busybox ash has "type". I'm happy.
--
Duy
^ permalink raw reply
* Re: [PATCH] Don't use cpio in git-clone when not installed
From: Jakub Narebski @ 2007-11-01 1:00 UTC (permalink / raw)
To: git
In-Reply-To: <alpine.LFD.0.999.0710311742170.3342@woody.linux-foundation.org>
Linus Torvalds wrote:
>
>
> On Wed, 31 Oct 2007, Mike Hommey wrote:
>> + if type cpio > /dev/null 2>&1; then
>> + local=yes
>> + fi
>
> Isn't "type" a bashism?
>
> Maybe just do
>
> if echo . | cpio -o > /dev/null 2>&1; then
>
> instead? Maybe even doing this at install time to avoid the overhead of
> executing another process..
Or perhaps trap / check actual execution of cpio in git-clone, and
fallback to ln -s / link if it fails...
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply
* Re: [PATCH] Don't use cpio in git-clone when not installed
From: Linus Torvalds @ 2007-11-01 0:46 UTC (permalink / raw)
To: Mike Hommey; +Cc: git, Junio C Hamano
In-Reply-To: <1193861145-20357-1-git-send-email-mh@glandium.org>
On Wed, 31 Oct 2007, Mike Hommey wrote:
> + if type cpio > /dev/null 2>&1; then
> + local=yes
> + fi
Isn't "type" a bashism?
Maybe just do
if echo . | cpio -o > /dev/null 2>&1; then
instead? Maybe even doing this at install time to avoid the overhead of
executing another process..
Linus
^ permalink raw reply
* Re: remote#branch
From: Jakub Narebski @ 2007-11-01 0:22 UTC (permalink / raw)
To: Mike Hommey; +Cc: Andreas Ericsson, Jeff King, git
In-Reply-To: <20071031091529.GA25025@glandium.org>
Mike Hommey wrote:
> On Wed, Oct 31, 2007 at 10:03:16AM +0100, Andreas Ericsson <ae@op5.se> wrote:
>>>
>>>Or copied from gitweb.
>>>
>> Perhaps, but I've never seen that done. Partly because you can't be sure
>> the HTTP url is the same as the git address (perhaps people are used to
>> this from CVS and the likes), and partly because you'd, for most cases,
>> want to use git:// or ssh transport instead of http.
>>
>> It might be nifty to have gitweb print some git-valid locator for a repo
>> though, or even a full copy-pastable "git clone git://host/path/to/repo.git"
>> command-line thingie. I'll look into it when I have leisure.
>
> Hum... it already does print http and git "Mirror URL"s which are ready to
> be copy/pasted to feed git clone arguments.
The only thing to add (for absolutely no gain IMHO) would be code
which would add quotes (single or double) around URL/path which
contain spaces:
Mirror URL 'git://repo.or.cz/repo with spaces.git'
'http://repo.or.cz/r/repo with spaces.git'
Push URL 'repo.or.cz:/srv/git/repo with spaces.git'
--
Jakub Narebski
Poland
^ permalink raw reply
* Re: [PATCH] Implement sending mails over TLS in git-send-email.
From: Baz @ 2007-10-31 23:59 UTC (permalink / raw)
To: Simon Sasburg; +Cc: git
In-Reply-To: <981e6de60710311504v666943beve3b87c6a713fb18c@mail.gmail.com>
On 31/10/2007, Simon Sasburg <simon.sasburg@gmail.com> wrote:
> > In other words, this patch should be entirely unnecessary if you have
> > Authen::SASL installed - could you try this? (I've checked for myself,
> > git-send-email sends me mail fine via gmail without this patch)
>
> Well, it fails here, maybe maybe you can show me exactly what you did
> (configuration/parameters etc)?
>
> This is what i do now:
> > git-send-email testfile.patch -to simon.sasburg@gmail.com --chain-reply-to --smtp-server smtp.gmail.com --smtp-user simon.sasburg --smtp-pass secret --smtp-ssl --smtp-server-port 587
> and it fails, while the same line using --smtp-tls instead of
> --smtp-ssl with my patch applied works.
>
> What am i missing?
>
ok I'm going to downgrade what I said to 'it works fine with gmail' -
it just doesnt do starttls, your code does.
git-send-email --from 'brian.ewins@gmail.com' --to
'brian.ewins@gmail.com' --smtp-server smtp.gmail.com --smtp-user
'brian.ewins@gmail.com' --smtp-pass 'secret' --smtp-ssl
0001-the-patch-goes-here
That's using SSL on port 465, not TLS. Did this not work for you? I
thought Net::SMTP passed its constructor options to IO::Socket, but
no. An alternate way of getting starttls to work, without using
Net::SMTP::TLS, is this:
#connect with Net::SMTP - not ::SSL or the connect will fail
$smtp = Net::SMTP->new('smtp.gmail.com',
Port => 587,
Debug => 1) or die "Could not connect
to server\n";
#issue the starttls command, assuming user asked for this
$smtp->command('STARTTLS');
$smtp->response();
#if server says 220, then go ahead and convert the socket. Bless as
Net::SMTP::SSL
# - necessary to inherit both IO::Socket::SSL and Net::SMTP
#start_SSL has been renamed, twice. Nice stable api :)
#extra args for checking server cert etc can be passed to start_SSL.
$smtp->code() == 220 and $smtp = Net::SMTP::SSL->start_SSL($smtp) or
die "STARTTLS failed! ".$smtp->message;
# say hello again to get server features (including auth)
$smtp->hello();
# now continue as before, with $smtp->auth()...
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox