Re: [PATCH] diff-tree: do not show the sha1 of the given head with --quiet

2015-07-23 Thread Jeff King
On Thu, Jul 23, 2015 at 10:02:27PM +0200, Sebastian Schuberth wrote: > On Thu, Jul 23, 2015 at 8:08 PM, Jeff King wrote: > > > mode. Actually asking for a two-endpoint tree diff: > > > > git diff-tree --quiet --ignore-space-change $commit^ $commit > > > > will do what you want. > > Yes, I kno

Re: [RFC/PATCH] log: add log.firstparent option

2015-07-23 Thread Jacob Keller
On Thu, Jul 23, 2015 at 3:46 PM, Junio C Hamano wrote: > Jeff King writes: > >> But other projects prefer to keep the messy history intact. >> For one thing, it makes collaboration on a topic easier, as >> developers can simply pull from each other during the messy >> development. And two, that h

[PATCH 6/9] pseudorefs: create and use pseudoref update and delete functions

2015-07-23 Thread David Turner
Pseudorefs should not be updated through the ref API, because the ref API is for real refs. Instead, use a dedicated pseudoref API. This patch changes writes to CHERRY_PICK_HEAD, REVERT_HEAD, and ORIG_HEAD. Signed-off-by: David Turner --- builtin/merge.c | 3 +-- builtin/reset.c | 6 ++

[PATCH 4/9] tests: treat FETCH_HEAD as a pseudoref

2015-07-23 Thread David Turner
Signed-off-by: David Turner --- t/t5510-fetch.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh index 0ba9db0..467cade 100755 --- a/t/t5510-fetch.sh +++ b/t/t5510-fetch.sh @@ -362,7 +362,7 @@ test_expect_success 'fetch with a non-appl

[PATCH 3/9] bisect: do not use update-ref for BISECT_HEAD

2015-07-23 Thread David Turner
Because BISECT_HEAD is a pseudoref, we shouldn't use update-ref to update it. Instead, we simply write to and delete the file. Signed-off-by: David Turner --- git-bisect.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-bisect.sh b/git-bisect.sh index ea63223..82635

[PATCH 8/9] rebase: use write_pseudoref

2015-07-23 Thread David Turner
Instead of manually writing a pseudoref (in one case) and using git update-ref (in another), use the new write_pseudoref function. Signed-off-by: David Turner --- bisect.c | 35 +++ 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/bisect.c b/bisect.c

[PATCH 9/9] refs: forbid pseudoref updates through ref update API

2015-07-23 Thread David Turner
It is now forbidden to update pseudorefs through the ref update framework. Because of the pseudoref update rules change, test cases that used git update-ref on a pseudoref now operate on plain refs. Signed-off-by: David Turner --- bisect.c | 2 +- refs.c| 2 ++ t/

[PATCH 7/9] am/rebase: update pseudorefs by writing files

2015-07-23 Thread David Turner
git update-ref can no longer be used to update pseudorefs, so in git-am and git-rebase, we just directly edit the files. Signed-off-by: David Turner --- builtin/am.c | 6 +++--- contrib/examples/git-am.sh | 4 ++-- git-rebase--interactive.sh | 2 +- git-rebase.sh | 2 +

[PATCH 5/9] tests: use --create-reflog option to git update-ref

2015-07-23 Thread David Turner
Instead of manually precreating reflogs by writing files, use update-ref --create-reflog to create the reflogs at the same time we first create the ref. In one case, we need an entirely empty reflog, so we do a no-op update-ref with --create-reflog and then expire the reflog. This makes it slighl

[PATCH 2/9] notes: replace pseudorefs with real refs

2015-07-23 Thread David Turner
All-caps files like NOTES_MERGE_REF are pseudorefs, and thus are per-worktree. We don't want multiple notes merges happening at once (in different worktrees), so we want to make these refs true refs. So, we lowercase NOTES_MERGE_REF and friends. That way, backends that distinguish between pseudo

