All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Bash <bash@genarts.com>
To: Thomas Rast <trast@inf.ethz.ch>
Cc: Jim Greenleaf <james.a.greenleaf@gmail.com>,
	git@vger.kernel.org, Petr Baudis <pasky@ucw.cz>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: git stash deletes/drops changes of
Date: Fri, 24 May 2013 10:26:02 -0400 (EDT)	[thread overview]
Message-ID: <360187633.973068.1369405562399.JavaMail.root@genarts.com> (raw)
In-Reply-To: <87obc15mq5.fsf@linux-k42r.v.cablecom.net>

----- Original Message -----
> From: "Thomas Rast" <trast@inf.ethz.ch>
> Sent: Thursday, May 23, 2013 6:56:50 PM
> Subject: Re: git stash deletes/drops changes of
> 
> Junio C Hamano <gitster@pobox.com> writes:
> 
> > Thomas Rast <trast@inf.ethz.ch> writes:
> >
> > > So maybe it would be time to first make up our minds as to what
> > > --assume-unchanged should actually mean:
> > >
> > > * Ignore changes to a tracked file, but treat them as valuable.
> > >   In this case we'd have to make sure that failures like
> > >   git-stash's are handled properly.
> > >
> > > * Ignore changes to a tracked file, as in "who cares if it was
> > >   changed".
> > >
> > > * A very specific optimization for users who know what they are
> > >   doing.
> >
> > It has always been a promise the user makes to Git that the working
> > tree files that are marked as such will be kept identical to what is
> > in the index (hence there is no need for Git to check if they were
> > modified). And by extension, Git is now free to choose reading from
> > the working tree file when asked to read from blob object recorded
> > in the index for that path, or vice versa, because of that promise.
> >
> > It is not --ignore-changes bit, and has never been.  What are the
> > workflows that are helped if we had such a bit?  If we need to
> > support them, I think you need a real --ignore-changes bit, not
> > an abuse of --assume-unchanged.
> 
> I gather -- from #git -- that it's mostly used for config files, which
> have an annoying habit of being different from the repository.

The web team at my $dayjob has the same problem, and I believe they are also using --assume-unchanged.

This may be slightly too tangential, but a different workflow we experimented with is marking the config file(s) merge=ours in gitattributes on each branch.  Ideally then devs can check in their local settings on their local branches.  Unfortunately, as is probably well known here, the merge attribute is only checked by the low level merge algorithm, so too often settings got bashed incorrectly (only one merge parent changed the file).  Perhaps there are some options in that direction?

Thanks,
Stephen

      parent reply	other threads:[~2013-05-24 14:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-04 16:24 git stash deletes/drops changes of "assume-unchanged" files Adeodato Simó
2013-05-23 16:57 ` git stash deletes/drops changes of Jim Greenleaf
2013-05-23 22:10   ` Thomas Rast
2013-05-23 22:49     ` Junio C Hamano
2013-05-23 22:56       ` Thomas Rast
2013-05-23 23:20         ` Junio C Hamano
2013-05-24 15:25           ` Phil Hord
2013-05-24 15:34             ` Jim Greenleaf
2013-05-24 15:38               ` John Keeping
2013-05-24 15:42                 ` Jim Greenleaf
2013-05-24 16:01                   ` John Keeping
2013-05-23 23:57         ` Petr Baudis
2013-05-24  8:22           ` John Keeping
2013-05-24  9:40             ` Petr Baudis
2013-05-24 10:06               ` John Keeping
2013-05-24 10:14                 ` Petr Baudis
2013-05-24 10:40                   ` John Keeping
2013-05-24 11:03                     ` Petr Baudis
2013-05-24 12:42                       ` John Keeping
2013-05-24 14:26         ` Stephen Bash [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=360187633.973068.1369405562399.JavaMail.root@genarts.com \
    --to=bash@genarts.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=james.a.greenleaf@gmail.com \
    --cc=pasky@ucw.cz \
    --cc=trast@inf.ethz.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.