[PATCH/RFC 0/9] Pseudorefs

2015-07-23 Thread David Turner
This series is another chunk of the pluggable refs backend work. The major reason it is listed as "PATCH/RFC" is beacuse it breaks t9300-fast-import.sh, because fast-import wants to create a ref called TEMP_TAG, which would now be a pseudoref. The commit that introduces this test says that cvs2sv

[PATCH 1/9] refs: Introduce pseudoref and per-worktree ref concepts

2015-07-23 Thread David Turner
Add glossary entries for both concepts. Pseudorefs and per-worktree refs do not yet have special handling, because the files refs backend already handles them correctly. Later, we will make the LMDB backend call out to the files backend to handle per-worktree refs. Signed-off-by: David Turner -

[PATCH 1/6] Documentation/git-worktree: fix broken 'linkgit' invocation

2015-07-23 Thread Eric Sunshine
Signed-off-by: Eric Sunshine --- Documentation/git-worktree.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt index 332dd77..400b313 100644 --- a/Documentation/git-worktree.txt +++ b/Documentation/git-worktree.t

[PATCH 0/6] minor documentation improvements

2015-07-23 Thread Eric Sunshine
This is a set of minor documentation improvements, prompted by suggestions from Junio and Michael Haggerty, plus a few things I discovered in the process. It is built atop 'es/worktree-add' in 'next' in order to avoid conflicts with changes in that series (but is otherwise not related to those patc

[PATCH 6/6] Documentation/git-tools: drop references to defunct tools

2015-07-23 Thread Eric Sunshine
Cogito -- unmaintained since late 2006[1] pg -- URL dead; web searches reveal no information quilt2git -- URL dead; web searches reveal no information (h)gct -- URL dead; no repository activity since 2007[2] [1]: http://git.or.cz/cogito/ [2]: http://repo.or.cz/w/hgct.git Signed-off-by: Eric Sunsh

[PATCH 4/6] Documentation/git-tools: improve discoverability of Git wiki

2015-07-23 Thread Eric Sunshine
These days, the best way to find Git-related tools is via a search engine. Second best may be the Git wiki. git-tools.txt falls in last place. Therefore, promote the Git wiki reference to the top of git-tools.txt so the reader will encounter it first, rather than hiding it away at the very bottom.

[PATCH 3/6] Documentation/git: drop outdated Cogito reference

2015-07-23 Thread Eric Sunshine
Cogito hasn't been maintained since late 2006, so drop the reference to it. The warning that SCMS front-ends might override listed environment variables, however, may still be valuable, so keep it but generalize the wording. Suggested-by: Junio C Hamano Signed-off-by: Eric Sunshine --- Referenc

[PATCH 5/6] Documentation/git-tools: fix item text formatting

2015-07-23 Thread Eric Sunshine
Descriptive text for each tool item is incorrectly formatted using a fixed width font. Fix formatting to use a variable width font by unindenting the item text. Signed-off-by: Eric Sunshine --- Documentation/git-tools.txt | 134 ++-- 1 file changed, 67 ins

[PATCH 2/6] Documentation/config: mention "now" and "never" for 'expire' settings

2015-07-23 Thread Eric Sunshine
In addition to approxidate-style values ("2.months.ago", "yesterday"), consumers of 'gc.*expire*' configuration variables also accept and respect 'now'/'all' ("do it immediately") and 'never'/'false' ("suppress entirely"). Suggested-by: Michael Haggerty Signed-off-by: Eric Sunshine --- Referenc

git hooks and environment variables

2015-07-23 Thread Jacob Keller
I've noticed that not all hooks have all of the environment variables set when they are run, and it is not clear from the manual pages which hooks have which variables set on the command line. Specifically, they don't all have GIT_DIR set, I haven't taken the time to verify exactly which variables

Re: [PATCH v2 0/5] mh: worktree-related doc fixes

2015-07-23 Thread Junio C Hamano
Eric Sunshine writes: > On Mon, Jul 20, 2015 at 11:31 AM, Michael Haggerty > wrote: >> On 07/19/2015 10:29 PM, Eric Sunshine wrote: >>> This re-roll of Michael Haggerty's worktree-related documentation >>> tweaks[1] takes my review comments into account and adds one new patch. >> >> Thanks for

Re: [PATCH 2/2] refs: loosen restriction on wildcard "*" refspecs

2015-07-23 Thread Junio C Hamano
"Keller, Jacob E" writes: >> > s/hangled/handled/ >> > ... >> >> Thanks; here is what I queued yesterday. >> > > Woah. I bow to your imperative commit message abilities. The new commit > message is very nicely worded. Heh, imperative is secondary. I just wanted to straighten out the use of "re

Re: [PATCH 2/2] refs: loosen restriction on wildcard "*" refspecs

2015-07-23 Thread Keller, Jacob E
On Thu, 2015-07-23 at 15:12 -0700, Junio C Hamano wrote: > Eric Sunshine writes: > > > On Wed, Jul 22, 2015 at 5:05 PM, Jacob Keller < > > jacob.e.kel...@intel.com> wrote: > > > From: Jacob Keller > > > > > > Modify logic of check_refname_component and add a new disposition > > > regarding "*".

Re: [PATCH v2 0/5] mh: worktree-related doc fixes

2015-07-23 Thread Eric Sunshine
On Mon, Jul 20, 2015 at 11:31 AM, Michael Haggerty wrote: > On 07/19/2015 10:29 PM, Eric Sunshine wrote: >> This re-roll of Michael Haggerty's worktree-related documentation >> tweaks[1] takes my review comments into account and adds one new patch. > > Thanks for separating the wheat from the chaf

Re: [RFC/PATCH] log: add log.firstparent option

2015-07-23 Thread Junio C Hamano
Jeff King writes: > But other projects prefer to keep the messy history intact. > For one thing, it makes collaboration on a topic easier, as > developers can simply pull from each other during the messy > development. And two, that history may later be useful when > tracking down a bug, because

Re: [RFC/PATCH] log: add log.firstparent option

2015-07-23 Thread Stefan Beller
On Wed, Jul 22, 2015 at 6:23 PM, Jeff King wrote: > This patch adds an option to turn on --first-parent all the > time, along with the corresponding --no-first-parent to > disable it. The "why" of this requires a bit of backstory. > > Some projects (like git.git) encourage frequent rebasing to > g

Re: [PATCH 2/2] refs: loosen restriction on wildcard "*" refspecs

2015-07-23 Thread Junio C Hamano
Eric Sunshine writes: > On Wed, Jul 22, 2015 at 5:05 PM, Jacob Keller > wrote: >> From: Jacob Keller >> >> Modify logic of check_refname_component and add a new disposition >> regarding "*". Allow refspecs that contain a single "*" if >> REFNAME_REFSPEC_PATTERN is set. Change the function to p

Re: [PATCH 2/2] refs: loosen restriction on wildcard "*" refspecs

2015-07-23 Thread Eric Sunshine
On Wed, Jul 22, 2015 at 5:05 PM, Jacob Keller wrote: > From: Jacob Keller > > Modify logic of check_refname_component and add a new disposition > regarding "*". Allow refspecs that contain a single "*" if > REFNAME_REFSPEC_PATTERN is set. Change the function to pass the flags as > a pointer, and

[RFC/PATCH] contrib: teach completion about git-worktree options and arguments

2015-07-23 Thread Eric Sunshine
Complete subcommands 'add' and 'prune', as well as their respective options --force, --detach, --dry-run, --verbose, and --expire. Also complete 'refname' in "git worktree add [-b ] ". Signed-off-by: Eric Sunshine --- This is RFC since this is my first foray into the Git completion script, and

Re: [PATCH] diff-tree: do not show the sha1 of the given head with --quiet

2015-07-23 Thread Junio C Hamano
Sebastian Schuberth writes: > On Thu, Jul 23, 2015 at 9:39 PM, Junio C Hamano wrote: > >> I haven't dug into why that happens, but possible ways to fix that >> are to make "--quiet" output all (making it consistent with "-s") or >> no (making the command totally silent) output at all ;-). > > Ex

Re: [PATCH] diff-tree: do not show the sha1 of the given head with --quiet

2015-07-23 Thread Sebastian Schuberth
On Thu, Jul 23, 2015 at 9:39 PM, Junio C Hamano wrote: > I haven't dug into why that happens, but possible ways to fix that > are to make "--quiet" output all (making it consistent with "-s") or > no (making the command totally silent) output at all ;-). Exactly, and I chose the latter to add so

Re: [PATCH] diff-tree: do not show the sha1 of the given head with --quiet

2015-07-23 Thread Sebastian Schuberth
On Thu, Jul 23, 2015 at 7:06 PM, Junio C Hamano wrote: > Existing scripts by definition would not be using a new option you > will invent that used not to be a valid one. So that would be one > way that you can shorten your script without breaking other people. True. If it was only for shorteni

Re: [PATCH] diff-tree: do not show the sha1 of the given head with --quiet

2015-07-23 Thread Sebastian Schuberth
On Thu, Jul 23, 2015 at 8:08 PM, Jeff King wrote: > mode. Actually asking for a two-endpoint tree diff: > > git diff-tree --quiet --ignore-space-change $commit^ $commit > > will do what you want. Yes, I know, thanks. But I deliberately wanted to specify only a single commit as an optimization,

Re: [PATCH] diff-tree: do not show the sha1 of the given head with --quiet

2015-07-23 Thread Junio C Hamano
Jeff King writes: > I have not been following the thread closely, but I do not recall seeing > anyone mention that the reason for the sha1-output is handing > only a single commit-ish to diff-tree is what puts it into its log-like > mode. Actually asking for a two-endpoint tree diff: > > git di

Re: Feature Request: Passing a number as an option to git tags for displaying latest tags

2015-07-23 Thread Junio C Hamano
Jacob Keller writes: > On Thu, Jul 23, 2015 at 11:01 AM, Junio C Hamano wrote: >> Jacob Keller writes: >> >>> Yep, that's pretty much how a build system I've had to use does it. >>> Sadly, this is quite slow, and I'm not sure if doing it built into the >>> tag via for-each-ref would be faster?

Re: Feature Request: Passing a number as an option to git tags for displaying latest tags

2015-07-23 Thread Jacob Keller
On Thu, Jul 23, 2015 at 11:01 AM, Junio C Hamano wrote: > Jacob Keller writes: > >> Yep, that's pretty much how a build system I've had to use does it. >> Sadly, this is quite slow, and I'm not sure if doing it built into the >> tag via for-each-ref would be faster? > > Is the description in "git

Re: [PATCH] diff-tree: do not show the sha1 of the given head with --quiet

2015-07-23 Thread Jeff King
On Thu, Jul 23, 2015 at 09:06:01AM +0200, Sebastian Schuberth wrote: > My use-case (also see [1]) is that I wanted to checked whether some > given commits change nothing but whitespace. So I did > > if git diff-tree --quiet --ignore-space-change $commit; then > echo "$commit only changes whit

Re: [PATCH 2/2] refs: loosen restriction on wildcard "*" refspecs

2015-07-23 Thread Jacob Keller
On Thu, Jul 23, 2015 at 9:44 AM, Junio C Hamano wrote: > Jacob Keller writes: > >>> By the way, have you run test suite before sending this (or any >>> previous round of this) patch? This seems to break t5511-refspec.sh >>> for me. >> >> Looks like another location I forgot to update. I can send

Re: Feature Request: Passing a number as an option to git tags for displaying latest tags

2015-07-23 Thread Junio C Hamano
Jacob Keller writes: > Yep, that's pretty much how a build system I've had to use does it. > Sadly, this is quite slow, and I'm not sure if doing it built into the > tag via for-each-ref would be faster? Is the description in "git for-each-ref --help" somehow unreadable? An example direc

Re: [PATCH] receive-pack: crash when checking with non-exist HEAD

2015-07-23 Thread Junio C Hamano
Jeff King writes: > On Wed, Jul 22, 2015 at 01:30:00PM -0700, Junio C Hamano wrote: > >> For example, in order to "git commit" from such a state to create >> the root commit on that branch, existing unrelated branches whose >> names collide with the branch must be removed, which would mean one >>

Re: Config variables and scripting // was Re: [RFC/PATCH] log: add log.firstparent option

2015-07-23 Thread Junio C Hamano
Jeff King writes: > I am sympathetic, though. There are some things that git-log can do that > rev-list cannot, so people end up using it in scripts. I think you can > avoid it with a "rev-list | diff-tree" pipeline, though I'm not 100% > sure if that covers all cases. But I would much rather see

Re: Config variables and scripting // was Re: [RFC/PATCH] log: add log.firstparent option

2015-07-23 Thread Jeff King
On Thu, Jul 23, 2015 at 11:53:37AM +0200, Michael J Gruber wrote: > That reminds me of my attempt to add those "categories" to the man pages > of each command (rather than just to that of "git") so that users know > where they landed. It died off, though: I preferred just specifying the > category

Re: Git doesn't detect change, if file modification time is restored to original one

2015-07-23 Thread Junio C Hamano
Karsten Blees writes: > I'd like to add that this is not a git-specific problem: resetting mtime > on purpose will fool lots of programs, including backup software, file > synchronization tools (rsync, xcopy /D), build systems (make), and web > servers / proxies (If-Modified-Since requests). > >

Re: Feature Request: Passing a number as an option to git tags for displaying latest tags

2015-07-23 Thread Jacob Keller
On Thu, Jul 23, 2015 at 2:39 AM, Michael J Gruber wrote: > > While not quite being intended for that purpose, > > git log --oneline --decorate --simplify-by-decoration [-n] --tags > > (or with a custom format instead of "--oneline --decorate") may come > close to what you want.[*] > > Michael > >

Re: unexplained behavior/issue with git archive?

2015-07-23 Thread Junio C Hamano
John Keeping writes: > With a small number of items, there should only be one output line, but > if xargs invokes the command multiple times there will be multiple > lines. For example (using -L2 to force a maximum of two arguments per > invocation): > > $ printf '%s\n' a b c | xargs -d'\n

Re: [PATCH 2/2] refs: loosen restriction on wildcard "*" refspecs

2015-07-23 Thread Jacob Keller
On Thu, Jul 23, 2015 at 10:13 AM, Junio C Hamano wrote: > That was whitespace damaged, so I had to hand-tweak the file in > place. While at it, I noticed that we do not check a case where > multiple asterisks appear in a single component (which is rejected > for a reason different from having mul

Re: [PATCH 2/2] refs: loosen restriction on wildcard "*" refspecs

2015-07-23 Thread Junio C Hamano
Junio C Hamano writes: > Will squash the changes; no need to resend (unless people discover > other issues; let's hope that I wouldn't be the one to do so ;-). > > Thanks. > >> diff --git i/t/t5511-refspec.sh w/t/t5511-refspec.sh >> index de6db86ccff0..7bfca7962d41 100755 >> --- i/t/t5511-refspec

Re: [PATCH] diff-tree: do not show the sha1 of the given head with --quiet

2015-07-23 Thread Junio C Hamano
Junio C Hamano writes: > Sebastian Schuberth writes: > >> Well, from a user's perspective it does not matter which part of the >> internal implementation of diff-tree is responsible for printing that >> single line,... > > That is not "internal implementation", but "logically separate > parts".

Re: [PATCH 2/2] refs: loosen restriction on wildcard "*" refspecs

2015-07-23 Thread Junio C Hamano
Jacob Keller writes: >> By the way, have you run test suite before sending this (or any >> previous round of this) patch? This seems to break t5511-refspec.sh >> for me. > > Looks like another location I forgot to update. I can send a re-spin > if you need with the following diff. Basically look

Re: [PATCH] diff-tree: do not show the sha1 of the given head with --quiet

2015-07-23 Thread Junio C Hamano
Sebastian Schuberth writes: > Well, from a user's perspective it does not matter which part of the > internal implementation of diff-tree is responsible for printing that > single line,... That is not "internal implementation", but "logically separate parts". View it more like "'git show -s' do

Re: [PATCH v3 9/9] tag.c: implement '--merged' and '--no-merged' options

2015-07-23 Thread Karthik Nayak
On Thu, Jul 23, 2015 at 1:10 AM, Matthieu Moy wrote: > Karthik Nayak writes: > >> +--merged []:: >> + Only list tags whose tips are reachable from the >> + specified commit (HEAD if not specified). >> + >> +--no-merged []:: >> + Only list tags whose tips are not reachable from the >>

Re: unexplained behavior/issue with git archive?

2015-07-23 Thread John Keeping
On Thu, Jul 23, 2015 at 05:23:49PM +0200, Jan Vales wrote: > i seem to trigger behavior i do not understand with git archive. > > I have this little 3 liner (vmdiff.sh): > #!/bin/bash > git diff --name-status "$2" "$3" > "$1.files" > git diff --name-only "$2" "$3" |xargs -d'\n' git archive -o "$1"

unexplained behavior/issue with git archive?

2015-07-23 Thread Jan Vales
hi, i seem to trigger behavior i do not understand with git archive. I have this little 3 liner (vmdiff.sh): #!/bin/bash git diff --name-status "$2" "$3" > "$1.files" git diff --name-only "$2" "$3" |xargs -d'\n' git archive -o "$1" "$3" -- For testing purpose, lets assume this call: # ./vmdiff.s

Re: Git doesn't detect change, if file modification time is restored to original one

2015-07-23 Thread Karsten Blees
Am 23.07.2015 um 16:53 schrieb Konstantin Khomoutov: > On Thu, 23 Jul 2015 11:14:11 +0200 > Konrád Lőrinczi wrote: > > [...] >> I accept these solutions as workarounds, but the real solution would >> be: Dev suggestions: >> 1) Add a --force-reread option to git status, so user can force >> reread

Re: Git doesn't detect change, if file modification time is restored to original one

2015-07-23 Thread Konstantin Khomoutov
On Thu, 23 Jul 2015 11:14:11 +0200 Konrád Lőrinczi wrote: [...] > I accept these solutions as workarounds, but the real solution would > be: Dev suggestions: > 1) Add a --force-reread option to git status, so user can force > reread tree. git status --force-reread > > 2) Add status.force-reread

Re: [PATCH v3 1/9] ref-filter: add option to align atoms to the left

2015-07-23 Thread Karthik Nayak
On Thu, Jul 23, 2015 at 12:14 AM, Matthieu Moy wrote: > Karthik Nayak writes: > >> + strtoul_ui(valp, 10, &ref->align_value); >> + if (ref->align_value < 1) >> + die(_("Value should be greater than zero")); > > You're not checkin

Re: Git doesn't detect change, if file modification time is restored to original one

2015-07-23 Thread Johannes Schindelin
Hi, On 2015-07-23 09:29, Konrád Lőrinczi wrote: > I wrote a search & replace perl script, which recursively searches > files and replaces text in them. After replace, it restores original > modification time (mtime) of file. Since this is almost identical to https://github.com/msysgit/git/issues

Re: git branch -v output ambiguous for parser

2015-07-23 Thread Dennis Kaarsemaker
On do, 2015-07-23 at 15:29 +0200, Thibault Kruse wrote: > Hi, > > trying to write a git wrapper, I wanted to parse the output of git branch -v The output of git branch is not meant to be machine-parsed. Try using git for-each-ref :) -- Dennis Kaarsemaker http://www.kaarsemaker.net -- To unsubsc

git branch -v output ambiguous for parser

2015-07-23 Thread Thibault Kruse
Hi, trying to write a git wrapper, I wanted to parse the output of git branch -v However, I realized that the output prints the last commit message at the end of the line, without any disambigution char, or hyphens. This makes it possible to have these outputs: foo 6d29736 [foo

Re: How to organize multiple small reusable components with Git?

2015-07-23 Thread Adam Kurkiewicz
Hi Bing, You seem to be describing a very interesting problem, similar to what I often run into in my day job. In my day job I'm composing multiple java microservices into a single application. We have about 7 microservices, but this number will probably grow to more than 10 before the application

How to organize multiple small reusable components with Git?

2015-07-23 Thread Bing Tian
I am using git to manage some circuit components. Each component is small and I plan to create a "component" project in Git to hold all the small components. Each component may have several released version, such as Comonent1_V1, Component1_V2, Comonent2_V1, Component2_V2. And for future reuse, I m

Re: Config variables and scripting // was Re: [RFC/PATCH] log: add log.firstparent option

2015-07-23 Thread Michael J Gruber
Jacob Keller venit, vidit, dixit 23.07.2015 08:55: > On Wed, Jul 22, 2015 at 11:53 PM, Jeff King wrote: >> "man git" already has such a list (which is generated from the >> annotations in command-list.txt). But I agree that it would probably be >> helpful to point people directly from "git log" to

Re: Feature Request: Passing a number as an option to git tags for displaying latest tags

2015-07-23 Thread Michael J Gruber
Junio C Hamano venit, vidit, dixit 22.07.2015 21:20: > Junio C Hamano writes: > >> The former, sort by "time", is interesting, but you need to define >> what to do with various corner cases. For example, some people may >> have one or more of the following desires: >> >> * My project did not us

Re: Git doesn't detect change, if file modification time is restored to original one

2015-07-23 Thread Konrád Lőrinczi
Based on [1] I found some solutions which makes the changed files appear again as changed: a) touch -m --date=01/01/1980 .git/index So it is a touch, but only a single one, instead of touching all the files in the work dir. b) git read-tree HEAD Also working well. I accept these solutions as wor

Bash __git_ps1 line wrapping issue on OSX

2015-07-23 Thread Adam Moss
I have sourced git-prompt.sh (copied from https://github.com/git/git/tree/master/contrib/completion) and included it in my .bashrc as follows: GIT_PS1_SHOWDIRTYSTATE=true; GIT_PS1_SHOWUPSTREAM="verbose"; GIT_PS1_SHOWCOLORHINTS=true; PROMPT_COMMAND='__git_ps1 "# \u@\h:\w" " \$ "'; Under CentOS et

Re: Git doesn't detect change, if file modification time is restored to original one

2015-07-23 Thread Sebastian Schuberth
On 7/23/2015 9:29, Konrád Lőrinczi wrote: > Interesting, that git status doesn't show replaced changes, if the > mtime is same as original. See the somewhat related FAQ entry at [1] and also the lengthy discussion at [2] about a similar issue. That said, deleting the .git/index file should make

Git doesn't detect change, if file modification time is restored to original one

2015-07-23 Thread Konrád Lőrinczi
I wrote a search & replace perl script, which recursively searches files and replaces text in them. After replace, it restores original modification time (mtime) of file. Interesting, that git status doesn't show replaced changes, if the mtime is same as original. Is there a way to force git stat

Re: [PATCH] diff-tree: do not show the sha1 of the given head with --quiet

2015-07-23 Thread Sebastian Schuberth
On Wed, Jul 22, 2015 at 10:32 PM, Junio C Hamano wrote: >> "--quite" is documented to "Disable all output of the program". Yet >> calling diff-tree with a single commit like >> >> $ git diff-tree --quiet c925fe2 >> >> was logging >> >> c925fe23684455735c3bb1903803643a24a58d8f > > At this point, u